CodePudding user response:
Excel developer referenceWorkbook.
SaveAs methodAll show
All hidden
Save the workbook in a different file changes,
Syntax
Expression. SaveAs (FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local)
CodePudding user response:
This is not a PB method of dw is Excel Workbook. The SaveAs method!!!!!!!!!!CodePudding user response:
Can test, the following code, test environment pb12.5 + office2016String ls_file="d: \ 111. XLS"
Dw_list. Saveas (ls_file excel8! , true)
//ActiveSheet. ProtectPassword:
=641112 '
The integer li_value
Oleobject ole_excel
Ole_excel=create oleobject
Li_value=(" excel. The application "https://bbs.csdn.net/topics/ole_excel.connecttonewobject
If li_value & lt; & gt; 0 then
Gnv_base. Of_message (" connection EXCEL failed, please check ")
The return - 1
End the if
Ole_excel. Workbooks. Open (ls_file)
String ls_file2="d: \ 222. XLS"
Ole_excel. ActiveWorkbook. SaveAs (ls_file2, 56, '1234')
Ole_excel. Quit ()
Ole_excel. Disconnectobject ()
Destroy ole_excel
CodePudding user response: