![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 (AT) fireblade (DOT) ca> wrote in message news:eiyvqugkFHA.4024 (AT) TK2MSFTNGP10 (DOT) 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 |
#4
| |||
| |||
|
|
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 (AT) no-spam (DOT) sqldts.com> wrote in message news:%23xoSIThkFHA.4004 (AT) TK2MSFTNGP10 (DOT) 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 (AT) fireblade (DOT) ca> wrote in message news:eiyvqugkFHA.4024 (AT) TK2MSFTNGP10 (DOT) 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 |
#5
| |||
| |||
|
|
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 (AT) fireblade (DOT) ca> wrote in message news:OwxdgnhkFHA.3164 (AT) TK2MSFTNGP15 (DOT) 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 (AT) no-spam (DOT) sqldts.com> wrote in message news:%23xoSIThkFHA.4004 (AT) TK2MSFTNGP10 (DOT) 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 (AT) fireblade (DOT) ca> wrote in message news:eiyvqugkFHA.4024 (AT) TK2MSFTNGP10 (DOT) 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 |
#6
| |||
| |||
|
|
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 (AT) no-spam (DOT) sqldts.com> wrote in message news:urlaq0hkFHA.3336 (AT) tk2msftngp13 (DOT) 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 (AT) fireblade (DOT) ca> wrote in message news:OwxdgnhkFHA.3164 (AT) TK2MSFTNGP15 (DOT) 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 (AT) no-spam (DOT) sqldts.com> wrote in message news:%23xoSIThkFHA.4004 (AT) TK2MSFTNGP10 (DOT) 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 (AT) fireblade (DOT) ca> wrote in message news:eiyvqugkFHA.4024 (AT) TK2MSFTNGP10 (DOT) 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |