开发者

How to Recalculate / Refresh the specific cells in Excel interop?

开发者 https://www.devze.com 2023-04-06 20:07 出处:网络
Lets say I have a marker, \"#Refresh#\", on some cells, which indicate that these cells need to be recalculated 开发者_开发知识库at later stage.

Lets say I have a marker, "#Refresh#", on some cells, which indicate that these cells need to be recalculated 开发者_开发知识库at later stage.

So my question is:

What should I do to recalculate only these specific cells that are marked as "#Refresh#"?

I notice that if I do

Excel.Range range = Worksheet.UsedRange

it will return all the range objects, including those without "#Refresh#" markers. Is there any way I can get the marked range objects only?

Thanks.


Hmm, I think I found quite a useful example on MSDN that was about searching for text in worksheet range. It'd be very helpful, I suppose. So I've shared the link below in case someone is looking for that as well.

Link: http://msdn.microsoft.com/en-us/library/e4x1k99a(v=VS.100).aspx1

0

精彩评论

暂无评论...
验证码 换一张
取 消