How to delete rows from multiple worksheets in spreadsheet?

Hi Support,

I was pleasure using spreadsheet. However I am facing some issues related to couple of things here.

  1. I am using Vue spreadsheet, for which I am using my own api to pass data in json format. I noticed that I have to give the data in following format. Where you can noticed that I had to pass each row as key => value pair. Isn't there any other format that the spreadsheet understands? Like can I pass simple .csv raw data directly read from .csv file? Is there any documentation mentioning which data formats spreadsheet supports?
  2. $data = [

    'results' => [

    ['id' => '1', 'name' => 'John'],
    ['id' => '1', 'name' => 'Chales']

    ],

    '__count' => 1

    ]; (this PHP code)

    2. My second question is related to deleting rows from spreadsheet having multiple worksheets. I have a vue code which inserts multiple sheets in spreadsheet dynamically using spreadsheet.insertSheet() function. How can I delete rows from second sheet if I have total 3 sheets?

    I will appreciate your quick reply.


1 Reply 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team March 16, 2021 12:22 PM UTC

Hi Mahesh, 
 
Thank you for contacting Syncfusion support. 
 
Query #1: Is there any documentation mentioning which data formats spreadsheet supports? 
 
We have checked your reported requirement and we would like to let you know that we have already provided support to load the CSV file. By using the File-> open option in our EJ2 Spreadsheet. For more details, please refer the below link. 
 
 
 
Query #2: How can I delete rows from second sheet if I have total 3 sheets? 
 
We have checked your reported requirement and it can be achievable in our spreadsheet by passing the sheet name/ sheet index as an argument in delete method as like as below. 
 
   
  var spreadsheet = this.$refs.spreadsheetRef; 
      // To delete the rows 
      spreadsheet.delete(2, 3, "Row", "Car Sales"); // Specifies the start and end row index and sheet name to be deleted 
 
For your convenience, we have prepared the sample that delete the row in second sheet in a button click event. Please find the link below. 
 
 
 
Could you please check the above details and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 
 



Marked as answer
Loader.
Up arrow icon