Dynamic spreadsheet - cell format and cell styling



  • Hello,
    I'm trying to dynamically format my xlsx, depending the type data received through API call.
    I'm not using any pre inserted asset. Is it possibile to achieve this kind of approach?

    Also, am i using xlsxColAutofit correctly?

    I'm using my own style, and sending the columns and rows through API call.

    Here's my example: https://playground.jsreport.net/w/MatheusBaretta/or056N8k

    Thank you!



  • Also, am i using xlsxColAutofit correctly?

    This helper works only when you put it to the uploaded excel asset.

    I'm trying to dynamically format my xlsx, depending the type data received through API call.

    It's possible, but it requires more or less studying of the xlsx format depending on what exactly you want to change.
    Here you can find an example of custom sized cell
    https://playground.jsreport.net/w/anon/mQZ9KeUG
    You can also update xlsx styles and change color or fonts dynamically, but you will need to open xlsx file, replicate what you want to do, save it as zip, inspect its code and do the same using jsreport xlsx helpers.



  • @jan_blaha Thank you for your reply.

    I did all the work adding and replacing the Xlsx. If you're intereseted, i can share with you guys the work i did. (Maybe it can help other developers, 'cause i see a lot of topics with "dynamic" on title.)



  • Sure, could you share some playground demos?
    The xlsx recipe is mostly about examples and the potential for this is endless.

    Or you can also email me the export if you don't want it to become public.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.