Excel to JSON Conversion using VBA macro

Status
Not open for further replies.

itpgm21

New Member
Joined
Nov 22, 2018
Messages
5
Hi,

1. A Excel file has multiple sheets in it.
2. Need to Create a Macro button in a new sheet and call it as Refresh JSON.
3. On click of the above button, the following should be achieved.
a. Parse data in all sheets into JSON. The number of sheets and number of columns in each sheet might vary.
b. Write this into an output file as XYZIndex.json – Single out put file containing data from all sheets (Save the file in the same location as the excel.)
c. Note that Column A (Name) of every sheet has hyperlinked data. This should get parsed as "Name": "filename", "URL": "file complete address"

So how to write VBA macro to achieve this?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,943
Messages
6,181,917
Members
453,071
Latest member
Gizmo2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top