We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ExportDataTable should auto rename duplicate column names

As a developer of an enterprise application I don't want to come to a full stop with an Exception when allowing my end user to upload their own Excel files for further processing,

My end users can upload an excel file that is presented to them in the gui. It is convenient to use a DataTable in my code instead of writing all cases myself. In the gui they can select different columns and map them to objects in their custom installation for synchronization. The rationale is that the duplicated columns are derived columns that makes sense by looking in the column to the left. Eg. Price_2015,Price_2016,Change,Price_2017,Change

Currently we are getting a datatable with OleDb, using the Microsoft.ACE.OLEDB.12.0 as a Provider. Now the duplicate column names gets named with a running number. Dupe, Dupe1, Dupe2 etc. This works fine since Change and Change2 from the example above isn't relevant to map and is ignored by the user.

This should be an option in ExportTableOptions, RenameDuplicateColumns. Preferebly an enum with options like RenameStrategy.Exception (default), RenameStrategy.RunningNumber vs RenameStrategy.ColumnLetter where ColumnLetter results in DupeG, DupeH, DupeM etc. instead.

Hi Mattias,

Thank you for the nice suggestion. Please allow us some time to discuss this matter with the product team and get back with updates in this regard.

Hi again,

This is to update you that we have logged a feature request under the ticket CELLSNET-44416 for your requirement to auto-rename the duplicate column names while exporting data to DataTable using the ExportDataTable option offered by Aspose.Cells for .NET API. You have to spare us some time for feasibility analysis of this feature. As soon as we have completed the preliminary analysis, we will be in a better position to provide an estimated release schedule for the feature’s implementation.


We hope we will support the feature in Q2 2017.

Once we have any new information/news, we will update you here.

Thank you.


Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-44416 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-44416) have been fixed in Aspose.Cells for .NET 17.2.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.