How to retreive Excel Documents via jQuery's $.ajax()?

How to retreive Excel Documents via jQuery's $.ajax()?

Hi there!

I've written a GUI which represents data from a DB. Each row has a
table-head with its own "search" field in there, so you can filter the
displayed data.

To realize this, I use $.ajax() and I post the serialized data from
these inputs. I retrieve a JSON object to update the current view.
This works perfectly, but now, I also want to send the "current view"
as an Excel Spreadsheet.

In order to realize this, I use the PEAR Spreadsheet class and I send
the Excel Document instead of the json_encoded array, but the problem
is, that the Excel Document will not be send; I just receive the
"source code" from this Document.

I think I have to alter the dataType option of the $.ajax() method, so
the headers will be correct, but I don't get the trick....


Thanks for your help!

regards!