Japanese translated version 日本語版
You can convert files using the command line with two distinct methods:
[1] Using the 'Conversion Job' file (*.SII) as specified in the user interface
[2] Using the specific command line switches for each option
Both methods have their pros and cons. The first method can be the fastest to get you going. The second method is by far more powerful and flexible, however it requires a detailed understanding of all the options and switches associated with the options.
The easiest way to understand CSV to PDF conversions via the 'Convert XLS' command line is to first familiarize yourself with the process in the application's user interface. The first command-line approach utilizes a "conversion job" file, which stores your GUI-defined settings. To use this method, complete the following steps:
1. See and follow "How to convert CSV to a a well formatted PDF file with 'Convert XLS' user interface"
2. Once you've perfected the 'conversion job' within the user interface, go to the File\Save As\ menu item and save the conversion job. Save the 'conversion job' to: C:\In\CSV-to-PDF-Conversion-Job.SII
3. Create your command line using the /J switch, which points to the newly created 'conversion job' file.
ConvertXLS.exe /J "C:\In\CSV-to-PDF-Conversion-Job.SII"
/V
/J{ConversionJobFile} is the fully qualified path of the 'conversion job' file previously created within the graphical user interface.
[/V] OPTIONAL: Verbose mode. Specify this switch to display a message box indicating success or failure after the job has run. If a failure occurred a reason is usually displayed. See also /L.
[/L{LogFile}] OPTIONAL: Log file path and name (e.g. 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.
QUICK START: After installation of 'Convert XLS', you can try this out by using this command line:
%appdata%\Softinterface, Inc\Convert XLS\Demo Batch Files\CSVtoPDF.bat
Step 2. Copy contents to template.xlsx
Copy the contents of the csv file into the template using 'Convert XLS' Special Process 101.
ConvertXLS.exe /S"C:\in\input.csv" /T"C:\In\template.xlsx" /P101 /1 1 /2 0 /4 TRUE /5 A2:D100000 /6 1 /7 TRUE /8 A2 /V
/S = Input file (C:\In\input.csv)
/T = Output file (C:\In\template.xlsx)
/P101 = Specify special process 101
/1 1 = Specify what sheet to copy. Note: Normally this special process is
used to copy from Excel workbook to Excel workbook.
/2 0 = Specify what to copy. /2 0 = copy VALUES
/4 TRUE = Copy from specified range = TRUE
/5 A2:D100000 = Range to copy from. Note we're skipping the first row which is
a header row in the csv file.
/6 1 = Specify output sheet. We are
specifying to copy contents to the 1st sheet.
/7 Copy to specified range is
TRUE.
/8 Copy data starting at cell A2
/V Used for "V"erbose response. When Verbose
switch is used, the app will tell you how the process went with pop up dialog
boxes. You can remove this, as it is optional.
Step 3. Convert template.xlsx to output.pdf
Convert the template.xlsx to output.pdf.
ConvertXLS.exe /S"C:\in\template.xlsx" /T"C:\In\output.pdf" /M1 /C-1 /V
/S = Input file (C:\in\template.xlsx)
/T = Output file (C:\In\output.pdf)
/M = Conversion method to use. /M1
= Use MS Excel in this case.
/C-1 Specify output file type, PDF.
/V Used for "V"erbose response. When Verbose
switch is used, the app will tell you how the process went with pop up dialog
boxes. You can remove this, as it is optional.