This is a migrated thread and some comments may be shown as answers.
Unable to fetch worksheet tabs
1 Answer 4 Views
This is a migrated thread and some comments may be shown as answers.
chaitanya
Top achievements
Rank 1
chaitanya asked on 14 May 2019, 12:26 PM

Hi, 

 I am new to Kendo UI Spread Sheet Component. Trying to fetch worksheet tab names while importing.

On importing a .xlsx with worksheet tabs, i am trying to fetch  worksheet tabs names with 

' $("#spreadsheet").data("kendoSpreadsheet").sheets(); '  but for the first time i am getting result as a default for every import ' _sheetName: "Sheet1"  '.

 

 

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 16 May 2019, 09:38 AM
Hello Chaitanya,

To get the names of the Sheets on the imported xlsx file, I would suggest you to use the excelImport event of the Spreadsheet:
excelImport: function(e) {
  var spread = e.sender;
   
  e.promise.done(function() {
    var sheets = spread.sheets();
     
    sheets.forEach(function(sheet) {
        console.log(sheet.name());
    });
  });
}

Here you will find a small sample implementing the above suggestion.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
chaitanya
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or