Excel Sheet Move r
Example Usage
A typical use of this product is to take two or
more Excel files (i.e. Workbooks) and merge the data into a single
Workbook. For example, say you have been given the task of taking
multiple CSV files and:
A)
Convert them to XLS files
B)
Merge all the resulting XLS files into a single Workbook
C)
Do all this in an automated hands free way
Task A) above can be handled with WordConverterEXE,
and task B) can be done with XLSM. Both provide for batch processing from
the command line, thereby allowing you to automate the process.
A batch file to do such a task is shown below:
LINE 1; WCX /E /Sc:\B\AA.CSV /Tc:\B\AA.XLS
/C-4143
LINE 2; WCX /E /Sc:\B\BB.CSV /Tc:\B\BB.XLS
/C-4143
LINE 3;
XLSM
/SC:\B\AA.XLS /Y1 /TC:\B\BB.XLS /Z2 /A /X
Basically WordConverterEXE is used to convert both
AA.CSV and BB.CSV to Excel workbooks (XLS). Then XLSM is used to copy the
data of sheet 1 of AA.XLS to that of Sheet 2 of BB.XLS. Effectively, all
the data is put into one Workbook. The details of each command line
argument is described below:
|
Line 1&2: "WCX
/E /Sc:\B\AA.CSV /Tc:\B\AA.XLS /C-4143" |
|
/E |
Use Excel conversion
(not MS Word) |
|
/S
|
Specify Source file |
|
/T |
Specify Target File |
|
/C |
Specify target file
type (-4143 = *.XLS) |
|
Line 3 "XLSM
/SC:\B\AA.XLS /Y1 /TC:\B\BB.XLS /Z2 /A /X" |
|
/S |
Specify Source file |
|
/Y1 |
Specify sheet 1 of
source file |
|
/T |
Specify Target File |
|
/Z2 |
Specify sheet 2 of
target file |
|
/A |
Add Worksheets if
necessary |
|
/X |
Exit after completion |
|