Creating files in filestore from Excel post process script
-
Hey, this may seem like a crazy idea but I've reasoned it :)
Hypothetical question, would it be possible to manipulate the contents of a file from an excel post process script? My excel report currently generates a pretty big report and based on that report I'd like to be able to pull some data out and dump it into individual CSV or Excel files.Thoughts?
-
Hi psysak,
It is of course possible! CSV would be easier than Excel, since CSV is so akin to text. Something like,
//untested var outputFile = new java.io.File("/path/to/outputFile"); var writer = null; try { writer = new java.io.FileWriter( outputFile, false /* append */); writer.write("This is a string of output!\n"); } catch(error) { writer.close(); throw error; } if(writer !== null) writer.close();
-
As always, thank you sir
-
Certainly! It probably would have been a better answer has I used,
var outputFile = new java.io.File("/path/to/Mango/filestore/filestoreName/outputFile")
though!
-
The @phildunlap answer bot, now with automated self debugging