Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Export Data To CSV (Without column titles and double quote)

    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 :
    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

    #2
    Hello,

    Have you find how to remove double quotes ? also header name ?

    Thanks,

    Comment

    Working...
    X