开发者

Need to access selected data from a excel addin (Visual C#)

开发者 https://www.devze.com 2023-01-24 05:31 出处:网络
Im trying to build a addin that can take some a selection of cells from a excel sheet and then put them together in the first cell i have celected. Between the cells there will be a user selected sepe

Im trying to build a addin that can take some a selection of cells from a excel sheet and then put them together in the first cell i have celected. Between the cells there will be a user selected seperator.

example: I select the 3 cells A1-A3 with the values A B and C I then bring up my addin and chose the seperator to be ", ". The addin should then p开发者_如何学运维lace a the String "A, B, C" in the cell A1.

But I cant figure out how to access the data I have selected in the excel sheet.


var range = (Range)Globals.ThisAddIn.Application.ActiveWindow.Selection;
0

精彩评论

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