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 that the root of the C disk contains a Microsoft Excel file named Book.xlsx.
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;
After executing the example a new provider linked to the specified file is created. The values are exported from two sheets starting with selected rows. Obtained values are displayed in the development environment console.
See also: