RE: Dataset to excel by NoSpamMgbworld
NoSpamMgbworld
Fri Jul 14 07:51:01 CDT 2006
If this is a web application, you simply need to create an HTML table (a
DataGrid works well) AND changing the MIME type of the output. If this is not
a web app, it really depends how in depth you wish to go. You could still use
the web app as a poor man's retrieval mechanism and then save as binary. You
can use an Excel shell and save using the Jet provider for OLEDB or you could
use one of the third party libraries for creating Excel. If this is a smart
client, VSTO (Visual Studio Tools for Office) give you a good set of objects
to create Office files. You can also use wrapped versions of the Excel
libraries and code that way.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Reggie" wrote:
> Hi and TIA! I have a recordset retrieved into a datgrid in my web app, from
> an SQL database that I want to save as an excel formatted file. I would
> like the user to click a button, get a prompt to save/name the file. Is
> this possible and if so where can I find information on accomplishing this
> task. Any advice is appreciated. Using (.Net 1.1 / VS2003 / SQL Server
> 2000 / WinXP Pro). I posted to several groups cause not sure the best place
> to ask the question.
> Thanks for your time.
>
>
> --
>
> ******************
> Reggie
>
>
>
>