Convert Excel XLSM to XLS

If you have trouble running these examples see Using the Command Line and Helpful Hints For Creating a Command Line.

The first example shows how to convert a XLSM to a XLS file.

Each switch shown in blue is described in detail below the examples. It is highly recommended you review each switches description before implementing the example, thereby giving you the full power of 'Convert XLS'.

You can easily change the examples below to handle XLSX files by changing all instances of "XLSM" to "XLSX" and changing all instances of "/F52" or "/F51". For XLSB files use the /M2 switch instead of /M1.

Example 1 (XLSM File to XLS)

To convert a single XLS file, C:\in\input.XLSX to a XLS file located in the C:\Out\ folder, the following syntax would be used:

 

ConvertXLS.EXE /S"C:\in\input.XLSM" /T"C:\Out\output.XLS" /C-4143 /F52 /M1 /V

 

To do the same using the 'Convert XLS' conversion method (extremely fast and MS Excel not required) change the /M1 switch to /M2 as shown below:

 

ConvertXLS.EXE /S"C:\in\input.XLSM" /T"C:\Out\output.XLS" /C-4143 /F52 /M2 /V

 

Example 2 (Convert a whole folder)

To convert a whole folder (and sub-folders) of XLSM files located in the C:\in\ folder to XLS files to be placed in the c:\Out\ folder, the following syntax would be used:

 

ConvertXLS.EXE /S"C:\in\*.XLSM" /T"C:\Out\*.XLS" /C-4143 /F52 /M2 /R /V

 

The /G switch can be used to tell 'Convert XLS' to place each output file in the same folder as each input file. Therefore the command line above is equivalent to the command line below:

ConvertXLS.EXE /S"C:\in\*.XLSM" /G /C-4143 /F52 /M2 /R /V

 

You may want to convert a whole folder and its sub-folders and place the output into a separate folder/drive. In which case use this syntax:

ConvertXLS.EXE /S"C:\in\*.XLSM" /T "C:\Out\*.XLS" /G /C-4143 /F52 /M2 /R /V

 

Sheet: Only used when an Excel file is the input file. Use "*" or "" for all sheets. You can use names of sheets, or the numeric index. If using numeric indices, you can specify ranges of sheets (i.e. "1,4,10-20" and "4-10,9" etc.). Range and DelimChar are optional.

Range: You could optionally specify a range, say if you only wanted to convert a portion of the input file. Use the same syntax as an Excel range (e.g. A1:B10).

DelimChar: is for specifying the ASCII value of the delimitation character used in a CSV file. 44 for comma, 124 for Bar "|", 9 for the tab etc.

FixedWidth: Here you can specify how to import/export a fixed width text file. Not used in this example.

Note: It is highly encouraged that you use the Verbose (/V) switch initially to see what the status of your conversion is and to help you perfect your command line. When in verbose mode the program will tell you what went wrong or right with your command line using message boxes.