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...

КОМЕНТАРІ • 47

  • @mafnomekanix5442
    @mafnomekanix5442 Рік тому

    I found this in 2023. Good job dude. I love this

  • @deeperblue77
    @deeperblue77 11 місяців тому +1

    Thanks! Exactly what I needed! 😃

  • @ameyavarma8568
    @ameyavarma8568 3 місяці тому

    Your a life saver! Thanks for doing my job for me:)

  • @MelissaPortales
    @MelissaPortales Рік тому +2

    Great tutorial, thanks!

  • @archanaghodeswar8130
    @archanaghodeswar8130 Рік тому +1

    Thanks. This code worked for me.

  • @Pseudo___
    @Pseudo___ 3 роки тому +4

    Okay but what if I got multiple arrays in multiple objects with properties sporadically throughtout,?

  • @valkingelf
    @valkingelf Рік тому

    Thank you, It helps me a lot!

  • @jonusdarr2443
    @jonusdarr2443 2 роки тому

    I'm a nub and I got this. Thanks a lot.

  • @mohamad.Khaled
    @mohamad.Khaled 4 місяці тому

    thx

  • @mattkolberg2409
    @mattkolberg2409 4 місяці тому +1

    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.

    • @fortunesipay149
      @fortunesipay149 9 днів тому

      I came to the comment to say the exact same thing.

  • @victorrichtmann3590
    @victorrichtmann3590 2 роки тому +4

    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?

  • @andrewcosgrove6447
    @andrewcosgrove6447 3 роки тому +3

    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?

    • @na-ql3sm
      @na-ql3sm 3 роки тому

      Did you ever figure this out? I am getting the same error.

    • @eToolGuy
      @eToolGuy 2 роки тому +10

      @@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.

  • @michaelboggs438
    @michaelboggs438 11 місяців тому

    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.

  • @edderantonioparranaranjo4919
    @edderantonioparranaranjo4919 3 роки тому

    It helped me a lot, thank you

    • @jakebrett3754
      @jakebrett3754 3 роки тому

      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 :)

    • @kadenmekhi4737
      @kadenmekhi4737 3 роки тому

      @Jake Brett Yup, have been using instaflixxer for since december myself :)

  • @rogerdoger303
    @rogerdoger303 3 місяці тому

    Is that coffee you're drinking? 🙂

  • @jmula1963
    @jmula1963 2 роки тому

    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.

  • @phaneeshanagraj9232
    @phaneeshanagraj9232 Рік тому

    How to add data from multiple workbook and convert into JSON format

  • @secretstorymusic
    @secretstorymusic Рік тому

    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.

    • @vidhijindal21
      @vidhijindal21 Рік тому +1

      Did you achieve that? I am looking for the same.

    • @secretstorymusic
      @secretstorymusic Рік тому

      @@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.

  • @crocodilearms2093
    @crocodilearms2093 2 роки тому +1

    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\""}

  • @user-ji7sm5hw1j
    @user-ji7sm5hw1j 2 роки тому

    Hi! How to save JSON in format UTF-8? Tnx!

  • @patrickdanielmanalo3502
    @patrickdanielmanalo3502 Рік тому

    I got a "Run time error '424' Object Required" on this line "Print #fileNumber, JsonCoverter.ConvertToJson(collectionToJson, Whitespace:=2)" any idea why?

  • @andyschrock2759
    @andyschrock2759 Рік тому +4

    Your constant slurping is rather annoying.

    • @johankneijber
      @johankneijber Рік тому

      Completely agree. Otherwise very good.

    • @paddy1813
      @paddy1813 Рік тому

      I was surprised how often someone has to drink during a video recording...

  • @alejandroarmagedon8095
    @alejandroarmagedon8095 11 місяців тому

    help!! ERROR 424

  • @kanishksharma9828
    @kanishksharma9828 3 роки тому

    My Button is not working, I can click it but it is not working! :(

    • @na-ql3sm
      @na-ql3sm 3 роки тому

      did you figure it out?

    • @kanishksharma9828
      @kanishksharma9828 3 роки тому

      @@na-ql3sm no not yet

    • @DepechLyot
      @DepechLyot 2 роки тому

      it adds -- Private Sub CommandButton1_Click() extra End Sub need delete them

    • @sheheryarsarwar5140
      @sheheryarsarwar5140 2 роки тому

      You need to check might be your design mode is on under development.

    • @DepechLyot
      @DepechLyot 2 роки тому

      @@sheheryarsarwar5140 no, he said can click it.

  • @serhiirumiantsev7736
    @serhiirumiantsev7736 3 роки тому

    Script is not working, it shows error

    • @na-ql3sm
      @na-ql3sm 3 роки тому

      did you figure it out?