Hello everyone, I’m new to the Bubble plugin editor and I’m trying to create a plugin from a code I found on Codepen, the code in question creates an xls file (Excel format), I would like to know how I can access the database of bubbles and select the tables you would like to transform and download the table in an xls file. Any thoughts are welcome, thanks!
Ah yes you need to flip your mindset and think of what actions a user needs to build an Excel file. Actions like: add sheet, add cell, etc…
If I were to tackle this server side to produce the actual file I would look for a json to excel npm and then add user friendly actions to generate the json. On the client side I would do the same through events and actions.
It is then incumbent on the plugin user to write the recursive workflows to populate the json from any data source they want.
As a rule of thumb when writing reusable code, such as plugins and packages, you should minimize the number assumptions you make in your code. Anytime you have to make a guess or assumption about what the plugin user wants you should instead be implementing that as a choice, feature, or option.
Thanks for your answer and thought, maybe I should really change my mindset about how things are done in Bubble, I’ll study more about the issue of building plugins and etc. Do you have any good material on how to build plugins in Bubble? In the javascript part itself I can do a little more the question becomes the Bubble editor. Thank you anyway!
Unfortunately there isn’t a lot of free material. I’ve been writing code since the mid 90s so I knew what I was looking for. By far the most useful resource for me hasn’t been for Bubble but rather for the ECMAScript web api, such as the Mozilla Developer Network. I also spend a lot of time reading bare source code on GitHub to figure out NPM package implementation details.
Thank you for that, your answer was certainly very helpful, I will continue in my studies!