I translated the VB stuff into JavaScript; open NotePad, copy what follows
and paste into the NotePad session and save it under any name but with an
extension JS.
0 /*AA: Create an XLS file without Excel.Application */
1 var ADO = WScript.CreateObject('ADODB.Connection');
2 /* Note \\ */
3 ADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\zXLSCreateJSx.XLS;Jet OLEDB:Engine Type=23;Extended
Properties=Excel 8.0");
4 ADO.Execute("CREATE TABLE [APL DATA] (fldText Char,fldDate Date,fldDouble
Double,fldCurrency Currency,fldBoolean Bit,fldMemo LongChar)");
5 ADO.Execute("INSERT INTO [APL DATA] VALUES('Ajay','01/01/2004',
32.45,90,1,'Long Text')");
6 ADO.Close;
7 ADO=null;
NOTES:
1. You need to remove the line numbering in the first column; I've added
them so avoid confusion with line wraps in the newsgroup window.
2. Engine Type and Excel 8.0 refers to a version of Excel; this is fine for
2003.
3. Once you have saved the JS file, locate it within Windows Explorer and
double click on it. If you have not disabled WScript, the file
C:\zXLSCreateJSx.XLS should appear; you should also open it with Excel and
confirm for yourself that Excel can open it.
4. Line 4.0 is necessary; otherwise you may end uo with an XLS that Excel
cannot open. Obviously, the worksheet is not required BUT you may add
specific amd relevant information to it and just leave it in.
I'd like to know how you got on!