Exportieren von sichtbaren Zeilendaten aus dem Arbeitsblatt

Contents
[ ]

Dieses Beispiel zeigt, wie Daten aus dem folgenden Arbeitsblatt exportiert werden. Die Reihen 5, 6 und 7 sind ausgeblendet.

Beispiel Daten im Arbeitsblatt, Reihen 5, 6 und 7 sind ausgeblendet
todo:image_alt_text

Nachdem die Daten mithilfe der Methode Worksheet.Cells.ExportDataTable() und der Option ExportTableOptions.PlotVisibleRows in eine Datentabelle exportiert wurden, sieht es so aus. Ausgeblendete Reihen werden als leere Reihen dargestellt.

Ausgeblendete Reihen werden als leere Reihen in die Datentabelle exportiert
todo:image_alt_text
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
string filePath = dataDir+ "aspose-sample.xlsx";
// Load the source workbook
Workbook workbook = new Workbook(filePath);
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Specify export table options
ExportTableOptions exportOptions = new ExportTableOptions();
exportOptions.PlotVisibleRows = true;
exportOptions.ExportColumnName = true;
// Export the data from worksheet with export options
DataTable dataTable = worksheet.Cells.ExportDataTable(0, 0, 10, 4, exportOptions);