I am facing a problem while formatting the cell value during excel export from a C#.Net 2.0 application form.
I have a column named as "URC Code", It's a user defined code which the user can enter in the master for an Item or Component (other than the code with which it is defined) in order to keep a track of the items and components according to their defined code.
The code can be anything for e.g. it can be a word like 'abcd','xyz'; it can be a a number (upto 13 digit) like '0331053110065', a decimal value like '13.42'.
When i am keeping the cell NumberFormat value to '0' then it shows the correct value for '0331053110065' but a wrong value for '13.42' i.e., '13' (truncating the decimal value) and when i am keeping the NumberFormat value to '0.00' then it shows the correct value for '13.42' and wrong value for '0331053110065' i.e., '3.31053E+11'.
My problem is that when i export the items or component to excel, what formatting should i give to 'URC Code' column so that the data in the cell is visible to user correctly.