Board index » delphi » D5 and reading/writing to Excel97 cells
Anders Harvyl
![]() Delphi Developer |
Thu, 07 Mar 2002 03:00:00 GMT
D5 and reading/writing to Excel97 cells
Thank you Borland/Inprise for supplying OleServers in Delphi 5, and
examples of Word97 and Powerpoint 97 applications. Howevere there are no examples of Excel97 applications. WHY? It's (for me anyway) extremely difficult to find out how to make the very simplest example of just creating a worksheet and setting a cells value to 'foo' or just anything. My approach was something like: ... ExcelApplication1.Workbooks.Add(xlWBATWorksheet, lcid); ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks.Item[1]); ExcelWorksheet1.ConnectTo(_worksheet(ExcelWorkbook1.Sheets[1])); ExcelWorksheet1.Cells.Item[10, 10] := 'foo'; ... Running the application correctly opens Excel97 (if it is not already open), adds an empty Workbook, and an empty Worksheet. However the last call to "ExcelWorksheet1.Cells.Item[10, 10] := 'foo';" creates an exception "...No such interface supported...". HOW DO I SET the cellvalue with row number 10 and column 10 to "foo" (or whatever)? Is it really too much to ask for such an example from Borland/Inprise? OK, maybe there are some books on the issues, I could as a last resort accept that. Please name useful examples of sources where to find such examples! Regards Anders L. Harvyl |