Access excel cell by its name

前端 未结 1 1512
遥遥无期
遥遥无期 2020-12-21 02:19

I\'m trying to set excel\'s cell name to some custom name and to later access that cell by its name. Is there some out of the box API call to do this, or how should I do thi

相关标签:
1条回答
  • 2020-12-21 03:15

    I think you may be looking for Range("C2").

    As to formatting information, this is available through various properties of the Excel object model. See http://msdn.microsoft.com/en-us/library/ff197454.aspx for more information.

    The Range type (as opposed to the Range indexed property referenced above) also exposes a Name property, which you can set in code:

    worksheet.get_Range("C2").Name = "fdafdfs"
    worksheet.get_Range("fdafdfs").Select();
    
    0 讨论(0)
提交回复
热议问题