The Excel to CSPro tool can be run from the command line, either in an automated way or by bringing up a specification file for modification. Assuming that CSPro was installed to the default directory, the tool is likely found here:
"C:\Program Files (x86)\CSPro 8.0\Excel2CSPro.exe"
If you want to open a specification file, simply provide it as the argument to the tool, as in:
"C:\Program Files (x86)\CSPro 8.0\Excel2CSPro.exe" "My Specifications File.xs2cs"
If you want to open the specification file, run the conversion, and close the tool, use the /run argument:
"C:\Program Files (x86)\CSPro 8.0\Excel2CSPro.exe" /run "My Specifications File.xs2cs"
If you want to run the conversion only when the Excel file has a newer file date than the CSPro data file, use the /runifnewer argument:
"C:\Program Files (x86)\CSPro 8.0\Excel2CSPro.exe" /runifnewer "My Specifications File.xs2cs"
You can also run production conversions by using the PFF as a command line parameter for Excel2CSPro.exe. For example, if you name your PFF file Convert Data.pff, then you can run the deployment by invoking:
"C:\Program Files (x86)\CSPro 8.0\Excel2CSPro.exe" "Convert Data.pff"
This assumes that CSPro was installed in the default directory. Your PFF file must have a .pff extension.
You can create a PFF file in one of two ways: either [1] create one with a text editor (such as Notepad or Wordpad), or [2] have it generated automatically for you when you save a conversion specification file. You can also manipulate PFF files in logic by using the
Pff object.
The following section shows the options available to you in a conversion PFF file. A PFF file is not case sensitive, so you can use any combination of upper and lower case text.
[Run Information]
Version=CSPro 8.0
AppType=Excel2CSPro
[Files]
Application=.\Convert Data.xl2cs
Excel=.\Zomba.xlsx
InputDict=.\Clinics.dcf
OutputData=.\Zomba.csdb
The [Run Information] block is required and must appear exactly as shown in the example above.
The [Files] block is required. A description of the files, not all of which have to be specified, is as follows:
- Application=the name of the specification file script that will be used during the conversion.
- Excel=the input Excel file.
- InputDict=the CSPro dictionary.
- OutputData=the name of the output data file. The extension of the file indicates the output type.
The Excel, InputDict and OutputData commands do not need to be defined. If not defined, the conversion will use the values defined in the specification file.