Command Lines

Navigation:  CONVERSION >

Command Lines

Previous pageReturn to chapter overviewNext page

Overview

To convert the Excel™ files, there is an alternate method: typing a command line in the cmd console.

Up to five files can be specified to carry out a conversion:

1.the Excel source (data)

2.the qdv/qdb/grp template (fields); it is optional

3.the qdv/qdb/grp destination; it is optional

4.the log file (report of execution)

5.the qdvconvert settings file; refer to Conversion of a BoQ into an Estimate; it is optional.

 

An estimate created by conversion of a workbook CANNOT be updated using a command line.

 

Conversion of One Source xlsx/xls/xlsm File

 

QDVCmdLineConverter.exe "xls/xlsx/xlsm source file full path" "qdv/qdb/grp dest file full path" "qdv/qdb/grp template file full path" "-U/-N" "log file full path"

 

-U is for Update (ignored in a conversion into an estimate), -N is for New.

 

You can add labels before each char string:

\SourceFile=                - full path to source Excel file to open in Converter

\DatabaseType=        - Articles, Estimate or Sets

\Template=                - full path to qdv/qdb/grp template; optional

\SettingsFile=             - full path to settings .qdvconvert file to apply; optional

Example that does not specify the destination file: "QDVCmdLineConverter" \SourceFile="C:\Converter\Sample_BOQ.xlsx" \DatabaseType="Estimate" \Template="C:\Estimates\DemoEstimate.qdv" \SettingsFile="C:\Converter\Sample_BOQ.qdvconvert"

 

Estimate:

- The source is the Excel file with all the "mappings"; it provides data + template + mapping + structure + excluded rows

- The template can be " " or a file that overwrites the template provided by the source file

- The settings file can be appended after the log file to overwrite  template + mapping ...  Add -MappingAllSheets to apply mapping from .qdvconvert file to all sheets in workbook (only if .qdvconvert contains exactly 1 mapping).

 

Articles/Sets:

- The template can be " " or a file that overwrites the template provided by the source file and/or the settings file

- The settings file can be appended after the log file to overwrite template + mapping + excluded rows if the Excel file is plain; add -MappingAllSheets to apply mapping from .qdvconvert file to all sheets in workbook (only if .qdvconvert contains exactly 1 mapping).

 

Summary:

 

source

destination

template

switch

report

settings file

if .qdvconvert contains exactly 1 mapping

Estimate

xls/ with mappings

qdv

qdv or " "

 

txt

qdvconvert (option for overwriting)

 

 

data + template + mapping + structure + excluded rows

target or " "

overwriting of xls (& settings)

-N

log

template + mapping + ...

-MappingAllSheets

target or " "

" "

-N

log

Articles/Sets

xls/xlsx/xlsm with mappings

qdb or grp

qdb or grp or " "

 

txt

qdvconvert (option for overwriting)

 

 

data + template + mapping + excluded rows

target or " "

overwriting of xls (& settings)

-U or -N

log

template + mapping + excluded rows

-MappingAllSheets

 

target or " "

" "

-U or -N

log

 

xls/xlsx/xlsm without mappings

qdb or grp

qdb or grp or " "

 

txt

qdvconvert (mandatory)

 

 

data

target or " "

overwriting of settings

-U or -N

log

template + mapping + excluded rows

-MappingAllSheets

 

target or " "

" "

-U or -N

log

 

Conversion of One or Several Source xlsx/xls/xlsm Files

 

QDVCmdLineConverter.exe "TXT file full path" "log file full path"

 

The TXT file is a text file containing a list of arguments separated by a comma:

 

xls/xlsx/xlsm source file full path1, qdv/qdb/grp dest file full path1, qdv/qdb/grp template file full path1,-U/-N

 

xls/xlsx/xlsm source file full path2, qdv/qdb/grp dest file full path2, qdv/qdb/grp template file full path2,-U/-N

 

xls/xlsx/xlsm source file full path3, qdv/qdb/grp dest file full path3, qdv/qdb/grp template file full path3,-U/-N

 

...

 

If the settings file is used, put it at the end; if there is no template, the line is

 

xls/xlsx/xlsm source file full path1, qdv/qdb/grp dest file full path1, ,-U/-N, qdvconvert settings file full path1

 

 

Remote Databases

Replace each dest file full path with either line:

 

ProviderRemoteDatabaseServer;localhost\sqlexpress;MyArticlesDatabase;;;True\*.qdb

 

ProviderRemoteDatabaseServer;localhost\sqlexpress;MySetDatabase;;;True\*.grp

 

 

Destination File

When the dest file is not defined, it is created with the same name and in the same location as the source file, but with the appropriate extension. The syntax is reduced to:

 

QDVCmdLineConverter.exe "xls/xlsx/xlsm source file full path" "" "qdv/qdb/grp template file full path" "-U/N" "log file full path"

 

or in a TXT file:

 

xls/xlsx/xlsm source file full path1,, qdv/qdb/grp template file full path1,-U/-N

 

 

Log File

The log file is created if it does not exist and is updated whenever this program is executed.

Location: C:\Users/<user name>/Appdata/Roaming/QDV

The returned code is 0 when the conversion is successful.