Convert ssjson to xlsx in server

Posted by: trankhanhngan00 on 24 December 2024, 4:11 am EST

  • Posted 24 December 2024, 4:11 am EST

    Hi team,

    I’m facing an issue when working with SpreadJS in the backend using Node.js. I want to create an API to export an .xlsx file from .ssjson data stored in the database. However, as far as I know, SpreadJS is a client-side library and its methods for converting between ssjson and xlsx may not work on the server. Do you have any solutions for handling this?

    Thank you for your time!

  • Posted 24 December 2024, 6:59 am EST - Updated 24 December 2024, 7:04 am EST

    Hi,

    SJS does not officially support Node.js. However, if you wish to use SJS with Node.js, you can refer to the following article: How to Import and Export Excel (XLSX) using Node.js - https://developer.mescius.com/blogs/how-to-import-export-excel-xlsx-using-node-js.

    From my understanding, you intend to load the SSJSON file and export it as an Excel file using Node.js. This can be achieved by utilizing the fromJSON method to load the SSJSON file and the export method to generate an Excel blob, which can then be used as per your requirements. Please refer to the attached GIF (“Steps.gif”) and sample files (“Sample.zip”) for guidance.

    Gif:

    Sample: Sample.zip

    If you prefer a supported approach, you can use DsExcel, which allows you to load an SSJSON file and export it as an Excel file. DsExcel is available for .NET and Java. For more information, refer to the following links:

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels