Görünür Satır Verilerini Çalışma Sayfasından Dışa Aktarma
Contents
[
Hide
]
Aspose.Cells’i kullanarak çalışma sayfalarındaki verileri veri tablolarına aktarabilirsiniz. Bazen yalnızca görünür satırların verilerini dışa aktarmak istersiniz. Aspose.Cells, bunu başarmanın bir yolunu sunar. KullanExportTableOptions.PlotVisibleRows yalnızca görünür satır verilerini dışa aktarmak istediğinizi belirtmek için.
Bu örnek, aşağıdaki çalışma sayfasından verilerin nasıl dışa aktarılacağını gösterir. 5, 6 ve 7. satırlar gizlenir.
Çalışma sayfasındaki örnek veriler, 5, 6 ve 7. satırlar gizlenir |
---|
![]() |
Veriler kullanılarak bir veri tablosuna aktarıldıktan sonraWorksheet.Cells.ExportDataTable() ile yöntemExportTableOptions.PlotVisibleRowsseçeneği, bu gibi görünecektir. Gizli satırlar boş satırlar olarak çizilir
Gizli satırlar veri tablosuna boş satırlar olarak aktarılır |
---|
![]() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |