Problem exporting to Excel under Firefox

When exporting the contents of my grid to Excel, it works fine under IE but under FireFox, any blank cell in the grid (eg, ) shows up in Excel as a garbage character: Â

Attached are sample .xls files from IE vs. Firefox… running against same server and same data.

Code in my servlet looks like this:

public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String xml = request.getParameter(“grid_xml”);
xml = URLDecoder.decode(xml, “UTF-8”);
(new ExcelWriter()).generate(xml, response);
} (3.16 KB)

This is the XML coming down from the client:

Please double-check the data which you are loading in grid.
Component itself must not place any extra content in the export data, but if data xml of grid contains some non-printable characters it may look as empty cells in html, but will be converted to special chars during export process.

But why would it work from IE but not Firefox … running against the same server / same grid / same data (e.g., side-by-side)… one produces good XLS file and one produces bad.

IE and XML uses different xml parsers ( components, which is built in in browser )
One of them can exclude non printable whitespace chars, while second one, can preserve them

This issue is fixed by new version of dhtmlxgrid_export.js found in: