Trying to get value off the second sheet

Say I have 2 sheets in my Spreadsheet component.

This issue only occurs before the user visits the second sheet.

I have a value on that second sheet that I want to programmatically retrieve.


Here is what I had in mind:

var yearMonth = this.spreadsheetObj.getDisplayText(getCell(2, 2, this.spreadsheetObj.sheets[5]));
console.log('yearMonth: ' + yearMonth);


This is on initial page load, I try to get the value with that code.



This is after visiting the sheet.



It is as though the user must visit the sheet for the component to know what the value is.

Thanks


2 Replies

VR Vasanth Ravi Syncfusion Team August 28, 2022 03:25 PM UTC

Hi Philippe,


Sorry for the inconvenience caused.


We have been validating on your reported issue at our side efficiently. We kindly request you that we need two more days to validate this issue to provide a better solution as per your requirement. We appreciate your patience until then.


Thanks.


Regards,                                                                                                                

Vasanth R



VR Vasanth Ravi Syncfusion Team August 29, 2022 03:56 PM UTC

Hi Philippe,


We have gone through your requirement, and we have prepared a sample regarding. Please do find the attached sample.


At the time of initial loading only the active sheet gets rendered to the UI and all other sheets tabs are updated at the model level. When navigating to the sheet it gets updated to the UI. If the entire sheet tabs get loaded at initial loading, it may lead to performance issues on our side. And this is the behavior on our side as per architecture.


We have achieved your requirement through the ‘getData’ method. The getData method fetches the value of the mentioned sheet from the model level itself. As the ‘getDisplayText’ method fetches the value from the active sheet or the rendered sheet.


Stackblitz Sample: https://stackblitz.com/edit/angular-rxw6as?file=app.component.ts


Kindly get back to us if you need further assistance regarding.


Regards,

Vasanth R


Loader.
Up arrow icon