I have some reports which contain some account numbers with leading zeros.
I lose those leading zeros when I download the output to Excel.
Is there anything that can be done about this?
I have some reports which contain some account numbers with leading zeros.
I lose those leading zeros when I download the output to Excel.
Is there anything that can be done about this?
Microsoft Excel may format numbers automatically by removing the leading zeroes. You can format the number first in the Row_Rendered server event by adding a leading single quote. For example:
if (IsExport("excel")) {
Field.ViewValue = "'" + Field.ViewValue; // Prevent formatting by excel
}