Einzelnen Beitrag anzeigen

Benutzerbild von sx2008
sx2008

Registriert seit: 15. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#3

AW: Abfragen ob Excel Datei einen Passwortschutz hat

  Alt 6. Jul 2012, 20:48
Hier noch ein kleiner Trick zur besseren Lesbarkeit.
Mit einer Konstanten wird die Absicht gleich viel klarer:
Delphi-Quellcode:
const
  EMPTY_PASSWORD = '';
begin
try
  Excel.Workbooks.Open(ListBox_XLS_Errors.Items[i], emptyParam, emptyParam, emptyParam,
        EMPTY_PASSWORD, emptyParam, emptyParam, emptyParam, emptyParam, emptyParam,
        emptyParam, emptyParam, emptyParam, emptyParam, emptyParam, _lcid);
  Mit Zitat antworten Zitat