>Faye,
>
>
>
>>
>> I am trying to export the data which is an arrayCollection in Flex to
>> Excel. I followed this article,
>> http://viconflex.blogspot.com/2007/02/export-data-from-flex-app-using.html,
>> and got all the components working. Now the last step is to make the data
>> (arrayCollection) available in #arguments.data#, I guess.
>>
>
>I'll need a little more explanation. Your original example was a ColdFusion
>query. Now you say it's data coming from Flex.
>
>Is it being created from scratch in Flex? Didn't it originate as server-side
>data?
>
>ColdFusion is just Java under the hood, and you'll find you'll use many of
>the same patterns.
>
>If you can walk us through the process - basically, how did Flex get the
>data, how was it manipulated, and such - what it's returning - we can
>probably help. It would also help to know what's supposed to happen with the
>spreadsheet. Is it to be displayed, just saved, or what?
>
>As much detail as you can provide on the steps in the process, please.
>
>
>-- 
>Thanks,
>
>Tom
>
>Tom McNeer
>MediumCool
>http://www.mediumcool.com
>1735 Johnson Road NE
>Atlanta, GA 30306
>404.589.0560





The Flex datagrid page calls getAllAsStruct method in CustomerGateway.cfc which 
returns the array to Flex. 

                        private function buttonHandler():void {
                                roWildcard.getAllAsStruct();
                        }
        <mx:RemoteObject id="roWildcard"
                         destination="ColdFusion"
                         
source="DeptApps.Statistics.Faye.stardust.cfc.CustomerGateway"
                                         showBusyCursor="true"
                         result="resultHandler(event)"
                         fault="faultHandler(event)"/>  
The array is displayed here,
                <mx:DataGrid id="dg" dataProvider="{roResults}" width="100%" 
height="100%"/>

Then, I am calling the exportToExcel method in Export.cfc which is supposed to 
get the array from the above. It will return a boolean. 
                        private function test():void{   
                                exportManager.exportToExcel("" +        "" +    
    
                                        "The application has successfully 
exported this file    " +        
                                        "Eventually the actual data will be 
passed into this function" +        
                                        "");
                        }

If the above is true, I will then call a cfm file to spit it out.

<cfsetting enablecfoutputonly="true" showdebugoutput="No">
        <cfheader name="Content-Disposition" value="attachment; 
filename=export.xls"/>
        <cfcontent type="application/vnd.ms-excel" reset="true"/>
        <cfscript> 
                WriteOutput(session.exportData);
        </cfscript>
<cfexit />

We want to allow the user to choose where to save their data when it opens 
excel.

My problem is, session.exportData is not tied in with the result from 
getAllAsStruct method in CustomerGateway.cfc

It brings up Excel allowing to choose the location to save the file but the 
spreadsheet opens up with no data.

I hope this helps to clear up some confusion.

Thank you again.

Faye Larson,
Dallas


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340582
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to