I want to send Array data into the argument of Execute Macro

Hi, I’m new to UiPath and I am practicing to use VBA in UiPath
But now, I am facing this problem.
I want to send String Array data type into the MacroParameters of Execute Macro.
I tried everything BUT I DON’T KNOW HOW
please help me

Regards,

For your Infomation,

myArray = string[4]
{
string[3]
{
string[2]
{
null,
null
},
string[2]
{
null,
null
},
string[2]
{
null,
null
}
},
string[3]
{
string[2]
{
“B2-1”,
“B2-2”
},
string[2]
{
“C”,
“C”
},
string[2]
{
“D”,
“D”
}
},
string[3]
{
string[2]
{
“B3-1”,
“B3-2”
},
string[2]
{
“C”,
“C”
},
string[2]
{
“D”,
“D”
}
},
string[3]
{
string[2]
{
“B4-1”,
“B4-2”
},
string[2]
{
“C”,
“C”
},
string[2]
{
“D”,
“D”
}
}
}

@js.an - Can you check the Data Type of the myArray variable?

Hi
Here it is

@js.an - Looks like it’s unable to handle multi-dimensional arrays. What I’d do is to pass the argument as a serialized string:

And then use this VBA utility to parse back to Array: GitHub - VBA-tools/VBA-JSON: JSON conversion and parsing for VBA

Don’t forget to add the Microsoft Scripting Runtime library if you haven’t yet:
image

Hope this helps you!

1 Like

Thank you! :smiling_face_with_three_hearts:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.