kmp2x
15 years agoNew Contributor
Exporting data to an Excel or other file
I've been looking around and cannot find how to do this. My test generates some data at a certain point that I need to store, preferably in a file and not as a variable, so as to access it later with a different script. However I can't find how to do this - the DDT help files talk a lot about retrieving input data, but not writing output data. I was hoping to find some examples of this before I started mucking about on my own, are there any? I was thinking it might be as simple as inverting the assignments - for example, instead of
[jscript]
var drv2 = DDT.ExcelDriver(Files.FileNameByName(DriverFile), 'TestDriver', false);
TestData = drv2.Value("TestDataCol");
to read in, I would just do
drv2.Value("TestDataCol") = TestData;
to write out. Will that work? What about creating columns in the spreadsheet as I go? It doesn't have to be a XLS, a simple CSV will work fine too, but I can't find anything in the help on this.
Any help would be appreciated.
[jscript]
var drv2 = DDT.ExcelDriver(Files.FileNameByName(DriverFile), 'TestDriver', false);
TestData = drv2.Value("TestDataCol");
to read in, I would just do
drv2.Value("TestDataCol") = TestData;
to write out. Will that work? What about creating columns in the spreadsheet as I go? It doesn't have to be a XLS, a simple CSV will work fine too, but I can't find anything in the help on this.
Any help would be appreciated.