Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import data from Google Spreadsheets into MySQL

To do our annual stock counting, we have been using Google Spreadsheets, in a small company. As I am building an inventory management system, I am wondering what the best-practices are, when importing the data to MySQL.

The spreadsheets have the following structure:

PartNo. | Vendor | Title     | Quantity | Cost | Sum | EAN           | Comment | Price
841750  | Volvo  | Oil filter| 5        |   10 |  50 | 1234567812345 |         |    18
20.1418 | MarinH | Light     | 1        |   44 |  44 | 1234567812346 |         |    80

Google offers me the opinion to export to csv files, which mysql can read, but is there some smarter method?

You're also welcome to suggest me a database table structure :-)

like image 264
Ragnar123 Avatar asked Oct 25 '22 23:10

Ragnar123


1 Answers

Check this out:

how to import excel spreadsheet as table into mysql

Navicat has a "table import wizard" functionality. It's a free download from http://www.navicat.com/download.html and it will import Excel spreadsheets and create a new table in MySQL.

Using the above approach you could export your Google spreadsheet as an Excel .xls file and then use Navicat to import it to MySQL.

The option you described through a CSV file is also really good! I'd try that first. There are great tutorials on the internet showing you how to import a delimited .csv into a MySQL table.

like image 126
Leniel Maccaferri Avatar answered Nov 15 '22 07:11

Leniel Maccaferri