Hello,
i do have a string in a Livecycle Designer script object with a couple of rows with different entries divided by a semicolon:
COLUMN1;COLUMN2;COLUMN3
Entry1;Entry2;Entry3
Entry4;Entry5;Entry6
The goal is now to export this string from Livecycle Designer into a CSV file by clicking a button. Is there any solution suggested?
Thank you very much.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You can try creating a dataObject and then exporting it, you might get some warning messages popup but try this;
var csvData = "COLUMN1;COLUMN2;COLUMN3\r\n";
csvData += "Entry1;Entry2;Entry3\r\n";
csvData += "Entry4;Entry5;Entry6\r\n";
var pdf = event.target;
pdf.createDataObject("Data.csv", csvData);
pdf.exportDataObject({cName: "Data.csv"});
If you replace the last line with
pdf.exportDataObject({cName: "Data.csv", nLaunch: 2});
It will open in whatever .csv is registered for (Excel on my system)
Regards
Bruce
Views
Replies
Total Likes
Hi,
You can try creating a dataObject and then exporting it, you might get some warning messages popup but try this;
var csvData = "COLUMN1;COLUMN2;COLUMN3\r\n";
csvData += "Entry1;Entry2;Entry3\r\n";
csvData += "Entry4;Entry5;Entry6\r\n";
var pdf = event.target;
pdf.createDataObject("Data.csv", csvData);
pdf.exportDataObject({cName: "Data.csv"});
If you replace the last line with
pdf.exportDataObject({cName: "Data.csv", nLaunch: 2});
It will open in whatever .csv is registered for (Excel on my system)
Regards
Bruce
Views
Replies
Total Likes
Perfect thank you, it works like a charm!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies