:: Forum >>
How to export actiwidget datagrid?
Hi,
I want all the data present in activewidget datagrid to open in a xls and save it in my local maachine, it will be better if i could give option of save and open at the first click at export button.
Thanks.
dundun
Monday, November 13, 2006
Karl Thoroddsen
Monday, November 13, 2006
Hi carl,
My question is how to download data from datagrid to my local system (in .xls or.csv format) and the link you have given that is relevant for uploading data from local system to aw datagrid.
Please check.
Thanks.
dundun
Monday, November 13, 2006
As the linked thread says: You cannot download data from the datagrid, Javascript is not allowed to communicate with the local file system.
You'll have to use the method given above.
Karl Thoroddsen
Monday, November 13, 2006
There is another option ... but it does make some assuptions.
On my page, I have an AW grid that is customizable (to a degree). Once the data is displayed as the user wants it, they can click a "print" function that opens another browser and generates an HTML view of the data - that they can print.
OR
If your users support ActiveX controls, you can initiate an ActiveX call, open MS Excel, and write the grid data directly to the spreadsheet.
It does work. I have a js function in my page called "toExcel()" that handles it. But, like I said, it makes some assumption - users support ActiveX (and allow it) and in our case, they have my domain "trusted" (since our data is secured. Oh, one additional note - Firefox does not current support ActiveX controls - so this will not work for Firefox users (at least the last time I looked at Firefox)
Below is a link (and you can look at the source code to find the Excel function). Note, right now the page only supports IE (I have to make some changes so the CSS works in Firefox.
https://www.pjm.com/planning/project-queues/queue-gen-active.jsp
You will see the Excel icon just above the grid and to the right of the print icon.
Carl
Monday, November 13, 2006
This topic is archived.
Back to support forum
Forum search