This is a migrated thread and some comments may be shown as answers.

Excel export cell formating not working

1 Answer 313 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chuck
Top achievements
Rank 1
Veteran
Chuck asked on 30 Jun 2020, 06:50 PM

I have a RadGrid I'm exporting to excel but for cells with zeros it's not formating cell for Decimal with two places. I'm using the below to set the cell text and it works fine for Cell values other than Zero.

cell.Text = decValue.ToString("n2") 

     

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 02 Jul 2020, 03:54 PM

Hi Chuck,

The way cell formatting should be applied depends on the Excel export format used. Therefore you can check out the following resources respectively tho the different Excel export formats provided by the RadGrid:

I hope this will help!

Regards,
Doncho
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Chuck
Top achievements
Rank 1
Veteran
Answers by
Doncho
Telerik team
Share this question
or