You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I open excel file, I need to select a specific sheet.
The code says: var sheet1 = excel['Sheet1'];
I have sheets: x1, Phila, oldTown, and myTest
How do I select a specific sheet?
sheet1 is a default sheet.
I need to select sheet: myTest
How do I do that?
2. I need to extract all sheet names from excel file.
The api docs say: var p = excel['p']; where p is a sheet name.
The api docs also say: p.SheetName.
I am not sure how to get a sheet name when I don't specify a sheet name.
I need to do something like this - please see the code below.
Thank You,
var myfile = 'C:/test/mytest.xlsx';
var bytes = File(myfile).readAsBytesSync();
var excel = Excel.decodeBytes(bytes);
int p = excel.sheets.length;
var sheet1 = excel['Sheet1'];
for (int i = 0; i<=p;i++){
sheet1.cell(CellIndex.indexByString('A'+i.toString())).value = TextCellValue(excel[i.sheetName]);
}
The text was updated successfully, but these errors were encountered:
Hello
The code says: var sheet1 = excel['Sheet1'];
I have sheets: x1, Phila, oldTown, and myTest
How do I select a specific sheet?
sheet1 is a default sheet.
I need to select sheet: myTest
How do I do that?
2. I need to extract all sheet names from excel file.
The api docs say: var p = excel['p']; where p is a sheet name.
The api docs also say: p.SheetName.
I am not sure how to get a sheet name when I don't specify a sheet name.
I need to do something like this - please see the code below.
Thank You,
The text was updated successfully, but these errors were encountered: