Using Studio 2020.4.1 When I use ExcelApplicationScope and pass it “c:\foo.xlsx” it works fine. but if I store that same string as an object in a datatable
| “key” string | “value” object |
Using AddDataRow, then later pull it out again using LookupDataTable, placing it into a string variable, when I use WriteLine to look at that variable it appears identical to the one above. However when I now use that variable in ExcelApplicationScope it now gives me:
Excel Application Scope: The given path’s format is not supported.
Nor does…
“C:\foo.xlsx”.Equals(my_pulled_out_variable)
evaluate to True.
I’ve tried taking what comes back out of the datatable as an object. then doing .ToString() on that and storing the result into a seperate string variable. Still not working.
OK I think my pain was just I had picked up hidden character from somehow, So when I was assigning into the datatable I was always putting the hidden character into it. I’m thinking maybe a \b backspace character or something.
Coupled with also starting off by doing “c:\\dev\\boo.xlsx” using the Assign activity when I just needed to do “c:\dev\boo.xlsx” which I also got confused about. So I didn’t need to use an additional object variable in the end.
Ahh my fixing commit shows rogue characters at the start, when I was assigning to the variable… so it was a case of unicode Byte Order Mark header (BOM header) striking again.