Specify if Column Name exists change PageSetup options

Hi,
I’m using Aspose Cells with .NET to develop reports. Currently load a Data Table into a worksheet:
DataTable dataTable = LoadDataTable(txtTitles, txtData);
ImportTableOptions options = new ImportTableOptions();
options.TotalColumns = dataTable.Columns.Count;
cells.ImportData(dataTable, 2, 0, options);

And want to change PageSetup settings if a Column Name from recently imported DataTable exists. Can you advise me how to grab Column Name for that small task?

@Remus87,

You may try to use Find/Replace options provided by Aspose.Cells to evaluate if a column name (string) exists (after you have imported data into the worksheet), so you may update the PageSetup settings.

Was looking through Find and CellsHelper built in methods that appears to be useful but just wondering if you could give me a small example/snippet to get the Column by Column Name a per my requirement. I’m sure it’s a 2,3 code lines and it’s important for me to have a clear example as will use a lot ColumnNames . As per the Data Table built in from .NET
DataColumn column = new DataColumn();
column.ColumnName = “SupplierID”;

@Remus87,

I think you should refer to the example in the document (which I suggested) regarding find and search option and write your own code/logic for your specific needs. If you find any issue, give us your sample code (regarding find/search data) and your template Excel file, we will check and refine your code segment. Moreover if you just want to evaluate a column is there with a given name, you may even evaluate this in your datatable (using common .NET APIs (System.Data), etc.).

Will do that. Thank you