Export GnuCash Data for WIndows

THIS ARTICLE IS DRAFT and some section may be not completed.

At the end of the year 2016, I was looking for a best option to close my books in Gnu cash.
I google many website and found out that the best way to achieve my goal is to create separate gnucash file for each booking year. (I manage to do this way, click here).

But how to export the customer, vendor and employee data to the new file?
This subject seems to be a long discussion on internet. Some of this discussion are so complicated for a average user computer. Therefore I though it is better to bring a solution for this controversial issue.

There are several method! But on this page i will discuss 3 way!
  1. Export GNUCASH data through Mysql workbench
  2. Export GNUCASH data through Mysql command
  3. Export GNUCASH data through Graphic tools 
  4. Export GNUCASH data from the xml file (gnucash file itself)

1.Export GNUCASH data through Mysql workbench

If you familiar with some basic sql command it will be easy to extract the data in a minute. However the installation of Mysql server will take hour to set it up. The following steps are  written for Windows OS, but you may follow these steps on other OS.
Install Mysql
  1. Download full package of MySQL Community Server from http://dev.mysql.com/downloads/mysql/. (You need to have an oracle account to download the files)
  2. Run the installer and choose sever only setup type.
    • Make sure you do not loose your root password. Write it down. 
    • If you are able, please create an gnucash account
    • Do not forget to  install as the Mysql workbench!!! 
                For more information, please read the documentations at
               https://dev.mysql.com/doc/refman/5.7/en/installing.htm.
Covert Gnucash xml file to Mysql database
  1. Open gnucash and open the desire gnucash file to convert
  2. Save as that file with the MYSQL format, with the mysql account you created earlier in the Mysql setup with it correspondent password.
  3. Close Gnucash
 Export Table with Mysql Workbench
  1. Open the Mysql workbench and follow the instruction https://dev.mysql.com/doc/workbench/en/wb-admin-export-import-table.html to export the data from customer, vendor , employee or any table in the data base.

2.Export GNUCASH data through Mysql command

  1. Folow the steps from Install Mysql and Covert Gnucash xml file to Mysql database from "1.Export GNUCASH data through Mysql workbench"
  2. Start command prompt and type the following command (I assume you install Mysql in C:\Mysql)
    1. C:
    2. Cd C:\Mysql\bin
    3. mysql SELECT * FROM customers INTO OUTFILE 'c:/var/lib/mysql-files/customers.csv'FIELDS TERMINATED BY ',' ENCLOSED BY '"'LINES TERMINATED BY '\n'
    4. mysql SELECT * FROM vendors INTO OUTFILE 'c:/var/lib/mysql-files/vendor.csv'FIELDS TERMINATED BY ',' ENCLOSED BY '"'LINES TERMINATED BY '\n'
    5. mysql SELECT * FROM  employee INTO OUTFILE 'c:/var/lib/mysql-files/ employee.csv'FIELDS TERMINATED BY ',' ENCLOSED BY '"'LINES TERMINATED BY '\n' 

3.Export GNUCASH data through Graphic tools 

A tool is develop by me in order to extract the customer, vendor and employee data from the graphic user Interface (GUI) of Gnucash.This tool have some limitations, but work like a champ.

Read more at https://ppsolutionnet.blogspot.com/2017/01/gnu-cash-graphic-custumer-export-tool.html 

4.Export GNUCASH data from the xml file (gnucash file itself)

Under construction.

A tool is being created by me to export data from the gnucash file directly. This tool is beta and will be released soon. You may consider to donate if you wan to support the cost of this project.

Requirements:
7-zip. To download 7-zip, please visit their download page at http://www.7-zip.org/download.html


Please leave a comment to improve this article.



Contact Us

PPSolution.net

For any inquiries or request you can contact us at the following contact details.

C: +599 9 6940875
F: +599 9 8680265
E: ppssupport@hotmail.com

Business hours:
Mon - Fri 09:00 - 18:00 (-04:00 GMT)