Spread style not consistent after editing imported xlsx file

Posted by: justin.arias on 30 November 2020, 9:49 am EST

  • Posted 30 November 2020, 9:49 am EST - Updated 3 October 2022, 1:04 am EST

    After importing a xlsx file generated by excel and editing the cell, the style of the cell seems to change. The style object shown below seems to have autoformatter and loses all reference to backcolor, forecolor, font, etc. However cells that haven’t been edited maintain reference to backgroundImage, backColor, etc.

    Not sure why this is happening, also I’m on v12.0.9 but cannot reproduce on 12.0.9 designer.

    Thank you

  • Posted 1 December 2020, 6:21 pm EST

    Hi Justin,

    This is expected Behaviour from SJS. When we import an excel file SJS creates builtStyles according to the Excel sheet style. That is why the style Object losses the information. Further, Could you please explain more about the issues that you are facing due to this behavior. so that we investigate it and assist you accordingly.

    Regards

    Avinash

  • Posted 4 December 2020, 2:03 am EST

    Hi Avinash,

    When we export to xlsx, by first using spread.toJSON(), then using spreadIO to save it as a blob, only the cells with the style format holding references to original colors exports properly with the original colors and fonts. The ones which text has changed and losses references exports without original font and colors.

  • Posted 6 December 2020, 11:50 pm EST

    Hi Justin,

    We are not able to understand the complete scenario. Could you please explain more about the issue so that we could have a better understanding of the issue? Also if possible please share a small sample that replicates the issue so that we could investigate it further and assist you accordingly.

    Regards

    Avinash

Need extra support?

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

Learn More

Forum Channels