Datagrid to Excel

  • Thread starter Thread starter Morten Snedker
  • Start date Start date
M

Morten Snedker

I wish to save the data of a grid to Excel. But there is a little
twist to it:

The user should immidiatly get the "Save as.." dialog.

1. I don't wish to save the xls-file serverside.
2. I don't wish to show the xls to the user on-screen.

Is what I ask for possible? Or am I missing out on a more proper
approach?

Help is greatly appreciated. Thx in advance.


Regards /Snedker
 
To show excel on-screen, you can have

Response.AddHeader("content-disposition", "inline; filename=" +
"yourExcelFile.xls");

HTH

Elton Wang
(e-mail address removed)
 
On Tue, 14 Jun 2005 13:15:09 -0700, "Steve C. Orr [MVP, MCSD]"

Just what I needed. Thank you.

/Regards
 
I ended up with a XML-document that i simply gave the XLS-extension..
bit of a cheat, but it works like a charm ;-)

Regards /Snedker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top