As suggested before, if the data needs to end up in a pre-defined Excel sheet, it is probably easier if you PULL the data into Excel (which is worksheet-oriented) and not push it from SQL Server (which is table-oriented).

There was also a problem recently where the default driver used for OPENQUERY did not support data export to an XLS file. I wonder if it's the same underlying issue here.

is it like <br /><br />'SELECT * FROM [test$A12:C22]')<br />SELECT * FROM aa<br /><br />It didnt work [<img src='/community/emoticons/emotion-6.gif' alt='' />].<br /><br />The previous table "datetab" had 3 columns a 407 rows. i dont understand how it worked for table "datetab"<br /><br />Thanks,<br />Ram<br /><br />"It is easy to write code for a spec and walk in water, provided, both are freezed..."

As suggested before, if the data needs to end up in a pre-defined Excel sheet, it is probably easier if you PULL the data into Excel (which is worksheet-oriented) and not push it from SQL Server (which is table-oriented).

There was also a problem recently where the default driver used for OPENQUERY did not support data export to an XLS file. I wonder if it's the same underlying issue here.

Is there any fix/solution for this?

Thanks,
Ram

"It is easy to write code for a spec and walk in water, provided, both are freezed..."

As suggested before, if the data needs to end up in a pre-defined Excel sheet, it is probably easier if you PULL the data into Excel (which is worksheet-oriented) and not push it from SQL Server (which is table-oriented).

There was also a problem recently where the default driver used for OPENQUERY did not support data export to an XLS file. I wonder if it's the same underlying issue here.

Is there any fix/solution for this?

Thanks,
Ram

"It is easy to write code for a spec and walk in water, provided, both are freezed..."

If you say the same technique worked before, then sorry for the confusion.