
Writing Excel-files w/o Excel present?
Thanks to Simon and Earl for their input.
I forgot to mention that my employer doesn't have Excel (!) Here, all the
office application are Lotus-products (mostly, with the exception of MS
Project). So I can't use OLE to write the Excel format through Excel97 (or
whatever).
However, I have made a small test-project where I try to create these files
through Lotus123 97, I just need to learn a little more about how to call
the methods in Lotus from VB (specifically, I can't yet select a range,
because of some strange (IMHO) syntax). My macro (script in Lotus lingo)
recorder gives me this code to do some stuff:
---code snippets start here---
'Folk4.TXT is a Tab-separated ASCII-file
'In Lotus 1-2-3: Open a file, the next code segment should be on one line
CurrentApplication.OpenDocument
"G:\PROSJEKT\ENERGI\EMSU\SOURCE\UtrTest\Folk4.TXT",,"Text
(TXT;PRN;CSV;DAT;OUT;ASC)",,False,True,True
'"Rewritten" in VB: Open a file, the next code segment should be on one line
(oLotus123 is an object which is instanced and this line works, too :))
oLotus123.application.opendocument
"G:\prosjekt\energi\emsu\source\utrtest\folk4.txt", "", "Text
(TXT;PRN;CSV;DAT;OUT;ASC)", "", False, True, True
'...do some stuff...
'In Lotus 1-2-3: Select a cell
[A:A1..A:F8192].Select
'"Rewritten" for VB, none of the next lines work
oLotus123.application.activedocument.currentsheet.[A:A1..A:F8192].Select
oLotus123.application.activedocument.[A:A1..A:F8192].Select
oLotus123.application.[A:A1..A:F8192].Select
oLotus123.[A:A1..A:F8192].Select
---code snippets end here
For now I'm stumped! We might just try out (and maybe buy) that DLL that
Earl mentioned in his posting.
Best regards, Trond Solberg
Quote:
> <lots of stuff about not being able to format an exported Excel file
> properly>
--
My opinions are my own, and do not reflect the views and/or policies of my
employer.