How Can I Create an Excel File That Isn't Just Rows and Columns?

I need to be able to export a report like in the image below to an excel file… how can I do that? :thinking:

Best wishes,
Antony.

Nothing native to wappler can do that, perhaps create in html and export to pdf?

1 Like

Thanks for that @Hyperbytes… I need an actual .xslx file…

Then unless you can find an API service which can do that I think you are out of luck.

It may well not be possible, as @Hyperbytes suggests, but it might be… A related request came up a while ago, about creating a Word document. An Excel file is just a collection of text files, zipped up, so in theory it might be possible.

To investigate if it’s possible/feasible, you could:
Create a sample spreadsheet in the format you want
Save the file and change the extension from xlsx to zip
Extract the contents of the file and investigate the files in a text editor

I’ve just had a quick look and it seems that sharedStrings.xml contains the data. If you put the xml code into a code beautifer, you should be able to see your data clearly and decide if the file could be created in Wappler, using one of the extensions which enables writing to a file. I don’t know if other files are changed; I expect most are not. You would need to do some research or find some information about the file format. Certainly not a trivial task.

3 Likes

Quick search reveals exporting HTML table to Excel with formatting:

export formatted xslx file from html table

You may need to expand on the search as this was the first result. Probably better examples out there…

I do appreciate Tom’s shining thought process though! Do love a work-around/hack!

:slight_smile:

2 Likes

I liked your question and made me wonder…

Certainly we can’t “format/style” a .csv because it’s what it is… CSV and no format is supported.
So, you are talking about a “export to EXCEL” solution that it is not natively supported in wappler.

BUT, I played with ArrayList and it looks like we can export data that remain “dynamic” by opening the csv with EXCEL.
What I mean is that we can create complex reports but without the formating (font-size, color, bg-color, borders etc)

Here is a small example:

And the result:

I mean we can do nice things as long as we don’t care about colors and styling…
By using ArrayLists, we can add empty lines or columns, totals etc

4 Likes

https://jsreport.net/

This is a very useful tool for report building, exporting, formatting, etc …

Maybe a sledge hammer to crack a nut but it will generally provide a lot of longer-term value.

Maybe worth featuring in a monthly meet-up in the future @mark1

2 Likes

Hello John,
Trust this note finds you well. Funny you happened to reach out. As it happens our presenter for this Friday’s MeetUp just cancelled. I am not familiar with jsreport.net but it seems like a perfect solution to compliment data intensive sites. Would you feel comfortable presenting this Friday? Here are the links: ICYMI: Wappler Monthly MeetUps HAVE MOVED to the 2nd Friday of Each Month
Please let me know when you can.
Thanks,
Mark

Hi Mark,

I’m not available at all this month. A mixture of work and family commitments. I’m back in action on 7th May.

Sorry I couldn’t help.