

AllowUnquotedKeys (Default = False) The JSON standard requires object keys to be quoted ( " or '), use this option to allow unquoted keys.for Ids or Credit Cards), as they will be invalid above 15 digits.īy default, VBA-JSON will use String for numbers longer than 15 characters that contain only digits, use this option to use Double instead.

This can lead to issues when BIGINT's are used (e.g. UseDoubleForLargeNumbers (Default = False) VBA only stores 15 significant digits, so any numbers larger than that are truncated.VBA-JSON includes a few options for customizing parsing/conversion if needed: Based on some Google searching, I tried reinstalling VBA for applications, then reinstalling all of Office, but the problem persists. json file Set JsonTS = FSO.OpenTextFile( "example.json", ForReading) JsonText = JsonTS.ReadAll JsonTS.Close ' Parse json to Dictionary ' "values" is parsed as Collection ' each item in "values" is parsed as Dictionary Set Parsed = JsonConverter.ParseJson(JsonText) ' Prepare and write values to sheet Dim Values As Variant ReDim Values(Parsed( "values" ).Count, 3 ) Dim Value As Dictionary Dim i As Long i = 0 For Each Value In Parsed( "values" ) Values(i, 0 ) = Value( "a" ) Values(i, 1 ) = Value( "b" ) Values(i, 2 ) = Value( "c" ) i = i + 1 Next Value Sheets( "example" ).Range(Cells( 1, 1 ), Cells(Parsed( "values" ).Count, 3 )) = Values Options If I try to edit a macro, I again get the message 'Microsoft Visual Basic Unexpected error quitting'. If you forget, Excel will remind you each time you try to save Latest update: Sometimes I blog things mostly so I can remember them and in the off chance that they might be useful to others. json file and load into sheet (Windows-only) ' (add reference to Microsoft Scripting Runtime) ' Dim FSO As New FileSystemObject Dim JsonTS As TextStream Dim JsonText As String Dim Parsed As Dictionary ' Read. Afterwards, you can open up the Personal Macro Workbook via the Visual Basic button on the Developer tab and delete whatever you record.
