Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
abhijay
Starting Member
5 Posts |
Posted - 2011-08-23 : 21:19:24
|
| When I export numeric data to excel file from sql server 2008 using Openrowset, it is pasted in string format. Upon opening it showing green icon and the data is shifted to left side rather than right. I know I can correct it by clicking on it. The problem is that the user is opening the resulted file not me. So he/she finds it sloppy. Can I do something that the numeric data is shown in numeric format only? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-24 : 02:28:21
|
| whats the native datatype? is it numeric?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
abhijay
Starting Member
5 Posts |
Posted - 2011-08-24 : 03:15:12
|
| whats do you mean by native datatype? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-24 : 04:18:07
|
| datatype of column in your source table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
abhijay
Starting Member
5 Posts |
Posted - 2011-08-24 : 04:35:21
|
| I tried two methods. First the native datatype was General. So the numeric data posted becomes text. Second, I converted the datatype of first cell, where the numeric will come, to number format. Now openrowset skips the whole row and prints from the below row in text format. |
 |
|
|
|
|
|