Reputation: 341
I am using VB.NET to write an Excel Worksheet. I need to write the value 3E01 but it always returns 3.00E+01.
There is one easy way to write it by prepending single quote on the text but it will alter the value that is why I need it to format the cell value into Text.
Upvotes: 0
Views: 174
Reputation: 19367
Format the cell as text before you put the value in it:
theCell.NumberFormat = "@"
theCell.Value = "3E01"
where theCell
is a reference you have to the cell.
Upvotes: 1