ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Export data in excel format

Open debayan31 opened this issue 11 years ago • 37 comments

Is this possible to export grid data in excel format?

Currently we can export data in CSV and PDF format.

debayan31 avatar Jun 18 '15 04:06 debayan31

CSV can be imported to Excel. Excel format is not a documented format, so no we cannot export to it.

PaulL1 avatar Jun 18 '15 04:06 PaulL1

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.

debayan31 avatar Jun 18 '15 06:06 debayan31

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.

PaulL1 avatar Jun 18 '15 11:06 PaulL1

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

JLLeitschuh avatar Jun 20 '15 01:06 JLLeitschuh

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.

PaulL1 avatar Jun 20 '15 03:06 PaulL1

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.

uguryilmaz avatar Jun 30 '15 08:06 uguryilmaz

We are open to pull requests to add enhancements.

JLLeitschuh avatar Jun 30 '15 14:06 JLLeitschuh

+1

sunz7 avatar Oct 23 '15 23:10 sunz7

+1

bjaraujo avatar Oct 30 '15 09:10 bjaraujo

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.

PaulL1 avatar Nov 18 '15 07:11 PaulL1

+1

Mastanka avatar Dec 31 '15 15:12 Mastanka

+1

sidd06 avatar Jan 05 '16 10:01 sidd06

+1

Incognito-Nemo avatar Jan 31 '16 18:01 Incognito-Nemo

+1

KennedyIhe avatar Mar 14 '16 16:03 KennedyIhe

+1

laviyatziv avatar Mar 24 '16 16:03 laviyatziv

+1

dishant8 avatar Apr 06 '16 18:04 dishant8

+1

ganesh-vellanki avatar Apr 07 '16 14:04 ganesh-vellanki

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>

bjaraujo avatar Apr 21 '16 07:04 bjaraujo

+1

chrisruddick avatar May 03 '16 18:05 chrisruddick

+1

anasanzari avatar Jun 01 '16 14:06 anasanzari