All Command Line Switches

Full descriptions for each switch are shown below in order of importance:

Switch

Meaning

/J{File}

Specify a 'Conversion Job' file (*.SII) to be done. You must have previously created a 'Conversion Job' file to use this switch.

/S{File}

Input File(s) to be converted.

 

A single file including its complete path can be specified for a one file conversion. For example:

/S"D:\MyExcelFiles\MyExcelFile.XLS

If specifying a single file, make sure that the /T switch also specifies a single output file. For example:

/T"D:\MyExcelFiles\OutputOutput.CSV"

 

Alternatively, you can specify whole directories by using the wildcard syntax. For example:

/S"D:\MyExcelFiles\*.XLS"

If specifying a whole directory, make sure the /T also specifies a whole directory. For example:

/T"D:\MyExcelFiles\*.CSV"

 

See also /R for subfolders.

/F #

File type of the input file. The input file path is specified with the /S switch.

This is only required when using the 'Convert XLS' conversion method (as specifed by /M2).

Please see File Type Constants table for valid values.

/T{File}

Output File(s) to be created. A fully qualified path is recommended surrounded by double quotes. Date/Time fields can be used.

 

See the /S{File} switch description for proper use of the /T{File} switch when specifying a single or multiple files to convert.

 

This switch is ignored if the /G Switch is used.

/C #

Specifies what the output file type is. You must supply a number for the # symbol. For all possible numbers see File Type Constants.

/M #

Specifies the Conversion Method to be used. The following values are valid:

 

1 = MS Excel (Default value)

2 = 'Convert XLS'

 

Always specify this switch when converting files.

 

See Conversion Methods for additional details for selecting this value.

/G

Save files to the same location as the input folder(s). Use this instead of /T to place the converted files in the same folder as the input file. Cannot be used when converting a single file. For a single file use the /T switch instead.


Files will be saved with the same name as the input but with a different file extension as specified by the /C# switch.

You cannot specify a different name for the output file when using the /G switch.

/N"{Sheet^Range^DelimChar^FixedWidth ^Profile}"

/N is used when converting to/from an Excel, CSV or fixed width text file. It specifies which sheets to convert, what range to convert, what delimitation/separation character to use, and the method to import export to a fixed width text file. The syntax for this parameter is critical, the items are separated by a carrot character "^". If you do not include Sheet, Range or DelimChar by leaving them blank they will default to all sheets, all used ranges and the comma delimitation character. Be certain to include the double quotation character around this parameter.

 

Sheet: 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 is specific to Excel, CSV or Fixed width text files only. You can specify a range of cells to convert using standard Excel syntax (e.g. "A1:B10")

 

DelimChar is for specifying the delimitation character used in a CSV file.

 

For example to specify sheets "Apples" and "Oranges", with a Range of "A2:B20" and using a tab (ASCII decimal value of 9) as a separation character the syntax would be:

 

/N"Apples,Oranges^A2:B20^9"

 

FixedWidth: Here you can specify how to import/export a fixed width text file. The following numeric values are valid:

0 = Auto size column widths to fit all data (Default)

1 = Use same widths as specified in the Excel file

2 = Use widths specified by the Profile. Widths can be specified in the user interfaces Fixed Width Text Profile Editor.

Profile = If you are specifying a fixed width text profile to use do it with this parameter. Use the Fixed Width Text Profile Editor to generate a profile. The full path to the txt file could be used. As an example if you want to specify to convert sheets called 'Apples' and 'Oranges', and use the range "A2:B20" and a fixed width text file profile named MyFixedWidth you would do so like this:

/N"Apples,Oranges^A2:B20^^2^MyFixedWidth"

/E"{UseDoubleQuotes^ UseCustomXML^ RootNode^ RowNode^ PDFOptimization^ PDFFromPage^ PDFToPage^ PDFIgnorePrintAreas^ PDFIncludeDocProperties}"

This parameter is used for additional conversion options and compliments /N. Several things are handled in this parameter. The syntax for this parameter is critical, the items are separated by a carrot character "^" and you may not omit any carrots. Be certain to include the double quotation character around this parameter.

UseDoubleQuotes: 0=Never, 1=Sometimes, 2=Always

UseCustomXML: TRUE to enforce custom XML attributes for the Row and Root nodes, else use FALSE

RootNode: Name of the root node. Used if bUseCustomXML is TRUE

RowNode: Name of the row node. Used if bUseCustomXML is TRUE

PDFOptimization: 0 standard, 1 = Minimize for web usage.

PDFFromPage: Page number to start the PDF or XPS output file. Leave blank or set to 0 to start at the beginning.

PDFToPage: Page to end the PDF or XPS output file. Leave blank or set to 0 to go to the end.

IgnorePrintAreas: TRUE to ignore print areas, else FALSE

PDFIncludeDocProperties: TRUE to include document properties, else FALSE

A typical string might look like the following:

/ E "0^TRUE^MyRoot^myRow^0^0^FALSE^FALSE^"

Omitting the /E switch will set the PDF Optimization off (not minimized file size), from and to pages will be from the beginning and to the end, Print Areas will be ignored and Document Properties will not be included.

/V

Verbose mode. Specify this switch to display a message box indicating how the conversion went. See also /L and /K

/R

Recursive sub folders. Seek out and do all files found in the sub-folders specified in the /S switch.  You may add this switch if you are processing whole folders of files. See /S and /G for more details on selecting whole directories to be converted.

/L{File}

Log file path and name (e.g. /L"D:\MyLogs\MoreInfo.LOG"). If this switch is specified a log file with the given path and name will be created and the results of the conversion will be written to it. See also /V and /K.

/B{File}

Save the Log file as a 'Conversion Job' ONLY IF ERRORS OCCURRED. This is useful if the files that had problems, they can be done at a later time, perhaps with a different method. /B differs from /L, since the file generated with /B will not include extraneous comments not allowed in a 'Conversion Job' file. Use the *.SII file type extension so it can be loaded as a job.

/U

If converting a Workbook (XLS or XLSX) file with multiple sheets specified, the /U switch will generate multiple files instead of a single file.

The /N swtich must be used to specify which sheets to convert.

/U is only applicable when using the built in 'Convert XLS' conversion method (/M2)

/D

The Treat values as text (i.e. leave leading zeroes intact) option allows you to treat data that has leading zeroes as text only allowing you to retain the leading zeroes. NOTE: This option is only applicable when using the 'Convert XLS' conversion method (i.e. /M2).

/W{PasswordToOpenInputFile(s)}

Password to open the input file.

/X{PasswordToWriteToInputFile(s)}

Password to allow for the writing to the input file.

/Y{PasswordToOpenOutputFile(s)}

Password to open the output file.

/Z{ PasswordToWriteToOutputFile (s)}

Password to allow for the writing to the output file.

/H

If converting from XLS to something else and using the 'Convert XLS' conversion method (/M2) you can optionally specify to include values along with formula, much like "MS Excel" conversion method does.

/I{File}

Use a specified (and not the default) initialization file for 'Convert XLS'. This allows you to be able to specify all settings that are in the user interface from the command line, which is especially useful for those few items not available through specific command line switches. The default initialization file created by the program while running the user interface can be used as a template (see below to locate the file). You can modify the ini file created by the program and rename it to whatever you want for use in the command line.

 

Note: You can find the default ini file created by running the user interface. Go to the help\about menu item. Double click on the Softinterface logo. Then from within notepad go to the file\save as menu item to see where it is on your system. Typical locations are:

 

Before Windows Vista:

See the installation folder

c:\program files\softinterface, inc\convert xls\cx_searchHistory.ini

Windows Vista, 7 and newer:

See:

%appdata%\Softinterface, Inc\Convert XLS\

 

c:\users\Name\AppData\Roaming\Softinterface, Inc\Convert XLS\cx_searchHistory.ini

/P #

Special Process Identifier. An integer, which tells 'Convert XLS' which special process to apply to the input files. See Specifying a 'Special Processing' Task for details.

/1{Parameter1} … /n{Nth Parameter}

See: Specifying a 'Special Processing Task'. 1 to n number of extra parameters may be required depending on the 'Special Task' being done.

/K

Specify an ERRORLEVEL (return code) upon closing the application. The following ERRORLEVELs are possible:

3 = Missing or invalid command line arguments

2 = Error occurred during conversion

1 = Shareware expired

0 = Success

See also /L and /V

All Command Line Switches

 

See also:

Using The Command Line

Helpful Hints for Creating a Command Line

Specifying a 'Conversion Job' File (Easiest way to do command line)

Specifying a 'Conversion Task'

Specifying a 'Special Processing' Task

Special Process File Type Constants

Excel Conversion File Type Constants