Merge multiple SSJSON and create one workbook with multiple sheets

Posted by: vinayakbagi on 13 May 2020, 10:04 am EST

  • Posted 13 May 2020, 10:04 am EST

    Is it possible to merge multiple SSJSON and create one workbook with multiple sheets in Angular

  • Posted 14 May 2020, 1:45 pm EST

    Hi,

    Please refer to the following post which discusses about the possibility of same:

    https://www.grapecity.com/forums/spread-sheets/importing-without-overwrit#hiif-you-would-like-to-mer_1

    Regards

    Sharad

  • Posted 17 May 2020, 4:39 am EST

    I tried implementing the above solution, sheets are getting added to workbook but style is not getting applied.

    I am trying to implement this in Angular

  • Posted 18 May 2020, 10:23 am EST

    In the previously shared sample the styles not importing issue could be observed if multiple sheets have styles with the same name. In the previous code, the styles from the new sheet were added only if they are not already present in the sheet so conflicting names would cause some issues.

    If you need to merge sheets with conflicting style names, then you could override the style names before importing the sheet. Please refer to the following sample which demonstrates the same:

    https://codesandbox.io/s/spread-js-starter-4umyy?file=/src/index.js

  • Posted 19 May 2020, 11:18 am EST

    Hi Sharad,

    I tried Implementing this at client side (Angular) but it is impacting the performance of the application because I am having 20 workbooks (20 different JSON saved in database), so fetching & merging these JSON’s and then generating PDF is taking lot of time, sometimes application is also crashing.

    Is their any way to implement above functionality at backend Node.JS ? If yes it would be very helpful if you share code sample for the same.

    Thanks and Regards,

    Vinayak

  • Posted 20 May 2020, 6:35 am EST

    Hi Vinayak,

    I’ve updated the sample to make the helper functions node compatible. Please refer to the following updates sample:

    https://codesandbox.io/s/spread-js-starter-mrxhi?file=/src/index.js

    You may copy the “workbookJsonMergeHelper.js” file to your server and use the mergeWbJSON() method to merge the workbookJSON on the server.

    Please let me know if you face any issues.

    Regards

    Sharad

Need extra support?

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

Learn More

Forum Channels