C#和互操作。清除范围时的问题 [英] C# and interop. problem when clearing range

查看:96
本文介绍了C#和互操作。清除范围时的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我要清除行,直到它相同的范围(rangeProductName)填充它

I want to clear rows till it  same range (rangeProductName) fills it

Excel.Range rangeProductNames =(Excel.Range)_sheet.get_Range(_sheet.Cells [27," B"] as Excel.Range,_sheet.Cells [27 + dgvProducts.Rows.Count - 1," B"] as Excel.Range );

Excel.Range rangeProductNames = (Excel.Range)_sheet.get_Range(_sheet.Cells[27, "B"] as Excel.Range, _sheet.Cells[27 + dgvProducts.Rows.Count - 1, "B"] as Excel.Range);

在xls文件中有19行我想为所有行创建此命令

In xls file there is 19 rows i want make this command for all rows

rangeProductNames.set_Value(Type.Missing,null);

rangeProductNames.set_Value(Type.Missing, null);

但我无法帮助我吗?

 

推荐答案

Hello Lester555,


    ;  &NB属;      
欢迎来到MSDN论坛,我很乐意为您提供帮助。


阅读完帖子我没有清楚地了解您的问题:


        1。      
< span style ="font-size:small">我想清除行直到它相同的范围(rangeProductName)填充它

Hello Lester555,

            Welcome to MSDN forum and I am very glad to help with you.

After reading your post I didn’t have a clear understanding about your issue:

       1.      I want to clear rows till it  same range (rangeProductName) fills it

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;你是什​​么意思,你可以给我一些关于它的更多细节吗?


这篇关于C#和互操作。清除范围时的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆