| Author |
Export To Excel Using DTS - Please Help
|
|
| Chris van den Heuvel 2005-07-26, 1:23 pm |
| I have a table in Excel with about 4000 records which I need exported to an
Excel Spreadsheet. This has to be triggered via an ASP.NET app via the web.
I have been trying to use DTS but some wierd things happen.
1) All the numeric columns in the table are recorded as strings in Excel.
Thus we cannot do math functions on them.
2) The export always inserts a blank row before writing the data to the
worksheet.
Does anyone have some working code on moving data between SQL Server 2000
and Excel? VBScript or DTS would be fine. Thanks
| |
| Allan Mitchell 2005-07-26, 8:24 pm |
| We have a few articles about pitfalls in Excel using DTS but if you are in
ASP.Net and you simply want to move data to Excel then what makes you want
to do this using DTS as opposed to coding .Net?
Troubleshooting
(http://www.sqldts.com/default.aspx?222)
Also search on the site for Excel.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Chris van den Heuvel" <vandench@fireblade.ca> wrote in message
news:eiyvqugkFHA.4024@TK2MSFTNGP10.phx.gbl...
>I have a table in Excel with about 4000 records which I need exported to an
>Excel Spreadsheet. This has to be triggered via an ASP.NET app via the web.
>I have been trying to use DTS but some wierd things happen.
>
> 1) All the numeric columns in the table are recorded as strings in Excel.
> Thus we cannot do math functions on them.
> 2) The export always inserts a blank row before writing the data to the
> worksheet.
>
> Does anyone have some working code on moving data between SQL Server 2000
> and Excel? VBScript or DTS would be fine. Thanks
>
>
| |
| Chris van den Heuvel 2005-07-26, 8:24 pm |
| Allan:
The only thing I wanted to avoid was having to install Excel on the
webserver. If there is a way to do the export from .Net without referencing
the Excel object then I would love to know. That shoudl solve all the
problems.
"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:%23xoSIThkFHA.4004@TK2MSFTNGP10.phx.gbl...
> We have a few articles about pitfalls in Excel using DTS but if you are in
> ASP.Net and you simply want to move data to Excel then what makes you want
> to do this using DTS as opposed to coding .Net?
>
> Troubleshooting
> (http://www.sqldts.com/default.aspx?222)
>
>
> Also search on the site for Excel.
>
>
>
> --
>
>
>
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
> www.konesans.com - Consultancy from the people who know
>
>
> "Chris van den Heuvel" <vandench@fireblade.ca> wrote in message
> news:eiyvqugkFHA.4024@TK2MSFTNGP10.phx.gbl...
>
>
| |
| Allan Mitchell 2005-07-26, 8:24 pm |
| All you should need is MDAC as you do need to use the Excel interface per se
do you?
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
"Chris van den Heuvel" <vandench@fireblade.ca> wrote in message
news:OwxdgnhkFHA.3164@TK2MSFTNGP15.phx.gbl...
> Allan:
>
> The only thing I wanted to avoid was having to install Excel on the
> webserver. If there is a way to do the export from .Net without
> referencing the Excel object then I would love to know. That shoudl solve
> all the problems.
>
>
> "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
> news:%23xoSIThkFHA.4004@TK2MSFTNGP10.phx.gbl...
>
>
| |
| Chris van den Heuvel 2005-07-26, 8:24 pm |
| I've been trying to use the ADO.NET OLEDBConnection and associated objects
to write to the excel file but to no avail. I have tried naming ranges, with
columns headers, ithout column headers...Nothing seems to work...That is why
I tried the DTS route...
"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:urlaq0hkFHA.3336@tk2msftngp13.phx.gbl...
> All you should need is MDAC as you do need to use the Excel interface per
> se do you?
>
> --
>
>
>
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
> www.konesans.com - Consultancy from the people who know
>
>
> "Chris van den Heuvel" <vandench@fireblade.ca> wrote in message
> news:OwxdgnhkFHA.3164@TK2MSFTNGP15.phx.gbl...
>
>
| |
|
|
|
|