Merge
Merge combines a worksheet file with the current document. Returns a Boolean. Returns 'True' if the process is successful, otherwise, returns 'False'.
Syntax
object.Merge( FileName, Row, Col, Options, FileFormat )
Parameter |
Type |
Required/ Optional |
Default |
Description |
FileName |
String |
Required |
This provides the path and file name of the data file. |
|
Row |
Long |
Optional |
-1 |
This specifies the row of upper left corner to insert data. |
Col |
Variant |
Optional |
-1 |
This specifies the column of upper left corner to insert data. |
Options |
String |
Optional |
"" |
This specifies the import options. |
FileFormat |
Optional |
wksFileFormatUnknown |
This specifies the file type. |
Remarks
The contents of the new file are merged into the worksheet at the active cell so be sure to position the cell at the edge of the existing data. Any cells in the existing worksheet that lie to the right of and below the active cell are overwritten with the contents of the merging file.
Example
This example demonstrates how to merge a data file with the current worksheet.
Wks.Merge(FileName:=SurferApp.Path+"\Samples\demogrid.dat", Row:=50, Col:=1)
Used by: WksDocument object