Exportar datos de filas visibles de la hoja de trabajo

Contents
[ ]

Este ejemplo muestra cómo exportar datos de la siguiente hoja de cálculo. Las filas 5, 6 y 7 están ocultas.

Datos de ejemplo en la hoja de cálculo, las filas 5, 6 y 7 están ocultas
todo:image_alt_text

Una vez que los datos se exportan a una tabla de datos utilizando el método Worksheet.Cells.ExportDataTable() con la opción ExportTableOptions.PlotVisibleRows, se verá así. Las filas ocultas se representan como filas en blanco

Las filas ocultas se exportan a la tabla de datos como filas en blanco
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);