Page 1 of 1

Setting the default CSV Separator for exports

Posted: Tue May 16, 2023 9:10 pm
by compuaid
Is there a way in Stimulsoft Reports.JS to set the default CSV separator to comma rather than semi-colon? We would like for our users to not have to remember to change the setting to a comma when they choose to export Data from the Stimulsoft Viewer.

Re: Setting the default CSV Separator for exports

Posted: Wed May 17, 2023 12:54 pm
by compuaid
I found the answer to this using ChatGPT! Here is the code it provided:

Code: Select all

// Create an instance of the CSV export settings
var csvSettings = new Stimulsoft.Report.Export.StiCsvExportSettings();

// Set the separator character to a comma(,)
csvSettings.separator = ',';

// Assign the CSV export settings to the report
report.exportSettings = csvSettings;


Re: Setting the default CSV Separator for exports

Posted: Wed May 17, 2023 4:58 pm
by Lech Kulikowski
Hello,

Thank you for the information.