I am developing a small winform utility to read one excel & update other excel.
I am trying to read source excel file (which has several hidden columns & rows) using OLEDB. I am able to do it and get output in Datatable but facing few challenges below:
Once I read source excel, I have to run some logic and update other excel row by row or even column by column. I have to retain formatting as well. What would be best to update other excel?
[ABC_20171128.csv]
Format = Delimited(|)
CharacterSet=ANSI
ColNameHeader=True
DateTimeFormat=dd MM yyyy hh:nn:ss
Col1 = Date DateTime
Col2 = AccountID Text
Col3 = SubAccount Text
Col4 = MarketCode Text
Col5 = SecurityCode Text
Col6 = Units Single
Put the schema.ini file in the same directory as the file you're reading.
More info: Missing column of Dates in CSV file using Schema.ini file
Yes manually handle it or dont use OleDB use Interop.
MCVE with a new question.
You'll need interop to work out which columns are hidden. Alternatively you will know which ones are hidden to discard.
The Schema.ini should do the trick for column headers.