Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export a datagrid to Excel file in Flex?

How do I export data in my datagrid to an Excel file in Flex?

Can anyone provide some examples for that? I am browsing but couldn't find out a single example of that kind.

EDIT

Browsed a lot and found out how to convert datagrid data to csv format. Now How to convert that to excel? Is there a way to do that without using any server script ? Can't it be done in Flex alone?

like image 828
Angeline Avatar asked Nov 02 '09 09:11

Angeline


People also ask

How do I export datagrid to excel?

Right click on your project and select Add Reference menu. After that go to COM tab and select and add Microsoft Excel 12.0 object library. Now here is my Button click event handler where I create Excel object and document, get data from DataGridView and add rows and columns to the document. app.

How do I export data from Appian to excel?

From the palette on the left, under Appian Smart Service expand Documentation Generation and drag the Export Data Store Entity to Excel smart service to the canvas. Alternatively, type the word "export" in the search box above the palette, this will filter the list of smart services containing this word.


1 Answers

There is as3xls for you to write xls file. It only support a single sheet(but I think that's fine).

But I think using csv or html as stated by @susichan and @Rafal Ziolkowski will be more simple if you do not need to use excel functions (like cell formula).

Oh, and there is csvlib for writing csv. For html, do it like writing XML will be fine.

like image 147
Andy Li Avatar answered Sep 20 '22 11:09

Andy Li