July 2, 2008 at 4:17 am
hi
INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=c:\test\Test.xls;',
'SELECT id,col1 FROM [Sheet1$]')
SELECT id,col1 FROM temp_test
This works fine,
When I open my excel it is inserted in a1,b1 cells.
I need to specify the cell names when I need to export rows from sql server to excel.
Thanks in advance.
July 2, 2008 at 12:18 pm
vsjayashri (7/2/2008)
hiINSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=c:\test\Test.xls;',
'SELECT id,col1 FROM [Sheet1$]')
SELECT id,col1 FROM temp_test
This works fine,
When I open my excel it is inserted in a1,b1 cells.
I need to specify the cell names when I need to export rows from sql server to excel.
Thanks in advance.
You will probably need to specify an unamed range:
replace SELECT * FROM [Sheet1$]
for SELECT * FROM [Sheet1$D1:E1]
* Noel
July 3, 2008 at 2:34 am
Thanks for the solution
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply