TQImport3XLS.Map

时间:2022-09-22 04:09:46

property Map: TStrings;

设置数据集字段和Excel单元格之间定义映射属性以下列方式:

FieldName=CellRange

导入单独的单元格

Field1=A1

Field1=A1;B2;C3;

导入整列或者它的一部分

Example

Imported cells

Field1=A1-A10

从A1到 A10

Field1=A10-A1

从 A10 到 A1

Field1=COLSTART-A10

From the first cell with data in the column A up to A10

Field1=A10-COLSTART

From A10 down to the first cell with data in the column A

Field1=A10-COLFINISH

From A10 up to the last cell with data in the column A

Field1=COLFINISH-A10

From the last cell with data in the column A down to A10

Field1=A-COLFINISH

From the first up to the last cell with data in the column A

Field1=A-COLSTART

From the last down to the first cell with data in the column A

导入整行或者它的一部分

Example

Imported cells

Field1=A1-D1

From A1 up to D1

Field1=D1-A1

From D1 down to D1

Field1=ROWSTART-F1

From the first cell with data in the row 1 up to F1

Field1=F1-ROWSTART

From F1 down to the first cell with data in the row 1

Field1=A10-ROWFINISH

From A10 up to the last cell with data in the row 10

Field1=ROWFINISH-A10

From the last cell with data in the row 10 down to A10

Field1=10-ROWFINISH

From the first up to the last cell with data in the row 10

Field1=10-COLSTART

From the last down to the first cell with data in the row 10

定义特定的表

FieldName=[SheetName]FirstCell-LastCell

or

FieldName=[:SheetNumber]FirstCell-LastCell

Example

Imported cells

Field1=[Sheet1]A1-A10

From A1 up to A10 at the sheet named Sheet1

Field1=[:3]A1-A10

From A1 up to A10 at the sheet number 3

你可以根据需要混合单元范围

Field1=A1;A3;A10-A15;A15-D15;D15-COLFINISH;[Sheet1]COLFINISH-A1

SkipFirstCols属性

property SkipFirstCols: integer;

SkipFirstCols 属性定义哪列不导入. 如果你设置 SkipFirstCols=4那么Excel表第4列将不会被导入.

SkipFirstRows属性

property SkipFirstRows: integer;

SkipFirstRows 属性定义哪行不导入. 如果你设置 SkipFirstRows=4 那么EXCEL表第4行将不会被导入.

相关文章