SSRS 2008 Excel Currency Cell Format

这一生的挚爱 提交于 2019-12-08 04:52:38

问题


I'm using SSRS 2008 and I have a financial report. I would like the dollar amounts in my table to be in currency or number format when exported to Excel. Currently they end up being text.

I have trying a few things to see if its even possible. I removed the table header, didn't use the $ sign, and converted the field to decimal, but nothing seemed to work. The data in Excel always seems to be format as text.

Any suggestions?


回答1:


Make sure you are using the Format string "C" but the export to excel is really a text rendering - it does not hold Excel specific attributes/qualities.




回答2:


I found that instead of using a format function in the expression like:

=Format(myvar.value, "C")

Its better to not to use an expression and just change the Text Box Properties on that field. For example, I'd leave the field as:

 =myvar.value 

Then I would right click on the field, go to Text Box Properties, Number Sub Category/Tab, and select currency.

When doing this the results in Excel are a custom number format vs a text format.



来源:https://stackoverflow.com/questions/2136909/ssrs-2008-excel-currency-cell-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!