DataFormatString Help

  • Thread starter Thread starter Simon Harris
  • Start date Start date
S

Simon Harris

I have a datagrid which is populated from an Excel file via an OLEDB
connection.

The data format in the Excel file for column A is text.

The data is either a single number - e.g. 1 or a number followed by a
letter - e.g. 7D

The cells that contain a number followed by a letter never get displayed in
my datagrid - They are empty. Single numbers are AOK.

I guess I need to work on a DataFormatString code to sort this, but have not
had much luck so far. Have tried {0:G} for general, which did not help.

Any advice will be appreciated.

Regards,
Simon.
 
Just for kicks Simon, change your excel file so that the first couple rows
start with a letter before the number.

See if you have the same problem. I came across this before.

bill
 
Hi Bill,

I actually ended up adding the data into the Excel file using formulas (e.g.
="7D") which worked. Thanks for pointing me in the right direction! :)

Simon.
 
Back
Top