Hi,
One more option is there. Iterate datagrid's data and construct them in
html table form. Once you have htmlTable string, just use some server side
languages(php,java...) to export htmlTable content into excel file.
To make clear understanding:
(eg)
*htmlTable content:*
<table border="1"><thead><tr>....
.......................
</tr></thead><tbody>
*sending data to server:
* var variables:URLVariables = new URLVariables();
variables.htmltable = convertDGToHTMLTable(dataSource);
variables.filename = fileName;
var u:URLRequest = new URLRequest( <urlExcelExport> );
u.data = variables; //Pass the variables
u.method = URLRequestMethod.POST;
navigateToURL(u,"_self");
*In server side(Java):*
String data = request.getParameter("htmltable");
String filename = request.getParameter("filename");
response.setContentType("application/octet_stream");
response.setHeader("content-disposition","attachment;
filename="+filename+".xls");
out.println("<html><body>"+data+"</body></html>");
Hope it will be useful.
Thanks
Oviyan
On Fri, Sep 24, 2010 at 11:39 PM, VPN <[email protected]> wrote:
> Try as3xls google code project.
>
> On Sep 24, 11:40 am, Gaurav <[email protected]> wrote:
> > Hi,
> > I want to export datagrid data with all it's attributes (like colours,
> > font size etc) to a excel file. Is it possible to do it, will anyone
> > help me regarding this. Thank you
> >
> > Reg,
> > Gaurav
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
--
Regards,
Oviyan
Blog : http://www.oviyas.blogspot.com/
contact : +91 - 91762 72633
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.