is it possible to get the smartform database in excel format

0 votes
asked Sep 8, 2014 in Smartform by stocky1971 Novice (220 points)

2 Answers

0 votes

Hi -

Smartform is provided as a MySQL database, but it's easy enough to export files from the smartform database to Excel using standard commands in MySQL, such as (here exporting everything for the year 2010 in one command line step):

SELECT * FROM historic_races join historic_runners using (race_id) where year(meeting_date) = 2010 INTO OUTFILE '/tmp/smartform_2011_2012.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';

Or you can use the export facilities in popular MySQL visual interface tools like SequelPro (for Mac) or HeidiSQL (for Windows).

answered Sep 8, 2014 by colin Guru (14,340 points)
Very odd...when I run this script I get an error stating:

error 1227 (42000): Access Denied; you need (at least one of) the FILE privilege(s) for this operation
This error occurs when MySQL does not have permission to write to the OUTFILE specified.  

For MySQL errors like this, cutting and pasting the error into google search will reveal a number of potential solutions - or rephrase the question such as "can't create/write to file mysql outfile" . This phrase in google search reveals a number of potential solutions - but basically the file and directory you are writing to must be permissioned for MySQL.
0 votes
Hello, Stocky. Yes, It is possible. You can try ZetExcel.
answered Sep 20, 2020 by TomBlack Plater (140 points)