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 |
|
ruchijani
Starting Member
23 Posts |
Posted - 2009-07-07 : 01:00:07
|
| HelloI have used OPENROWSET to export sql server table data to excel file like DECLARE @STR VARCHAR(1000)SET @STR = 'INSERT INTO OPENROWSET(''' + @provider + ''',''' + @ExcelString + ''',''SELECT col1,col2,col3 FROM [Sheet1$]'') SELECT col1,col2,col3 FROM table1' EXEC(@STR)it works fine but problem is that col1 and col2 are of decimal type in table and converted to text in excel file so i could not apply any formula to that column and little green tags which represent 'number stored as text' not seen in excel fileSo is there any way to solve problem with the use of sql server so that number not stored as text in excel filePlease help meThanksRuchi |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-07 : 01:30:08
|
Try changing your IMEX mode. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-07 : 01:52:43
|
| or pre-format the execl cell to Number and export data to itMadhivananFailing to plan is Planning to fail |
 |
|
|
ruchijani
Starting Member
23 Posts |
Posted - 2009-07-08 : 01:35:49
|
| HiiiiI tried with IMEX=0 and IMEX=1 but it does not work for me So Is this only way to pre-format the excel cell ?ThanksRuchi |
 |
|
|
|
|
|