After using xlsxioread_sheet_open, cannot use xlsxioread_sheetlist_next to get the next sheet.
Here's my code. I want to go through all the sheets and print out the contents.
But the actual effect really only prints the contents of the first sheet
if ((sheetlist = xlsxioread_sheetlist_open(xlsxioread)) != NULL)
{
while((sheetname = xlsxioread_sheetlist_next(sheetlist)) != NULL)
{
XML_Char_printf(X("%p - %s\n"),(void *)sheetname,sheetname);
sheet = xlsxioread_sheet_open(xlsxioread, sheetname, XLSXIOREAD_SKIP_EMPTY_ROWS);
if(sheet != NULL)
{
while (xlsxioread_sheet_next_row(sheet)) {
while ((value = xlsxioread_sheet_next_cell(sheet)) != NULL) {
XML_Char_printf(X("%s\t"), value);
xlsxioread_free(value);
}
printf("\n");
}
xlsxioread_sheet_close(sheet);
}
}
XML_Char_printf(X("AA%p - %s\n"),(void *)sheetname,sheetname);
xlsxioread_sheetlist_close(sheetlist);
}