开发者

How to identify a formula of cell contains defined names in Excel by using VSTO?

Is there any way to identify a formula of excel cell contains defined names by using VSTO?

Or is there any way to replace the defined Excel.Name in formula开发者_如何学运维 of a Excel cell when the name of Excel.Name is changed by using VSTO?

thanks,

Yst


I don't know if there is a direct built-in way to do that. However, you should be able to recognize and extract a name in the formula by getting the formula of the cell (Range.Formula), and analyzing the string, recognizing that a sequence of characters should be a named range if:
0) it isn't a number
1) it isn't a built-in function, which you could recognize by the fact that it is followed by a (
2) it isn't a cell name, i.e it isn't written as A1, $A1, A$1 or $A$1 Sounds like a fun Regex project!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜