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!
- Export GNUCASH data through Mysql workbench
- Export GNUCASH data through Mysql command
- Export GNUCASH data through Graphic tools
- 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.- 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)
- 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!!!
https://dev.mysql.com/doc/refman/5.7/en/installing.htm.
- Open gnucash and open the desire gnucash file to convert
- Save as that file with the MYSQL format, with the mysql account you created earlier in the Mysql setup with it correspondent password.
- Close Gnucash
- 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
- Folow the steps from Install Mysql and Covert Gnucash xml file to Mysql database from "1.Export GNUCASH data through Mysql workbench"
- Start command prompt and type the following command (I assume you install Mysql in C:\Mysql)
- C:
- Cd C:\Mysql\bin
- mysql
SELECT *
FROM customers
INTO OUTFILE 'c:/var/lib/mysql-files/
customers
.csv'FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
mysql
SELECT *
FROM vendors
INTO OUTFILE 'c:/var/lib/mysql-files/
vendor
.csv'FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
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.
No comments:
Post a Comment