Export data in excel format
Is this possible to export grid data in excel format?
Currently we can export data in CSV and PDF format.
CSV can be imported to Excel. Excel format is not a documented format, so no we cannot export to it.
Excel means .xls file.
There may be a issue if I export a grid data which contains comma,semicolon or any special character then after impoting this to Excel, It may not open in desired format.
There may be an issue, but the csv format should quote or escape those things appropriately. As noted, .xls isn't a documented/open format, so it's not really possible to build something that creates xls. The normal method is to create csv.
Actually .xls is a documented/open format: jqwidgets actually supports xls output: http://www.jqwidgets.com/jquery-grid-export-to-excel/ The format is documented here: http://blogs.msdn.com/b/brian_jones/archive/2005/06/27/433152.aspx
That being said, someone would have to write an implementation to create an exporter for this. We could alternatively have an optional dependency upon something like this: http://jordiburgos.com/post/2013/javascript-export-to-excel.html
That's interesting, wasn't aware of that. I do think that csv suits most purposes though - exporting to .xls just adds complexity I would have thought.
that would be awesome if someone implements this functionality. most of the companies uses excel export. and most of the grid components of various companies have this export function. i think ui-gird must have this function as well.
We are open to pull requests to add enhancements.
+1
+1
This is a useful request, but not really in the current roadmap. We have far too many good ideas in the repository already, giving the impression that we have a project riven with defects.
Accordingly, I am leaving the enhancement tag on this, but closing it. If someone would like this functionality, we'd welcome a pull request that adds it.
+1
+1
+1
+1
+1
+1
+1
Maybe saving the html as xls would be enough?
Example from: http://jordiburgos.com/post/2013/javascript-export-to-excel.html
somedata.xls
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>undefined</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>
<tbody><tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</tbody></table></body></html>
+1
+1