I need to generate XLS file using TSQL only. I am generating XML based Excel. I am trying to use FOR XML for this but as the output XLS file is fairly complex its taking much efforts and time.
Is there any other way to do it? Or if its only way what's that can i do to do it effectively ?
It is not about exporting the data. I will respond to the user in XML format and that XML format will be opened by Excel(I will include headers that Excel know and will open the result in Excel.) User or I will not have direct access to SQL server so no way to export the results.The query will be exposed as Web-service. User will request the data and application will respond with XML that will be opened in Excel.