CodePlexProject Hosting for Open Source Software
Can I set the numberformat to TEXT?
I want to force a number of columns to always show text. I cannot find what value I should provide to get this to work...
Do you want to show a number as a text ?
Maybe you can try to use formula...something like that:
ws.Cells[1, 1].Formula = "TEXT(\"" + 2+ "\",\"#\")";
Turns out setting the Formatstring to "@" does the trick :D
Hi Jesse, please could you tell us what object the property Formatstring belogs to? Or do you mean ws.Column(i).Style.Numberformat.Format = "@";
Have to dig a bit.. I'm not on this project any more, so I'll have to do this from memory...But I think you're right. Setting that field should do it.
I found the "@" format in the
collection. It doesn't have a specific name for referencing (that I can see), but Excel 2010 interprets the format as Text.
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.