Import/Export CSV screws up formulas

Posted by: davide.vago on 6 January 2020, 7:21 am EST

    • Post Options:
    • Link

    Posted 6 January 2020, 7:21 am EST

    Good morning/afternoon

    I’m currently looking at possibilities to import/export data within a spreadsheet instance. I’ve seen the toJSON format but it’s quite expensive as operation, in fact, my exported JSON object size floats between 18 to 25mb (depending on exclusion of style and ignoring the bindings)

    Said so, I’ve started digging into the import/export of CSV format using the following guideline:

    https://www.grapecity.com/spreadjs/docs/v13/online/csvimpexp.html

    However, I realised that all the formulas screws up whenever the imported value is formatted using the financial style (e.g. negative numbers have a rounded square wrapper → -100 == (100)).

    I’m thinking that the formulas are trying to sum strings rather than numbers therefore the output become #VALUE!

  • Posted 7 January 2020, 4:26 am EST

    Hi Davide,

    When using CSV files, all the values are export/imported to/from string values. So during import, SpreadJS tries to convert the string values to the appropriate data type, now in case of formatted values “(100)” is saved in the CSV in place of -100. When importing these values, due to the presence of parenthesis, “(100)” could not be converted to the number type and hence it is imported as the string type.

    Therefore CSV is not suitable for import/export of complex data types with different formatters applied.

    Regards

    Sharad

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels