I have implemented the code in "Reading An Excel File Using HTML 5 And jQuery" (excel to table) - and it really works great!
Can someone suggest the changes in the code to be able to access not only first sheet, but the n-th one?
Thank you in advance
Salman BegPosted Jun 23, 2021, 6:13 PM
Peter PrincePosted Jun 23, 2021, 6:36 PM
https://www.aspsnippets.com/Articles/Read-Parse-Excel-File-XLS-and-XLSX-using-jQuery.aspx has the answer!
Code for the second sheet:
...
...
//Fetch the name of Second Sheet.
var secondSheet = workbook.SheetNames[1];
//Read all rows from Second Sheet into an JSON array.
var excelRows = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[secondSheet]);
...
...
Thanks Salman!