Hi everyone. I have been following the advice at String parsing formula and some other references for writing data to files, mostly applicable to chunk text files but I found the
Save Excel File()
function in the Scripting Index. I don't know what the last parameter means/does? It isn't explained. That is to say,
Separate Rows for Each Cell Statistic( 1 )
Is this important? It doesn't write anything to any file in the location I have specified whether this parameter is present or not.
Here is a rough outline of my script:
dt = Current Data Table();
c = Words(:ID, "_");
Write(c);
s = c[2] || "_" || c[3] || "_" || c[4] || "_" || c[5];
Write(s);
s << Save Excel File(
"$DOCUMENTS\temp.xlsx",
Separate Rows for Each Cell Statistic( 1 )
);
So I'm trying to remove the prefix, and keep the remaining four "word blocks" plus their underscores, which I am adding back via string concatenation manually. See string and variable concatenation for string concatenation "||" reference.
Anyway, no file shows up at $DOCUMENTS\temp.xlsx.
Also the, um, what's it called, terminal, window, log, is giving me the error
Subscript Range in access or evaluation of 'c[2]' , c[/*###*/2]
and I don't know why. No strings or columns are output as a result of the Write() statements I have included.
So basically nothing is working as it should. Square one, I suppose!
Let me know what tips you all can think up.
Cheers,
Mike