Gary, thanks for your reply. It is a client side file.
The link you provided gives a way to write to excel file. This definitely covers the latter half of the goal.
Could you please provide any example for JavaScript or JQuery. I've very little idea about this part.
I would not like to be spoon-fed but an example would be great.

Besides, I guess, the server sends back the data to web browser as "post" method is used. Will it be possible to use "get" method and communicate directly to the server directly.

Thanks