SSRS Report export with Excel

Hi,

Iam exporting the ssrs report with Execl sheet but iam getting this error in excel sheet

"The number in this cell is formatted as text or preceded by an apostrophe "

Can anyone tell me how to solve this error pls

May 27th, 2015 6:24am

Refer following

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5467ec7b-38cb-4e27-8fe6-57044e54cbf1/handle-text-numeric-values-in-ssrs-2008-while-export-to-excel

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 6:38am

Already i checked this but no use.this expression was not working.Still getting same error in excel file
May 27th, 2015 6:43am

Hi MS SQLSERVER,

According to your description, after exporting the report to Excel, the error "The number in this cell is formatted as text or preceded by an apostrophe" is thrown out in Excel sheet, right?

In your scenario, you could use the custom code below to work around the issue:

Public Function Conv(ByVal A as String) 
Dim B as string
Dim C as Integer
If isnumeric(A)  Then
C=CInt(A)
Return C
else
B=CStr(A)
Return B
End If 
End Function

Then we can use the following expression to calculate the value:
=Code.Conv(Fields!column.Value)

If you have any question, please feel free to ask.

Best regards,
Qiuyun Yu

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 10:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics