All Command Line Switches

Full descriptions for each switch is shown below:

Switch

Meaning

/J{File}

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

/S{File}

Input (Source) File(s) to be converted.

 

A single file including its complete path can be specified for a single file conversion (i.e. "D:\MyExcelFiles\MyExcelFile.XLS".

 

If specifying a single file, make sure that the /T switch also specifies a single output file (i.e. "D:\MyExcelFiles\OutputOutput.CSV".

 

Alternatively, you can specify whole directories by using the wildcard syntax (i.e. "D:\MyExcelFiles\*.XLS"). If specifying a whole directory, make sure the /T also specifies a whole directory with a new output file extension. (i.e. "D:\MyExcelFiles\*.CSV").

 

See also /R for subfolders.

/F #

File type of the Input file(s). The input file(s) path are specified with the /S switch. This switch specifies the file type of these file(s).

 

Please see File Type Constants table for valid values.

/T{File}

Output (Target) file(s) to be created after conversion. These files are created from the Input file(s) and the conversion method selected.

 

If specifying a single file, make sure that the /S switch also specifies a single input file (i.e. "D:\MyExcelFiles\TargetOutput.DOC".

 

Alternatively, you can specify whole directories by using the wildcard syntax (i.e. "D:\MyExcelFiles\*.PDF"). If specifying a whole directory, make sure the /S also specifies a whole directory with an input file extension. (i.e. "D:\MyExcelFiles\*.DOC")

 

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

/C #

File type of the Output file(s). The output file(s) path is specified with the /T or /G switch. This switch specifies the file type of these file(s).

 

Please see File Type Constants table for valid values.

/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 their input folders. 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, specified file from within a folder. Use the /T switch instead.

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

Is used when converting to/from an Excel, CSV or fixed width text file. It specifies which Sheets to convert, what Range to convert and 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

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

/L{File}

Log file path and name (i.e. d:\mylogs\WCE.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, can be done at a later time, or with a different method. /B is different from /L, since the file generated with /B will not include extraneous comments not allowed in a 'Conversion Job' file. Save as a .SII file type so it can be loaded as a job.

/U

If converting an XLS file with multiple sheets specified, the /U switch will generate multiple files instead of a single file.

/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.

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 source Files. Refer to 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

All Command Line Switches