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

Exporting to Excel, as a number, with formatting

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
tony
Top achievements
Rank 1
tony asked on 12 Dec 2011, 08:00 PM
Hi,

I noticed that when I have export to excelML with formatting, the number is stored as a String instead of a number.

After some research, it turns out that I can hook up to the ElementExporting and store the value as a Decimal and Excel will read it as a number.

This is all good, but is there a way to format the numbers in excel? Our string formatting has commas marking the thousands:

String format: #,##0.00

And we wish to have the values in excel to be in this format, and still be represented as numbers.

Please let me know if this is possible,
Thanks!
Tony

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Dec 2011, 07:36 AM
Hi Tony,

 You cannot have both format and the original value. Formatting a value is actually converting the value to string with specific format. 

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
tony
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or