Specifying a 'Conversion Task'

If you must get started quickly use the following section to find an example and modify according to your needs:

Examples For Conversion of Files

 

The syntax for the command line for specifying a conversion task is:

ConvertXLS /S{Input File(s)} /T{Output File(s)} /F# /C# [/M#] [/G] [/V] [/R] [/U] [/D] [/W{PW}] [/X{PW}] [/Y{PW}] [/Z{PW}] [/N"{Sheets^Range^DelimChar^Profile}"] [/E"{ lUseDbleQuote^XMLoptions^PDFoptions}"] [/L{LogFile}] [/B{LogToJobFile}"]

 

Items above enclosed in square brackets "[ ]" are optional, all other switches are required. Therefore /S for example, should always be specified on the command line when specifying a conversion task.

Command line switches are case sensitive, therefore /S is valid and /s will not work.

You can include or exclude spaces between switches and parameters. For example, "/C6" is the same as "/C 6".

For long file names (e.g. a path or file name with spaces in it, or longer than 8.3 format) you are required to use double quotes. For example:

ConvertXLS.exe /S "C:\Input Folder\My Input.XLS"/F-4143 /T"C:\out\B.CSV" /C6 /M1

 

Switches:

/S{Input File(s)} is used to specify which files to convert. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.XLS"). /T{Output files} should always be different from /S{Input File(s)}.

 

/T{Output File(s)} is used to specify where to save the converted file(s) to. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.XLS"). /T{Output files} should always be different from /S{Input File(s)}. Date/Time Fields are allowed.  When /G (save to input folder) is specified, the /T switch is not necessary.

 

/F# tells 'Convert XLS' what file type the Input file (/S{Input File}) is. This is only required when using the 'Convert XLS' conversion method /M2. For all constants see Excel Conversion File Type Constants.

 

[/C#] tells 'Convert XLS' what the file type to convert the /T{Output File(s)} files to. For all constants see 'Special Process' File Type Constants and Excel Conversion 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 doing file conversion

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. Only use this switch if you are specifying a whole folder of files to convert. Use the /T switch instead.

 

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

 

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

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

 

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

This parameter 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, the method to import export to a fixed width text file and the fixed width profile to use. 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.

A typical string may look like this:

/N "Sheet1^ ^0^0^MyFixedWidthTextProfile"

Please see All Command Line Switches for a more thorough discussion of /N, and the examples for conversion of files.

[/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 including the use of double quotes, and custom xml/pdf settings. 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.

A typical string might look like the following:

/ E "0^TRUE^MyRootNode^myRowNode^0^0^FALSE^FALSE^"

Please see All Command Line Switches for a more thorough discussion of /E, and the examples for conversion of files.

 

[/L{LogFile}] 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

[/B{LogToJobFile}] 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.

 

See also:

Using The Command Line

Helpful Hints for Creating a Command Line

Examples For Conversion of Files

Examples For Applying Special Processes

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

Specifying a 'Special Processing' Task

Special Process File Type Constants

Excel Conversion File Type Constants

All Command Line Switches