I'm trying to populate a combobox with the names of the columns in a spreadsheet.
I'm using the spreadsheetlight library. I can set the cell value using the following code where A
refers to column name and 1
refers to row name. (Am I right?)
But how can I get the the name of all columns in all sheets?
SLDocument sl = new SLDocument();
sl.SetCellValue("A1", true);
First, get the last column index using
SLWorksheetStatistics
:Then iterate through the columns:
The following will print the values "foo" and "bar" from the column list: