-
Notifications
You must be signed in to change notification settings - Fork 2
Convert to Strict Using Excel Macro
Asbjørn Skødt edited this page Aug 3, 2022
·
3 revisions
WORK IN PROGRESS
Bulk convert spreadsheets to .xlsx Strict conformance by using Excel macro. The macro saves each spreadsheet in the input directory as a converted .xlsx with Strict conformance in the output directory.
Sub Spreadsheet_to_Strict()
ChDir "AN INPUT DIRECTORY VALUE FROM A CELL"
Workbooks.Open "ANALYSIS.XLS" // THIS NEEDS TO ITERATE EACH SPREADSHEET IN FOLDER
Workbooks("Strict.xlsm").RunAutoMacros xlAutoOpen
ActiveWorkbook.SaveAs Filename:= _
"AN OUTPUT DIRECTORY VALUE FROM A CELL + ORIGINAL FILENAME MINUS EXTENSION & ".xlsx"", FileFormat _
:xlOpenXMLStrictWorkbook, CreateBackup:=False
ActiveWorkbook.Close
End Sub