Microsoft.Office.Interop.Excel帮助 [英] Microsoft.Office.Interop.Excel Help

查看:116
本文介绍了Microsoft.Office.Interop.Excel帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试阅读Excel工作表并对所有逗号进行查找/替换,在片材的任何单元格中,用短划线 - 替换它们。我可以把工作簿打开,但我不知道从哪里开始。有没有一个简单的方法来实现这个目标?


下面是我到目前为止的代码:

展开 | 选择 | Wrap | 行号

解决方案


我正在尝试阅读Excel工作表并对所有逗号进行查找/替换","在片材的任何单元格中,用短划线 - 替换它们。我可以把工作簿打开,但我不知道从哪里开始。有没有一个简单的方法来实现这个目标?


下面是我到目前为止的代码:

展开 | 选择 | Wrap | 行号


你完全摇滚!我知道由于excel.application对象的复杂性,必须有一个相对简单的方法。只是不知道如何访问它。您的示例代码就像一个魅力!万分感谢!


KK


好的,这就是我现在所拥有的:

展开 | 选择 | Wrap | 行号< /跨度>

I''m trying to read an Excel worksheet and do a find/replace for all of the commas "," in any of the cells in the sheet and replace them with a dash "-" I can get as far as getting the workbook opened but I''m not sure where to go from here. Is there a simple method to accomplish this?

Below is the code I have so far:

Expand|Select|Wrap|Line Numbers

解决方案

I''m trying to read an Excel worksheet and do a find/replace for all of the commas "," in any of the cells in the sheet and replace them with a dash "-" I can get as far as getting the workbook opened but I''m not sure where to go from here. Is there a simple method to accomplish this?

Below is the code I have so far:

Expand|Select|Wrap|Line Numbers


You totally ROCK! I knew there had to be a relatively easy method due to the complexity of the excel.application object. Just wasn''t sure how to access it. Your sample code worked like a charm! Thanks a Million!

KK


Ok, here is what I have now:

Expand|Select|Wrap|Line Numbers


这篇关于Microsoft.Office.Interop.Excel帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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