Hello,
How to avoid replacing number by #### when the column width isn't sufficiently large. For textual values it's Ok - they overlap neighbour cell.
Thanks in advance.
Pavel.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
PavelPosted Sep 28, 2012, 6:41 AM
VulpesPosted Sep 28, 2012, 6:18 AM
PavelPosted Sep 28, 2012, 6:01 AM
when I format a number with quote separators, it's Ok:
myExcelWorksheet.Cells[6, "I"] = String.Format("{0:#,##0}", number);
Regards.
PavelPosted Sep 27, 2012, 8:56 AM
In my case your solution can't resolve the problem as concerned cell is situated in the column, where the width is set to a particular value, that match the values widths in other rows in the same column.
If my memory is Ok, there is some formatting technique inside Esxel, that allow to avoid such
problems. But I don't remember how to achieve this and certainly NOT how to do it from C#.
Regards.
Pavel.
VulpesPosted Sep 27, 2012, 8:39 AM
If you need to estimate the maximum number of characters programatically, it will make life easier if you're using a fixed width font.