0

I have 100+ XLSX files that I need to get into a MySQL Database. Each file is a bit different, so I've created a massive table that contains a field for each possible column header across all files. This way they can auto-map on import.

Using Navicat I can import the files one at a time, but I'm wondering if there is a way to import all of the files at one time?

McB
  • 1,082
  • 1
  • 18
  • 36
  • This appears to be very similiar to [3621798](http://stackoverflow.com/questions/3621798) or [8031193](http://stackoverflow.com/questions/8031193) – arober11 Dec 02 '12 at 23:14

1 Answers1

0

I'm thinking 'no' but if your going to do this a lot I think there are ways to automate this.

Export your xls-files into csv-files instead. Write some script to transform them between csv-excel style to csv-mysql style.

Create tables for importing with the csv engine. Put your files inplace of the ones created by mysql and flush tables. Now your data is ready to be read inside mysql and copied over to more powerful tables engines.

Another way is to do a VBA-script that exports the data in a format recognized by load data infile and then load them using mysql.

Andreas Wederbrand
  • 38,065
  • 11
  • 68
  • 78