DataSheetRow(SheetName: String): Integer;
DataSheetRow[SheetName: String]: Integer;
SheetName. Sheet name.
The DataSheetRow property determines the index of the first row containing data for the selected sheet.
The property is relevant if the Sheet property contains names of multiple of sheets of the data file.
Executing the example requires an Excel file with the Book.xlsx name to be available in the root directory of the C disc.
Sub UserProc;
Var
ExcelProvider: IDtExcelProviderEx;
Path: String = "c:\Book.xlsx";
v: Array;
i: Integer;
Begin
ExcelProvider := New DtExcelProviderEx.Create;
ExcelProvider.File := Path;
ExcelProvider.Sheet := "Sheet1;Sheet2";
ExcelProvider.Format := "XLSX";
ExcelProvider.HasHeader := False;
ExcelProvider.DataSheetRow("Sheet1") := 10;
ExcelProvider.DataSheetRow("Sheet2") := 20;
Debug.WriteLine(Values);
ExcelProvider.Open;
While Not ExcelProvider.Eof Do
ExcelProvider.Fetch(v);
For i := 0 To v.Length - 1 Do
Debug.Write(v[i] + " ");
End For;
Debug.WriteLine("");
End While;
ExcelProvider.Close;
End Sub UserProc;
The new source linked to the Book.xlsx file is created on executing the example. The values are exported from two sheets starting with selected rows. Obtained values are displayed in the development environment console.
See also: