SQL Anywhere 12 - exporting data to Excel
-
30-09-2020 - |
Question
Do I need to install MS Office Excel on machine where is SQL Anywhere 12 server for below code to work?
Or SA 12 or Windows have MS Excel Driver builtin?
SELECT * FROM SalesOrders;
OUTPUT USING 'Driver=Microsoft Excel Driver (*.xls);
DBQ=c:\\test\\sales.xls;
READONLY=0' INTO "newSalesData";
Solution
The OUTPUT USING
format of the statement is using a ODBC driver to create/send the data to.
This means you must have a ODBC driver on the server which can create XLS files.
There is a MS Office 2007 ODBC download available from microsoft which provides such a driver.
I don't know if there exist 64-Bit drivers (I think it must match with your dbserver 32/64bit) nor if Office 2010/2013/2016 ODBC drivers exist.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange