I have a cell in a table that has its value set to an integer.
Format of the cell is set to
000 which results in said integer being zero padded when displayed in the report viewer or other export formats (like PDF)
However, when I export this report to Excel, the value shown in the cells is
How can i have the value show as padded zeroes in Excel?
I’d like to know if this can be done natively in SSRS design without embedded (.net) code or changing the SQL query.
This can fix it;
=Right("000" & Fields!MyInt.Value.ToString, 3);
#VALUE! is shown when the value cannot be displayed in the cell. The format looks correct, so check that the column is wide enough to display the value.
#VALUE! is shown when the wrong type of argument or operand is used in a formula.
Check to see that your data returned to Excel does not include a leading ‘=’, ‘-‘ or ‘+’
If it does Excel will treat it as a formula.
If there is only #VALUE! in the cell, then SSRS is passing across a invalid value.
Also have a look the formatting in the cell to see what has been passed from SSRS. I would expect to see a format of ‘000’ or ‘000;000’ or ‘000;000;000;’.
These are the formats, from left to right of Positive numbers, Negative numbers, Zeros and Text.