C# Excel interop get names all cells of sheet -
on sheet there cells given names. how names of cells in worksheet, given name.
trying so
foreach(excel.worksheet wsheet in excelpattern.worksheets) { treeview1.nodes.add(wsheet.name,wsheet.name); foreach(excel.name n in wsheet.names){ treeview1.nodes[wsheet.name].nodes.add( n.name); } }
but not need
i not understand problem correctly
needed workbook.names
, looking worksheet.names
cells names not attached sheet, global cell names
you can it
// var workbook = ...; foreach(var n in workbook.names) { string name = n.name; // name of cell string ref = n.refersto; // refers cell (sheet1!$e$29) // ... }
Comments
Post a Comment