a) if I don't specify returnFormat in my CFC, what format does cfgrid
data come back as? (JSON, WDDX?).
A naked call to a CFC usually returns WDDX.  However, if you are binding
to it with a cfgrid, returnformat=json is probably being added to the
URL.

b) how can I convert the javascript object into a coldfusion object?
You don't.  At least, not on the client side you don't.  

c) or should I be doing something totally different :-)
Yes, I think you are barking up wrong creek with your paddle.  If you
want you export the data to Excel I think you should make regular call
back to the server (not ajax) and that call should return an Excel file
for the browser to handle however it saw fit.  The Excel can be
generated by simply outputting HTML tables and using cfcontent to tell
the browser what it is, or you can get a native Excel file with Ben
Nadel's POI utility or CFSpreadsheet if you are on CF9.  

The trick is that you probably want your current CFC you are using for
your ajax call to be reusable so you don't have your query in two
places.   You can do this by having the actual call in a service that
both your Ajax CFC and your export to Excel page call so both "views"
are using the same service.  Depending on what your Ajax CFC returns,
you might be able to simply invoke and get its results back as a native
CF result set in your Excel export page.  The nice thing about CF is the
eleventy billion ways you can get different data back from the same CFC.

~Brad


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328568
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to