BOAO List V17, the number of units square meters and cubic meters are superscript display. In order to make it easy to distinguish after printing, you should change it to "M2" and "M3" after exporting Excel, as required by your boss.
VBS BULK CODE Modification:
Option ExplicitIfWscript.Arguments.Count =0 ThenWScript.EchoChr(Ten) & _ "[correct operation]"&Chr(Ten) &Chr(Ten) & _ Chr(9) &"drag and drop an exported Excel file into this program"&Chr(Ten) &Chr(Ten) & _ "[Error Action]"&Chr(Ten) &Chr(Ten) & _ Chr(9) &"Double-click this program"Wscript.QuitEnd IfDimXlsfilepathxlsfilepath=wscript.arguments (0)DimWshellSetWshell=CreateObject("Wscript.Shell")If LCase( Right(Wscript.fullname, One)) ="Wscript.exe" ThenWshell.run"CScript.exe//nologo"& _ Chr( +) & _ Chr( the) & Wscript.scriptfullname &Chr( the) & _ Chr( +) & _ Chr( the) & WScript.Arguments (0) &Chr( the) Wscript.QuitEnd IfWScript.Echo"running, please wait ..."DimOexcel,oworkbook,sheet on Error Resume NextSetoexcel =GetObject(,"Excel.Application")IfErr ThenWScript.Echo Err.Description Err.ClearSetoexcel =CreateObject("Excel.Application") oexcel.visible=FalseEnd IfSetOworkbook =OExcel.Workbooks.Open (Xlsfilepath)IfErr ThenErr.Clear wshell.popup"The specified file could not be opened for the following possible reasons:"&Chr(Ten) & _ "1. Microsoft Office 2003, 2007, 2010, or later versions are not installed on this computer. "&Chr(Ten) & _ "2. Files that need to be processed are open or occupied by other programs, please close the file and re-use the program. ",Ten,"Tips", -+4096Wscript.QuitEnd If on Error Goto 0Oexcel.displayalerts=FalseDimCurrentpathcurrentpath=CreateObject("Scripting.FileSystemObject"). GetFile (Wscript.scriptfullname). Parentfolder.path for eachSheetinchoworkbook.worksheets sheet.activate WScript.Echo"Replace:"&sheet.name OExcel.Cells.Replace"㎡","m2",2,1,False,False,FalseOExcel.Cells.Replace"","m2",2,1,False,False,FalseOExcel.Cells.Replace"","M3",2,1,False,False,FalseOExcel.Cells.Replace"Extended Rice","m",2,1,False,False,FalseNextOworkbook.worksheets (1). SelectoWorkbook.SaveoExcel.DisplayAlerts=TrueOworkbook.closeSetoexcel = NothingSetOworkbook = NothingWshell.popup"after a period of bloody battle, finally took care of all the unit replacement. ",Ten,"Boao Unit Replacement", -
BOAO Inventory export Excel after unit bulk substitution