Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

VBA RPC JSON, import_survey - Problem

2 years 2 weeks ago #213094 by WilliPuhdlich
Dear all,
I successuflly used various sources to get VBA-Scripts in Excel done to automate things using our LimeSurvey-instance Version 3.25.4+201215 (e.g. manual.limesurvey.org/index.php?title=Re...149236#VBA_for_Excel ).

So I thought about importing surveys via VBA-Scripts using method import_survey - but fail.
The framework accesses the instance successfully, gets the session key, releases it, exports answers and so on, but import_survey fails.
I send
sendtext = "{""method"":""import_survey"",""params"": [""" + key + """,""" + ImportData64 + """,""" + DocumentType + """ ],""id"": 1}"
with key=session_key, ImportData64 is the Base64-Coded imported data from a valid LSS-Surveyfile, DocumentType is "lss"

It is a small LSS for testing purpose to avoid side effects like timeouts but the response is always:
{"id":null,"result":null,"error":"unable to decode malformed json"}

I am not able to check the Base64-encoding, but I checked the file-contents being read and it is the LSS-JSON-formatted contents like expected.
Am I missing any prerequisitions for the input formatting or so?
Anybody able to give me a hint to get it running?
Thanks in advance.

Thanks for helping!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose