Hello
Somebody knows a way to put data data in an Excel file without open Excel,the file exists yet , only need add data to the file.
I try to do it with DDE, but i need to open Excel always. And I want to skip this step ( Open Excel)
Would opening Excel in such a way that the user doesn't see that it is open work for you? If not you may have to encapuslate an office automation object which might be a bit of work.
The Sprezzatura Group
World Leaders in all things RevSoft
You could always append to a *.csv file using dir() and osopen and osbwrite, seq() and char().
The BIFF file format is documented in the "Excel Developers Kit" available from Microsoft Press.
http://sc.openoffice.org/excelfileformat.pdf will probably be the most help to you.
Alternative 1…
If you are just creating an Excel file from scratch, and not using a previously created file, then you can do this by creating a CSV format file, and saving it in OI with a XLS extension.
When the file is opened it will default to Excel because of its file extension, and the CSV will automatically feed to the proper columns.
Alternative 2…
I do things slightly differently, although you still need to start Excel, because Excel is needed to write Excel files unless you have your own driver, which is very tricky.
I write commands to a TXT file with cell positions and information on what commands to run.
I then call a VB program which reads the TXT file, opens the Excel COM interface, creates or updates the file, and then optionally closes.
By using COM the Excel file updates actually use Excel itself, so that the file information is updated properly, and you have access to all the formatting commands.
Doing this is no simple matter, and I may write a white paper on the methods involved if there is a need.
Colin
]]saving it in OI with a XLS extension
Barry