Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default creating excel doc without office

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default creating excel doc without office

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default creating excel doc without office

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating PDF No Longer Works in Any Office Product Mark Excel Discussion (Misc queries) 3 March 1st 10 01:13 AM
creating new microsoft office excel spreadsheet Paul Excel Discussion (Misc queries) 4 July 20th 09 09:19 PM
Opening Office 2003 excel file in Office Excel 2007 Joel Excel Discussion (Misc queries) 1 July 3rd 09 05:56 AM
Office 2000/Office 2003 Excel not printing landscape vise versa BAHTTEXT in English text Setting up and Configuration of Excel 1 April 17th 06 01:37 PM
I cannot load Excel from Office, a problem creating XLStart? Ian Setting up and Configuration of Excel 0 February 13th 06 08:41 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"