I am working on a Delphi project, where i need to export values to excel sheets.
My project supports two ways of accomplishing this:
1) using thied party dll that manages the sheet creation
2) using built in dde, and executing commands over this.
Both ways work nice, but now i want to add support for exporting images to excel sheets. using the first way, this was easily accomplished.
My question is how can I add images to excel sheet, using a DDE command? A full list of all supported dde commands, would also be appreciated. I have come to this but it doesn’t seem to solve my problem….
Figuring out the proper syntax for OLE communication with Excel can be a real pain or impossible. I’ve never found complete documentation on how to do it from Delphi. I usually end up doing a lot of trial and error testing, adding and removing parentheses and square brackets, etc. It doesn’t help that the error messages from Excel for ill-formed syntax are worthless.
I’d suggest that you consider a hybrid approach where you use Delphi to start macros in Excel, previously poking arguments into a hidden (xlVeryHidden) worksheet if necessary. You can then do everything in VBA, which opens up a world of sample code and support (MrExcel.com forums are an excellent source of help, for example.)
You’re aware of Deborah Pate’s site, no: http://www.djpate.freeserve.co.uk/AutoExcl.htm