Thema: Delphi DElphi<>Excel ??

Einzelnen Beitrag anzeigen

Vader

Registriert seit: 6. Mai 2003
804 Beiträge
 
Delphi 6 Enterprise
 
#3

Re: DElphi<>Excel ??

  Alt 19. Jun 2005, 07:59
hallo,

hab mich einmal in der suche schlaugemacht über excel und oleserver,
hab da ein beispiel gefunden das genau das wäre was ich suche, aber
wenn ich das prog kompilieren will kommt die fehlermeldung beim
code öffnen der exceldatei ??

Delphi-Quellcode:
procedure TForm1.btnOpenFileClick(Sender: TObject);
var
  FExcelFilename : OleVariant;
begin
  FExcelFilename:=ExtractFilePath(ParamStr(0))+'Quelle.xls';
  ExcelApplication.Workbooks.Open(FExcelFilename,EmptyParam,EmptyParam,EmptyParam,
                                  EmptyParam,EmptyParam,EmptyParam,EmptyParam,
                                  EmptyParam,EmptyParam,EmptyParam,EmptyParam,
                                  EmptyParam,FLCID);
  ExcelWorkbook.ConnectTo(ExcelApplication.Workbooks.Item['Quelle.xls']);
  ExcelWorksheet.ConnectTo(ExcelWorkbook.Sheets.Item['Tabelle1'] as _WorkSheet);

  btnReadCell.Enabled:=True;
end;

Delphi-Quellcode:
[Warnung] Unit1.pas(93): Symbol 'Range' ist plattformspezifisch
[Fehler] Unit1.pas(104): Undefinierter Bezeichner: 'EmptyParam'
[Fataler Fehler] Project1.dpr(5): Verwendete Unit 'Unit1.pas' kann nicht compiliert werden

mfg vader
  Mit Zitat antworten Zitat