Posted on 2004-08-26
I am having difficulties with formating cells in Excel. I tryed to use the ExcelApplication component and also
I tryed through OLE, but some things work and some don't.
I need to do an Excel report from delphi . Something like this:
I have a StringGrid filled with values. I need to export it to excel . Before the data from the grid I need to insert some lines (in Excel) with text...
I need to set some text in the header, and footer. And then Print preview, and save excel file
Open Excel (invisible)
On Sheet1 do
enter some text in CELL['A5']
enter the date from the StringGrid starting with CELL['A7']
enter some text after the data from the StringGrid
Format Cells (AutoFit, Numberformat for the fields that are numeric, Font, Borders)
Save and PrintPreview
I need working code... because theory I read enough.
And by the way I use MS Office 2003 on the computer that I am working at.