hello team,
I want to export date into csv file.
Everything woks fine, but i have header name into csv file - how I can remove this ?
I tried to find any doc about it but no success. (also how I know smartgwt uses apache poi for generating excel and csv files. I can't find any example how to remove headers using poi.)
Also all items are into double quotes like that :
"ID","NAME","LASTNAME","AGE"
"1","paata","lominadze","31"
"2","petre","giorgadze","35"
how I can remove double quotes ?
my client code looks like :
____________________
Regards,
Paata Lominadze
I want to export date into csv file.
Everything woks fine, but i have header name into csv file - how I can remove this ?
I tried to find any doc about it but no success. (also how I know smartgwt uses apache poi for generating excel and csv files. I can't find any example how to remove headers using poi.)
Also all items are into double quotes like that :
"ID","NAME","LASTNAME","AGE"
"1","paata","lominadze","31"
"2","petre","giorgadze","35"
how I can remove double quotes ?
my client code looks like :
Code:
final DataSource dataSource = DataSource.get("StudentsDS"); DSRequest dsRequest = new DSRequest(); dsRequest.setExportAs((ExportFormat) EnumUtil.getEnum( ExportFormat.values(), ExportFormat.CSV.toString())); dsRequest.setExportDisplay(ExportDisplay.DOWNLOAD); dsRequest.setOperationId("getStudents"); dsRequest.setExportFields(new String[] { "ID", "NAME","LASTNAME", "AGE"}); dsRequest.setExportResults(true); Criteria criteria = new Criteria(); dataSource.exportData(criteria, dsRequest, new DSCallback() { @Override public void execute(DSResponse response, Object rawData,DSRequest request) { } });
Regards,
Paata Lominadze
Comment