Export to Excel from server side

Hello All,
I am trying to get the Export to Excel functionality work from the server side.
I already have the servlet which writes the response data, with the correct header for excel.
But when i make an Ajax request with my grid data on to this servlet, i do not see the save dialogue poping up.

I tried using the isUpload:true, option in my request but still no luck.

I do see data being sent on to server.
But cant find a way to get the save dialog for excel.
Even with iframe approach how do i pass the whole grid data to the server, Passing data in the request query may be limited.