Issue: My export to excel function provides column names based on the column names from the database. Actually, I would prefer to customize those column names. This is done by defining a dataset, (or a datatable) and then overriding the ColumnName property from the Columns collection of that datatable.
Here is a sample
1 | Dim ds As DataSet _ |
in the sample above you see backup columns first. But if you wanted to re-arrange the columns you would use the set ordinal method. Here is an example
1 | ds.Tables(0).Columns("ID (Ignore)").SetOrdinal(0) |