Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is there any way to create excel doc using script techniques without having office or ms excel itself installed (the way you can create mdb not having ms access) Regards Piotr |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unlike an access MDB which can exist without any user content (tables etc),
an Excel workbook must have at least one worksheet in it. You can use the Jet provider to create it with vbscript. I have the code in JScript: var ADO = WScript.CreateObject('ADODB.Connection'); /* Note \\ */ ADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\XLSCreateJSx.XLS;Jet OLEDB:Engine Type=23;Extended Properties=Excel 8.0"); ADO.Execute("CREATE TABLE [APL DATA] (fldText Char,fldDate Date,fldDouble Double,fldCurrency Currency,fldBoolean Bit,fldMemo LongChar)"); ADO.Execute("INSERT INTO [APL DATA] VALUES('Ajay','01/01/2004', 32.45,90,1,'Long Text')"); ADO.Execute("INSERT INTO [APL DATA] VALUES('Askoolum',32767, 32.45,90,0,'Long Text')"); ADO.Close; ADO=null "piotr" wrote: Hi, Is there any way to create excel doc using script techniques without having office or ms excel itself installed (the way you can create mdb not having ms access) Regards Piotr |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks,
Użytkownik "AA2e72E" napisał w wiadomo¶ci ... Unlike an access MDB which can exist without any user content (tables etc), an Excel workbook must have at least one worksheet in it. You can use the Jet provider to create it with vbscript. I have the code in JScript: var ADO = WScript.CreateObject('ADODB.Connection'); /* Note \\ */ ADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\XLSCreateJSx.XLS;Jet OLEDB:Engine Type=23;Extended Properties=Excel 8.0"); ADO.Execute("CREATE TABLE [APL DATA] (fldText Char,fldDate Date,fldDouble Double,fldCurrency Currency,fldBoolean Bit,fldMemo LongChar)"); ADO.Execute("INSERT INTO [APL DATA] VALUES('Ajay','01/01/2004', 32.45,90,1,'Long Text')"); ADO.Execute("INSERT INTO [APL DATA] VALUES('Askoolum',32767, 32.45,90,0,'Long Text')"); ADO.Close; ADO=null "piotr" wrote: Hi, Is there any way to create excel doc using script techniques without having office or ms excel itself installed (the way you can create mdb not having ms access) Regards Piotr |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating PDF No Longer Works in Any Office Product | Excel Discussion (Misc queries) | |||
creating new microsoft office excel spreadsheet | Excel Discussion (Misc queries) | |||
Opening Office 2003 excel file in Office Excel 2007 | Excel Discussion (Misc queries) | |||
Office 2000/Office 2003 Excel not printing landscape vise versa | Setting up and Configuration of Excel | |||
I cannot load Excel from Office, a problem creating XLStart? | Setting up and Configuration of Excel |