using (var memoryStream = new MemoryStream(bytes))
{
using (var workBookImporter = SpreadImporter.CreateWorkbookImporter(SpreadDocumentFormat.Xlsx, memoryStream))
{
foreach (var worksheetImporter in workBookImporter.WorksheetImporters)
{
int rowCounter = 0;
foreach (var rowImporter in worksheetImporter.Rows)
{
if (rowCounter < skipHeaderRows)
{
rowCounter++;
continue;
}
var county = rowImporter.Cells.ElementAt(6).Value;
counties.Add(county);
}
}
}
}
worksheetImporter.Rows only ever contains the first row of the spreadsheet. I tried downloading the same bytes to a file, and the other rows are there. Is there an issue with the library? I used this a couple weeks ago and it worked fine, but now it's broken.
{
using (var workBookImporter = SpreadImporter.CreateWorkbookImporter(SpreadDocumentFormat.Xlsx, memoryStream))
{
foreach (var worksheetImporter in workBookImporter.WorksheetImporters)
{
int rowCounter = 0;
foreach (var rowImporter in worksheetImporter.Rows)
{
if (rowCounter < skipHeaderRows)
{
rowCounter++;
continue;
}
var county = rowImporter.Cells.ElementAt(6).Value;
counties.Add(county);
}
}
}
}
using (var memoryStream = new MemoryStream(bytes)) { using (var workBookImporter = SpreadImporter.CreateWorkbookImporter(SpreadDocumentFormat.Xlsx, memoryStream)) { foreach (var worksheetImporter in workBookImporter.WorksheetImporters) { int rowCounter = 0; foreach (var rowImporter in worksheetImporter.Rows) { if (rowCounter < skipHeaderRows) { rowCounter++; continue; } var county = rowImporter.Cells.ElementAt(6).Value; counties.Add(county); } } } }
worksheetImporter.Rows only ever contains the first row of the spreadsheet. I tried downloading the same bytes to a file, and the other rows are there. Is there an issue with the library? I used this a couple weeks ago and it worked fine, but now it's broken.