Create a xls File on Server without Excel?

M

Milosz

hi i have to export some databases to a xls File with DTS and VBA on
MIcrosoft SQL Server 2000.
in Dts it is not very difficult but i have to do this dynamicly. So
have to create a new xls File with Scripting FileSystemObject
but on the server is no Excel Application.
u know how i can do this?
i have mayby a solution but then i have to delete the value of the fil
before a job, otherwise the file will be bigger and bigger.
any ideas?
th
 
J

Jamie Collins

Milosz wrote ...
hi i have to export some databases to a xls File with DTS and VBA on a
MIcrosoft SQL Server 2000.
in Dts it is not very difficult but i have to do this dynamicly. So i
have to create a new xls File with Scripting FileSystemObject
but on the server is no Excel Application.
u know how i can do this?

You can use the Microsoft OLE BD provider for Jet to dynamically
create an Excel workbook. Specifying a non-existent but valid path,
workbook name and Excel 'table' in a SELECT..INTO query results in it
being created. See:

Microsoft Knowledge Base Article - 295646
HOWTO: Transfer Data from ADO Data Source to Excel with ADO
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q295646

However, I have so far been unable to do the same when using the SQL
Server provider and specifying a non-existent Excel element using
either the OPENROWSET or OPENDATASOURCE functions.

Jamie.

--
 
Top