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

Error exporting to Excel

2 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luca B
Top achievements
Rank 1
Luca B asked on 23 Jan 2017, 05:24 PM

Hi, I am using the built-in Excel exporting feature, but sometimes I get this error

We found a problem with this formula. Try clicking Insert Function on the Formulas tab to fix it.\n\nNot trying to type a formula? When the first character is an equal (=) or minus (-) sign, RadSpreadsheet thinks it is a formula. For example, when you type =1+1 the cell shows 2.

Since the cells content depend on the database, I cannot be sure there are no formula-like characters in some cells.

How can I catch this exception? Or, better yet, how can I manipulate the data in order for the Excel exporting to not complain?

Thanks

Luca

2 Answers, 1 is accepted

Sort by
0
Luca B
Top achievements
Rank 1
answered on 25 Jan 2017, 09:06 AM

Anyone?

It looks somehow related to having a negative total in the grid footer.

How can I tell the exporter to just treat the value as text?

Thanks

0
Pavlina
Telerik team
answered on 26 Jan 2017, 09:55 PM
Hello,

Try setting text format to the cell in order to stop recognizing it as a formula. Please check out the following code library which demonstrates how to apply format. 
cell.Format = "@";

Regards,
Pavlina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Luca B
Top achievements
Rank 1
Answers by
Luca B
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or