How to insert a new column into DBGrid

The application is reading input from an Excel file using a DataSource and a ADODataset.
1- How can get the table names(names of Excel worksheets) at runtime? i.e. after selecting the excel file to open, it should be a way to select the table name from GetTableNames function, but how?

2-DBGrid is displaying the data. Existing data can be modified and posted, so the original excel file is updated. How is it possible to add a new column to the grid(preferably at any positioin)?
I have tried to add at the end, but as soon the statement DBGrid.Columns.Add is executed the number of columns is reset to 1 and the Excel input data is lost.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories