How can I convert multiple html tables to an excel sheet with multiple worksheets? Could you please help into this.
My example https://jsfiddle.net/kdkd/5p22gdag/>
@Butani Vijay
I found one issue with your code. Though maybe you could argue maybe my source table is not strictly HTML compliant.
Specifically my table is defined similar to
Name
E-Mail
Last
Login
Suspended
Joe User
JUser@xyz.edu
2020-02-18T16:42:50Z
false
Totals:
and because of the included in the XML parse indicates it expected a Last
Login. But why ??? HTML doesnt really have a
And because of this although XLS would open there was no data in the spreadsheet, nor were any worksheets defined
But a suitable fix is to change in your javascript of
dataValue = (dataValue)?dataValue:tables[i].rows[j].cells[k].innerHTML;
to
dataValue = (dataValue)?dataValue:tables[i].rows[j].cells[k].innerText;