Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ExSsrs-I have an varchar column which holds the value as 89%. When this column is exported to excel. The values are exported properly but with an warning symbol saying the text in the cell is convertes to text from number preceded by aphostrophe.note cdbl() function is not working here convert fnctions also not helped.please suggest some solutions

What I have tried:

Cdbl(),cstr(),appending number to%,cnvert to string. Nothing helps me out
Posted
Updated 14-Feb-18 5:31am

Below are 3 different solutions for 3 different glitches :
Value 1

1234

blank cell

1234

Solution 2

=IIF(IsNumeric(Fields!TEST.Value.ToString()), CDBL(IIF(IsNumeric(Fields!TEST.Value.ToString()), Fields!TEST.Value.ToString(), "0")), " ")
Value 2

1234

Null

345

null

Solution 2

=IIF(IsNumeric(Fields!TEST.Value.ToString()), CDBL(IIF(IsNumeric(Fields!TEST.Value.ToString()), Fields!TEST.Value.ToString(), "0")), "NULL")

Value 3

1234

Null

345

N/A

550

TBA

440

599

NOT APPLICABLE

Solution 3

=IIF(IsNumeric(Fields!TEST.Value.ToString()), CDBL(IIF(IsNumeric(Fields!TEST.Value.ToString()), Fields!TEST.Value.ToString(), "0")), Fields!TEST.Value.ToString())
 
Share this answer
 
can you try this on that column

IIF(IsNumeric(Fields!PERCEN_AGE.Value.ToString()), CDBL(IIF(IsNumeric(Fields!PERCEN_AGE.Value.ToString()), Fields!PERCEN_AGE.Value.ToString(), "0")), Fields!PERCEN_AGE.Value.ToString())
 
Share this answer
 
Comments
Richard Deeming 15-Feb-18 13:36pm    
Which is exactly what solution #1 said last week.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900