Save Excel Table to a JSON File with Simple VBA Macro
Вставка
- Опубліковано 25 сер 2024
- In this video, I teach you to create a simple VBA macro to save an Excel table to a JSON file. The macro uses VBA-JSON to convert between a VBA Collection or Dictionary to a JSON file.
VBA-JSON can be downloaded here: github.com/VBA...
Written tutorial and source code here: syntaxbytetuto...
I found this in 2023. Good job dude. I love this
Thanks! Exactly what I needed! 😃
Your a life saver! Thanks for doing my job for me:)
Great tutorial, thanks!
Thanks. This code worked for me.
Okay but what if I got multiple arrays in multiple objects with properties sporadically throughtout,?
Thank you, It helps me a lot!
I'm a nub and I got this. Thanks a lot.
thx
This is really good. Just some constructive criticism. Speaking live, or narrating in a video, you want to avoid doing things that distract the listener. For you, it's taking a sip of whatever it is you're drinking. It happens very often. You'll be a better speaker if you avoid that.
I came to the comment to say the exact same thing.
The tutorial is very good. This worked well for me.
But it doesn't work with a special character. Do you have any idea how to adjust as a special character?
Did you solve this? Thanks
I got a "run time error '9': subscript out of range" error on this line: "For Each c In ActiveSheet.ListObjects(1).HeaderRowRange.Cells" any idea why?
Did you ever figure this out? I am getting the same error.
@@na-ql3sm Your grid data needs to be defined as an Excel Table. Select the data you want to convert, then Go to then on the Ribbon and select a style.
Is it possible to modify this so that the only outputs are strings? I'm trying to get data to upload into Cosmos DB for Azure, and Azure really likes string data inputs.
It helped me a lot, thank you
Dont know if you guys gives a shit but if you're bored like me atm you can stream all the new series on instaflixxer. Been watching with my gf for the last weeks :)
@Jake Brett Yup, have been using instaflixxer for since december myself :)
Is that coffee you're drinking? 🙂
is there a simple line of code I can add that allows the converter to skip a column if there is no value attatched in the table (ie. left blank) ?
trying to format metadata for a large-scale NFT project (non-generative/where the art was done by hand) and we don’t need any extraneous properties as they literally should not exist if the piece of art does not call for it.
How to add data from multiple workbook and convert into JSON format
It would be great to know how to store individual lines as separate files as my log only allows single line files to be read.
Did you achieve that? I am looking for the same.
@@vidhijindal21 Not yet. I'm considering loading my data into SAS and automating a macro to save as different files. Will LYK if that works.
How do you build a complex table and export to nested json?
{"id":"0","attributes":[{"name":"one","value":"1"},{"name":"two","value":"2"}],"description":"The \"description\""}
you found a solution?
@@basasasas1 I did. Not an elegant one!
Hi! How to save JSON in format UTF-8? Tnx!
I got a "Run time error '424' Object Required" on this line "Print #fileNumber, JsonCoverter.ConvertToJson(collectionToJson, Whitespace:=2)" any idea why?
@user-rg4ze1uj7d any ideas?
I'm getting the same error. Were you ever able to figure this out?
ya te solucionarion?
Your constant slurping is rather annoying.
Completely agree. Otherwise very good.
I was surprised how often someone has to drink during a video recording...
help!! ERROR 424
My Button is not working, I can click it but it is not working! :(
did you figure it out?
@@na-ql3sm no not yet
it adds -- Private Sub CommandButton1_Click() extra End Sub need delete them
You need to check might be your design mode is on under development.
@@sheheryarsarwar5140 no, he said can click it.
Script is not working, it shows error
did you figure it out?