Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
How to detect if there is no data in the current active spreadsheet?
spreadsheetInstance.sheets[0].rows.lenght == 0
I tried the same. But I am getting row count as 5 even if there is no data. Of course, the cell values are empty. It is assuming a 5x5 by default even if there is no data. Also, We tried the below snippet too. When a fresh instance of the sheet is loaded, it works as expected but if we add some data and then delete it, then this method is not working.
$0.ej2_instances[0].sheets[0].usedRange {rowIndex: 0, colIndex: 0}
Validation details:
• Used range not updated while Clear or delete entire data.
• I tried to set used range as {0,0} in action complete, but it re-updated as old used range.
• If we add manually data in new sheets and delete (set used range as {0,0} in action complete), it works fine.