Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Numbers to Excel have wrong format

Status
Not open for further replies.

Sweigs

IS-IT--Management
Mar 25, 2004
6
0
0
US
I am exporting numbers with 4 deciaml places, the last two being zeros. IE - 500.2300. When it is exported to excel it ends up as 500.235879 (or something like that). The problem I am having is if you sum the data in the SQL data base it will balance to zero. If you sum the data on the spread sheet it is never zero. I tried formating the column which does then display with two decimals but I believe it is not rounding the number but truncating the number which is causing the out of balance situation.
 


What data type is the column in the SQL table, real? float?


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Hi,

I have 2 questions ...

How are you exporting to excel?
How are you formatting the columns?

[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
I am not sure how to modify my orginal request but I have discovered that if I use a data type of double my export to excel works correctly. Thanks for everyone's reply.

John S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top