Hello,
a new version is available here: http://www.tcoq.org/composants, correcting glitches and adding improvements (see below).
A direct link to the download is here:
http://www.tcoq.org/SpreadsheetInterface_sources_V0.11.zip
Show quoted text 6 lines
N? of rows and columns not yet implemented. I could have them next
week-end.
My usual practice is to loop on the cells in a given row or column
until a
condition is met, for example 'end' in the cell value, or '' empty.
New functions are introduced on the ISheet interface: GetLastColumn and GetLastRow. That should help you. It took me a little time: I coded them in both Excel and OpenOffice.
Show quoted text 15 lines
Some remarks.
There is something wrong with TWorkBook.Close. When I have
DisplayAlerts=TRUE then it always ask "File FALSE.xlsx already exists.
overwrite it ?". Maybe it should have DISPID_CLOSE instead of
DISPID_SAVEAS.
What should look like the correct procedure for closing Excel without
save file ?
I use:
ExcelWb.Close(false); // Close with DISPID_CLOSE
ExcelApp.Quit;
You're right. This is corrected. The Close now calls DISPID_CLOSE. You should Save or SaveAs the workbook before closing, or set displayalerts to false if you wish to close without saving.
and Excel process still exists untl I close my app.
With DISPID_CLOSE I see that the process releases some memory
(probably correctly closes sheet) but the process still exists (hangs?).
Yes, I don't why yet. Certainly a bug in the interface somewhere. It doesn't happen for OpenOffice, though. I'm still looking into it. In the meantime, there should be no remaining compiler warnings or hints, except in the Pas_Uno_Bridge (needs some investigating).
I hope this helps,
Best regards,
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110213/c88dd85f/attachment.html>