Because of this excel is handling it as text, and I have to remove all whitespaces in excel. This does not happen when using exportData(). In ds.xml these numbers is of type localeInt. Is there a setting I can use to have the same behavior in exportClientData()?
SmartClient Version: v9.1p_2018-03-27/PowerEdition Deployment (built 2018-03-27)
SmartClient Version: v9.1p_2018-03-27/PowerEdition Deployment (built 2018-03-27)
Code:
private HeaderControl getExportToFileControl() { return new HeaderControl(HeaderControl.SAVE, getExportToFileHandler()); } private ClickHandler getExportToFileHandler() { return new ClickHandler() { public void onClick(ClickEvent event) { exportToFile(ExportTool.getExportProperties()); } }; } protected void exportToFile(final DSRequest dsRequestProperties) { final ResultSet resultSet = mGrid.getOriginalResultSet(); if (resultSet.allMatchingRowsCached()) { mGrid.exportClientData(dsRequestProperties); return; } mHandler = resultSet.addDataArrivedHandler(new com.smartgwt.client.data.events.DataArrivedHandler() { @Override public void onDataArrived(com.smartgwt.client.data.events.DataArrivedEvent dataArrivedEvent) { mGrid.exportClientData(dsRequestProperties); removeHandler(); } }); resultSet.getRange(0, resultSet.getLength()); } public class ExportTool { public static DSRequest getExportProperties(){ DSRequest dsRequestProperties = new DSRequest(); dsRequestProperties.setExportAs(ExportFormat.OOXML); dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); return dsRequestProperties; } }
Comment