I create, fill and save an Excel file via OLE automation in Delphi. When saving it, a password is automatically added to the file ("0").
FexclplctnXLApp.ActiveWorkbook.SaveAs(
FAvailSaveName, xlWorkbookDefault,
varEmpty,varEmpty, varEmpty, varEmpty, varEmpty, varEmpty,
varEmpty, varEmpty, varEmpty, varEmpty, lcid);
VarEmpty seems to be the issue here, it's value is "0". I tried also with '', with the same result.
SaveAs
and specifying a blank password, as invWorkbook := WorkBook; vWorkBook.SaveAs(FileName := 'SomeWorkBook', PassWord := '')
, vWorkBook being an OleVariant. – MartynA