Einzelnen Beitrag anzeigen

nahpets
(Gast)

n/a Beiträge
 
#7

AW: Excelvorlage als .xlt öffnen

  Alt 8. Sep 2015, 10:35
nach https://msdn.microsoft.com/de-de/lib...ice.11%29.aspx müsste der 10 Parameter auf True gesetzt werden.

ungefähr so?
Delphi-Quellcode:
procedure TDBForm.DBGrid1DblClick(Sender: TObject);
var excel : Variant;
    datei : String;
begin
  If (Table1.FieldByName('DFExt').asstring = '.xlt') or
     (Table1.FieldByName('DFExt').asstring = '.xltx') then begin
    Excel := CreateOleObject('Excel.Application');
    Excel.Visible := True;
    Datei:=Table1.FieldByName('DFNAMEPATH').AsString;
    Excel.Workbooks.Open(Datei, emptyParam, emptyParam, emptyParam, emptyParam,
                        emptyParam, emptyParam, emptyParam, emptyParam, true,
                        emptyParam, emptyParam, emptyParam,emptyParam, emptyParam);
  end;
end;
  Mit Zitat antworten Zitat