SQL with excel

alicekud88 posted 4 months ago in General

HOW could I import data of excel by the help of SQL to work effeciancly

naknak987 posted 4 months ago

Are you trying to import data into a database with HeidiSQL?

If so, open the excel file and save it as a csv file. You will want to make the data in the excel file as close to the tables format as possible, same columns, etc. Then in HeidiSQL, under the tools menu button, you will see a button "Import CSV file...". There are many options in the dialog that pops up, I won't cover them here.

I would create a test database, and test importing that excel file until get the format and settings correct before importing into your actual database.

abu posted 4 months ago

@naknak987 is there any way to import a csv so that a database table is generated on the fly, using csv 1st line headers as table field names?

naknak987 posted 4 months ago

No, that does not appear to be possible. You will need to setup your database table with the appropriate columns first.

Please login to leave a reply, or register at first.