Çalışma Sayfasından Veri Tablosuna Veri Aktarırken Gizli Sütunları Yoksay

Contents
[ ]

Aşağıdaki örnek kod, çalışsayedeki tüm veriyi data table’e aktarırken gizli sütunları göz ardı etme kullanımını açıklamaktadır.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
string inputPath = dataDir + "Sample.xlsx";
Workbook workbook = new Workbook(inputPath);
Worksheet worksheet = workbook.Worksheets[0];
ExportTableOptions opts = new ExportTableOptions();
opts.PlotVisibleColumns = true;
int totalRows = worksheet.Cells.MaxRow + 1;
int totalColumns = worksheet.Cells.MaxColumn + 1;
DataTable dt = worksheet.Cells.ExportDataTable(0, 0, totalRows, totalColumns, opts);