October 23, 2013 at 3:28 am
Using BCP, how can we export records into an .xlsx file. I want to avoid the error we get when opening .xls in Excel 2010/2007
October 23, 2013 at 7:23 am
I'm not sure you can use BCP to export directly to XLSX, and I'm not even sure you can use it to export driectly to XLS. You can export to CSV using format files (which Excel should be able to read):
http://technet.microsoft.com/en-us/library/ms190759.aspx
What's the error message that you get ?
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
October 23, 2013 at 8:17 am
Export to .xls is possible. Its working.
The file you are trying to open, YYY.xls is in a different format than specified by the file extension....
Above error is common when you try to open .xls file in excel 2010.
October 23, 2013 at 8:26 am
OK, are you sure it's not a client-side issue ?
http://support.microsoft.com/kb/948615
also, see this MSDN piece:
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
October 23, 2013 at 8:34 am
Yes, have gone through the links before. i dont like to tweak registry. somewhere I read that when it is .xls, excel tries to read it xml and hence it opens. But when its .xlsx, excel cant get the xml data since the .xlsx has no xml data...
what i can conclude is its not possible to export as .xlsx.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply