Hello Experts,
Actually I Wrote code to unprotect the Excel file to perform operations on that file , the code is as Like below
ExcelApplicationClass_l := ExcelApplicationClass_l.ApplicationClass;
ExcelWorkbook_l := ExcelApplicationClass_l.Workbooks.Open(FileNameP,0,FALSE,5,'4540','',TRUE,1,'Chr(9)',TRUE,FALSE,0,TRUE,1,0);
ExcelWorkbook_l.Unprotect('4540');
ExcelWorkbook_l.SaveAs(FileNameP,ExcelXLFileFormat_l.xlOpenXMLWorkbook,'','',FALSE,FALSE,ExcelXLSaveAsAccessMode_l.xlNoChange,ExcelXLSaveConflictResoultion_l.xlUserResolution,FALSE,'','',TRUE);
ExcelWorkbook_l.Close(FALSE,FileNameP,FALSE);
ExcelApplicationClass_l.Quit;
By using this code my Excel file is saving without Password , but I need to Save file with password after performing operations on that Excel file.
Can any one Suggest me how can I save Excel file with Password.
Thank you.