This is a migrated thread and some comments may be shown as answers.

Spreadsheet ToJSON breaks external references

1 Answer 124 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
MikeWiese
Top achievements
Rank 1
MikeWiese asked on 18 Aug 2016, 05:38 AM

All of our spreadsheets contain external references. That is, cells that retrieve values from other worksheets in the same workbook using formulae similar to =SomeOtherWorksheet!B13. 

Our application workflow is pretty basic. We load a customer spreadsheet into the client-side kendoSpreadsheet control using the native "Load" button in the toolbar. We then save a representation of that workbook (from the toJSON() method) back to the server.

Later on, in server-side code, we Load() that json string into a Telerik.Web.Spreadsheet.Workbook and convert it to a Telerik.Windows.Documents.Spreadsheet.Model.Workbook. We then retrieve the value of certain cells with CellSelection.GetValue();

Unfortunately, when a cell formula refers to a cell on another worksheet, it fails. To be precise, cell.GetValue().Value.GetResultValueAsString(new CellValueFormat("")) comes back as "#REF!"

This only happens after the spreadsheet has been serialised/deserialised via JSON. If we load the exact same spreadsheet via 
     new XlsxFormatProvider().Import(myExcelFileStream)
then those external references work just fine. 

Am I doing something wrong? I could not find anything in this forum or User Voice that relate to this bug. Is there a workaround?


1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 22 Aug 2016, 07:00 AM
Hello,

Thanks for the bug report. I've opened an issue on our GitHub. We'll keep it up-to-date and close it once resolved.
I couldn't find a workaround at the moment.

I've updated our Telerik points as a token of gratitude for your involvement.

Regards,
T. Tsonev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Spreadsheet
Asked by
MikeWiese
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or