Select to view content in your preferred language

Export to Excel Issue after findTask/Query Task

845
6
06-21-2011 04:21 AM
tanyabisen
Emerging Contributor
I have an attribute information display in an InfoWindowrender.. is it possible to export those attibutes into Excel

Or.. after I perform querytask is it possible to export the selected graphics attribute information into an Excel
Tags (2)
0 Kudos
6 Replies
CaseyBentz
Frequent Contributor
Yes, this is possible. You would have to add a button somewhere that would take the information and send it to a utility that would create the excel/csv file. There is a library out there called as3xls. I have used this to export the contents of a datagrid to an excel file. I am under a deadline, so this is about all the information I can give to you.

Here is a link to a thread I posted

http://forums.arcgis.com/threads/2784-New-Export-to-Excel-from-Datagrid
0 Kudos
tanyabisen
Emerging Contributor
Thank you for your quick response..I am using the same thread which you have provided..I just wanted to know what is that utility and how can I do it.. Since I am new to this platform..if you can provide me with some link where I can send it to that utility..rest I can manage..

Thanks,
Tanya
0 Kudos
CaseyBentz
Frequent Contributor
I am going to just go from memory here...First you need to download the swc. You then will want to add it to your project via the properties for your project --> Flex Build Path --> Library path tab --> Click on Add SWC and select the file you just downloaded. If you then reference the zip file I uploaded it will give the the two mxml files as3xls.mxml and vBox.mxml. The as3xls just references the vBox file. The vBox file does all the work, as you can see the exportToExcel function is what actually exports the data grid. If say, you don't have a datagrid, and only have the contents of the info window. You could create a datagrid in actionscript and step through the attributes of the graphic and add them to an arraycollection and use that arraycollection as the dataprovider of the datagrid and then export the datagrid to Excel.

Casey
0 Kudos
tanyabisen
Emerging Contributor
Thanks Casey.. It worked... 🙂
0 Kudos
PetrTrefil
Deactivated User
Please,

describe more, how to reference ZIP file ? What do you mean ?
Thanks
0 Kudos
tanyabisen
Emerging Contributor
The link which is provided in the forum you can download the zip file.. After you download it,in you Flash Builder instead of creating a new Flex project just import the Flex project...It will ask you to import the zip file..

This way you can create a new project just by downloading the zip file..Hope this helps
0 Kudos