To write to an excel spreadsheet, you need excel installed on the system.
Here is some code for you:
' Need to add Component "Microsoft Excel 9.0 Object Library"
' Declare object variables for Microsoft Excel,
' application workbook, and worksheet objects.
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
' Assign object references to the variables. Use
' Add methods to create new workbook and worksheet
' objects.
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets.Add
' Assign the values Fron double Matrix ExportData to
' Microsoft Excel cells.
Dim DataStartAtRow As Integer
xlApp.DisplayAlerts = False
'To set a singel cell>
xlSheet.Cells(1, 1).value = "Hello world!"
'To transfer a vector
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(5,5)) = myMatrix5x5
' Use the Formula method to add the values in
' Microsoft Excel.
' xlSheet.Cells(3, 1).Formula = "=R1C1 + R2C1"
' Save the Worksheet.
xlSheet.SaveAs exportFileName
' Close the Workbook
xlBook.Close
' Close Microsoft Excel with the Quit method.
xlApp.Quit
' Release the objects.
Set xlApp = Nothing
Set xlBook = Nothing
Set xlSheet = Nothing
Good luck!
/Andreas Lundgren - Sweden
"Nevo" <vi*********@bellsouth.net> wrote in message news:<As******************@bignews4.bellsouth.net> ...
Can I write to files, say for example, to an excel spreadsheet and have it
written in a certain order or in certain cells?
Thanks,
VAL