ich übernehme Daten in Excel und setze visible=true - sehe aber nur den "Excel- Kopf" ohne Tabelle. Wenn ich Excel schliesse und speichere, und wieder per Hand öffne ist die Tabelle mit Daten da - warum ? Die erste Zeile ist doch eingelesen ? (fnam[] sind string[25])
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
| Try ExcelApplication1.Connect; Except MessageDlg('Excel nicht verfügbar !',mtError, [mbOk], 0); Abort; End; ExcelApplication1.Visible[0]:=True; ExcelApplication1.Caption:='Excel Application'; ExcelApplication1.Workbooks.Add(Null,0); ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks[1]); ExcelWorksheet1.ConnectTo(ExcelWorkbook1.Worksheets[1] as _Worksheet); ... for i:=1 to fanz do ExcelWorksheet1.Cells.Item[1,i].value:=fnam[i]; |