🤌 Excel / XLSX Creator

Create a XLSX file from a JSON.

Plugin page: 🤌 Excel / XLSX Creator Plugin | Bubble
Demo: Bubble | No-code apps
Editor: excel-creator | Bubble Editor

Built on top of the shoulders of giants

If you know how to use the 1T CSV Creator, you know how to use this.


Instructions

1. Setup the action

This uses the operator :formatted as text on a list in Bubble. Get started by adding the JSON to XLSX (SSA) action to your workflow.

The JSON content field simply needs valid JSON and you are good to go. However, the idea is to do a search for the data you want to export and then use the :format as text operator and create your JSON in that field as shown below.

Add a comma to the Delimiter field.

When you have a field that can contain newlines, quotes, and other special characters, It’s a good idea to use the :formatted as JSON-safe operator. When using that operator, you don’t need to wrap it with double-quotes " – the operator does that already.

Sample JSON

{
"Sale Date": "This Sales's Order Date",
"Sale ID":"This Sales's Order ID",
"Items":[This Sales's Items: formatted as JSON-safe],
"Region":This Sales's Region's Name: formatted as JSON-safe
}

If you want to export a nested list, simply add square brackets around the value as shown in the Items value in the JSON sample.

2. Saving the file

To save the file use 1T - CSV Creator’s (1T - CSV Creator Plugin | Bubble) save file.

See the demo page for more info

3. Downloading the file

Use the Download file action from AirDev’s File Downloader (File Downloader Plugin | Bubble)

12 Likes

This is going to be very helpful for everyone. Thank you for the plugin.

1 Like

Incredible work! I wonder if I could save step one as an Excel file to bubble’s database? Looking to turn a JSON into an Excel sheet I can display to the user using Air Document Viewer Plugin | Bubble :raised_hands:

Edit: I already made it work, sorry for the bother. Just opened your page excel-creator | Bubble Editor and copied the steps :rocket: so good

1 Like

Two more questions - no rush at all - got it working :muscle:

  1. It seems to create the file in view-only mode, is there a way to change that?

  2. Thought of doing the same for google sheets?

Thank either way, great plugin!

Hey @rico.trevisan , is there a way we could define the width of the columns on the exported sheet? Maybe we provide a list of numbers like 200,300,100 (so column 1 is 200px, column 2 is 300px, etc)

Very useful and simple plugin either way :slightly_smiling_face:

Is it possible to create multiple tabs in the XLSX file with this plugin?

1 Like

Not yet. You’re not the first one to request this and I need to do that for an app so I’ll do this soon. I’m on a bit of a pre-holidays rush and then I’ll get on it in September.

2 Likes

Great, looking forward to it! And enjoy your vacation :slight_smile:

Hi @rico.trevisan
Thanks for the plugin - does it support multiple sheets on the same Excel file now?

Finally got around to working on the multisheet export. I’m looking for a couple of beta testers. Drop me a DM with your app’s name and I’ll slip you a copy.

1 Like

Hi @rico.trevisan,

First of all, thanks for creating an excellent plugin!

Initially, I was a bit intimidated by all the Node.js tutorials. However, after watching the YouTube link and installing the xlsx package in Visual Studio, I realized it was a plug-and-play solution. Haha!

Now, to my issue…

I have successfully installed the plugin and can generate .xlsx files. It works perfectly. However, when using the @AirDev downloader to open the file, I get the following error:

“Cannot open the file because the file format or file extension is not valid.”

The strange thing is, if I download it from the backend using “bubble.fileManager,” it works fine. Also, if I open the corrupted file in Google Sheets, it works without any issues.

I’ve been working on this for over 18 hours straight and can’t figure it out. I’m running out of time to publish my new update, and I rely on this function to generate payroll data that my users send to the accounting office.

I would greatly appreciate any pointers on how to solve this.

Thank you!

How i have setted it up:

API_xlsx_creator
image



image

Workflow: run_xlsx_creator

  1. Serche for things
  2. Generate a JSON array with the :format as text
  3. Run API workflow
**INPUT JSON & RESULT base64**

{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “1”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “105”,
“Sats”: “220”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “16”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “4.75”,
“Sats”: “115”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “7”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “87.25”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “20”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “47.75”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “21”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “14.75”,
“Sats”: “110”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “2”,
“Art”: “1”,
“Kommentar”: “”,
“Antall”: “1”,
“Sats”: “50000”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “2”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “115.75”,
“Sats”: “215”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “3”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “151”,
“Sats”: “215”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “6”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “90.25”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “8”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “47.5”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “22”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “13”,
“Sats”: “150”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “12”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “17.25”,
“Sats”: “155”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “14”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “10”,
“Sats”: “115”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “10”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “7.25”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “24”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “24.75”,
“Sats”: “191”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “19”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “9”,
“Sats”: “115”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “13”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “9”,
“Sats”: “208”,
“Projekt”: “”
},{
“År”: “2024”,
“Måned”: “06”,
“Ansattnummer”: “4”,
“Art”: “2”,
“Kommentar”: “”,
“Antall”: “2”,
“Sats”: “208”,
“Projekt”: “”

BASE64

UEsDBBQAAAAAAAAAAACkAYS4tQIAALUCAAAaAAAAeGwvX3JlbHMvd29ya2Jvb2sueG1sLnJlbHM8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCIgc3RhbmRhbG9uZT0ieWVzIj8+DQo8UmVsYXRpb25zaGlwcyB4bWxucz0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL3BhY2thZ2UvMjAwNi9yZWxhdGlvbnNoaXBzIj48UmVsYXRpb25zaGlwIElkPSJySWQxIiBUeXBlPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvb2ZmaWNlRG9jdW1lbnQvMjAwNi9yZWxhdGlvbnNoaXBzL3dvcmtzaGVldCIgVGFyZ2V0PSJ3b3Jrc2hlZXRzL3NoZWV0MS54bWwiLz48UmVsYXRpb25zaGlwIElkPSJySWQyIiBUeXBlPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvb2ZmaWNlRG9jdW1lbnQvMjAwNi9yZWxhdGlvbnNoaXBzL3RoZW1lIiBUYXJnZXQ9InRoZW1lL3RoZW1lMS54bWwiLz48UmVsYXRpb25zaGlwIElkPSJySWQzIiBUeXBlPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvb2ZmaWNlRG9jdW1lbnQvMjAwNi9yZWxhdGlvbnNoaXBzL3N0eWxlcyIgVGFyZ2V0PSJzdHlsZXMueG1sIi8+PFJlbGF0aW9u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ZW1lQ2xyIHZhbD0icGhDbHIiPjxhOnRpbnQgdmFsPSI0MDAwMCIvPjxhOnNhdE1vZCB2YWw9IjM1MDAwMCIvPjwvYTpzY2hlbWVDbHI+PC9hOmdzPjxhOmdzIHBvcz0iNDAwMDAiPjxhOnNjaGVtZUNsciB2YWw9InBoQ2xyIj48YTp0aW50IHZhbD0iNDUwMDAiLz48YTpzaGFkZSB2YWw9Ijk5MDAwIi8+PGE6c2F0TW9kIHZhbD0iMzUwMDAwIi8+PC9hOnNjaGVtZUNscj48L2E6Z3M+PGE6Z3MgcG9zPSIxMDAwMDAiPjxhOnNjaGVtZUNsciB2YWw9InBoQ2xyIj48YTpzaGFkZSB2YWw9IjIwMDAwIi8+PGE6c2F0TW9kIHZhbD0iMjU1MDAwIi8+PC9hOnNjaGVtZUNscj48L2E6Z3M+PC9hOmdzTHN0PjxhOnBhdGggcGF0aD0iY2lyY2xlIj48YTpmaWxsVG9SZWN0IGw9IjUwMDAwIiB0PSItODAwMDAiIHI9IjUwMDAwIiBiPSIxODAwMDAiLz48L2E6cGF0aD48L2E6Z3JhZEZpbGw+PGE6Z3JhZEZpbGwgcm90V2l0aFNoYXBlPSIxIj48YTpnc0xzdD48YTpncyBwb3M9IjAiPjxhOnNjaGVtZUNsciB2YWw9InBoQ2xyIj48YTp0aW50IHZhbD0iODAwMDAiLz48YTpzYXRNb2QgdmFsPSIzMDAwMDAiLz48L2E6c2NoZW1lQ2xyPjwvYTpncz48YTpncyBwb3M9 [truncated, was 27908]
}

Front end: airDev downloader

URL to file:
https://2c7b72955cb81ec1a99b821510a561cb.cdn.bubble.io/f1721808625179x843928011772459500/Payroll.xlsx?_gl=1*891pf*_gcl_au*ODIwNDE1NjI0LjE3MTkyMTI1MjY.*_ga*NzE3NDIxNTI1LjE2OTU3MTI5MDY.*_ga_BFPVR2DEE2*MTcyMTgxMTQzMC4yMTAuMS4xNzIxODEyOTI1LjYwLjAuMA…

Solved

1 Like

Hi all,

I have a small problem, when exporting a excel file…

I want the export a list of data, I added “format as JSON-safe” behind the text field, but only when in add this the file seems to have a problem it’s 3B and when opening the file I get this error;

“Excel cannot open the file ’my_file (2).xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.”

This is only when I add the “format as JSON-safe” operator behind the text field… I do have text that are using newlines, qoutes and special characters.

Anyone suggestions?


Screenshot 2024-08-05 at 22.29.43

My hunch is that one of these fields has a character that is breaking the JSON.

When you use :formatted as JSON-safe, you don’t need the quotes around it. Also, make sure you set defaults to everything – JSON no-likey null. I think the JSON-safe operator takes care of that, but for the belt-and-suspenders approach, I append :defaulting to "".

So,

{
  ...
  "Message": This Logbook's LogText:formatted as JSON-safe,
  ...
}

Also, what does This Logbook's ReportUser return? The actual object? Just the ID? Might be worthwhile to paste this entire expression on a page so you can visually troubleshoot the output.