VSTO: Attach meta-data to a cell in Excel?

前端 未结 5 774
刺人心
刺人心 2021-02-14 05:11

I\'m using VSTO to create an Excel Add-on. This add-on retrieves and display alot of data from a sql-server. This works great, but later on I plan to access some of the data ins

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-14 05:41

    You can embed your metadata at the workbook level inside a CustomXMLPart. The customXMLpart could store a serialized dictionary. The dictionary could store cell addresses as keys, and the corresponding metadata as the value.

    Adding a custom xml part: http://msdn.microsoft.com/en-us/library/bb608612.aspx

    Note that this only works for xls and xlsx file formats.

提交回复
热议问题