Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / March 2007

Tip: Looking for answers? Try searching our database.

Number format do not work when exported to excel?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bugfish69 - 22 Mar 2007 14:58 GMT
I have a report where I have formated the numbers with #.#.  When I run this
repot this works well and give me the decimal only when it is needed.  
However, when I export to excel, I get te decimal point even when it is not
needed.  For example the when I have the whole number 100 it displays as 100.
in excel.

I could use the N1, but I do not want 100.0 to display either.

Any help would be appreciated.

p.s. I am using a matrix if that makes a difference.  I have not noticed
this when exporting a table, although I don't know it doesn't happen.
EMartinez - 24 Mar 2007 05:43 GMT
On Mar 22, 8:58 am, bugfish69 <bugfis...@discussions.microsoft.com>
wrote:
> I have a report where I have formated the numbers with #.#.  When I run this
> repot this works well and give me the decimal only when it is needed.
[quoted text clipped - 8 lines]
> p.s. I am using a matrix if that makes a difference.  I have not noticed
> this when exporting a table, although I don't know it doesn't happen.

It sounds like this is a defect in the export to Excel functionality.
Sorry I could not be of more assistance.

Regards,

Enrique Martinez
Sr. SQL Server Developer
Bruce Johnson [MSFT] - 28 Mar 2007 03:04 GMT
How about using a conditional formating expression to supress the trailing
zero:

=iif(Fields!.<FieldName>.Value - Fix(Fields!.<FieldName>.Value = 0, "#",
"#.0")

> On Mar 22, 8:58 am, bugfish69 <bugfis...@discussions.microsoft.com>
> wrote:
[quoted text clipped - 18 lines]
> Enrique Martinez
> Sr. SQL Server Developer
bugfish69 - 30 Mar 2007 15:32 GMT
Thanks for the tip.  It solved the problem in this instance, however it does
get messy when the filed is a calculated field and not just a field name.

> How about using a conditional formating expression to supress the trailing
> zero:
[quoted text clipped - 24 lines]
> > Enrique Martinez
> > Sr. SQL Server Developer
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.