Currency format when exporting to excel RRS feed

  • Question

  • Hi,

    I have a problem with the number format when i export my reports to excel with Reporting Services. I set numbers as currency with the command FormatCurrency() in visual studio, but when i export the report to excel, the numbers are considered as text.

    Does anyone have a solution?
    Thanks in advance.
    Tuesday, April 24, 2007 2:31 AM

All replies

  • Use the Format property on the cell/textbox, for currency the format string should be c<number decimal places>, i.e. c0 prints the currency figure with no decimal places. Once you have done this, remove the FormatCurrency() function from the expression as it overrides anything you have in the Format property. The reason the FormatCurrency() does not work when exporting to Excel is because its return value is a string, so Excel is confused - is it a currency or is it a string?



    Tuesday, April 24, 2007 4:11 AM
  • Thanks a lot, it works perfectly!!!! I'm so releaved
    Tuesday, April 24, 2007 12:24 PM