Merge - Automation

 

The Merge method combines a data file with the current worksheet document. Returns a Boolean.

 

Syntax

object.Merge( FileName, Row, Col, Options, FileFormat )

 

Parameter

Type

Description

FileName

String

required, data file name

Row

Long

optional, default=-1, row of upper left corner to insert data

Col

Variant

optional, default=-1, column of upper left corner to insert data

Options

String

optional, default=""

FileFormat

wksFileFormat

optional, default=wksFileFormatUnknown

 

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 into the current worksheet.

 

Wks. Merge (FileName:= MVApp.Path+"\Samples\Co2010.dat", Row:=50, Col:=1)

 

Used by: WksDocument object