Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

No way to export or convert to sql from Numbers?

Does anyone know of a simple way for me to convert a .csv or excel file to SQL? I am trying to update a MySQL table that I downloaded as .csv. and using Numbers/Excel to edit. But after editing and then re-exporting, PhpMyAdmin won't import the new .csv (even into a completely new and empty Table).


Neither Numbers or Excel seem to have an export option for SQL and my web host company has been no help on this. I have never had problems in past importing csv to a MySql DB or table. They're only answer is that I need to convert the .csv to sql or it won't work.


Can anyone help?


Thanks

Posted on Nov 15, 2017 9:41 AM

Reply
5 replies

Nov 15, 2017 10:08 AM in response to GeminiiFilms

Hi,


.csv stands for character-separated-values. It's a commonly used format for exchanging data between apps that can read it.


SQL stands for structured query language. It is not a data format; it's a language for extracting information from data arranged in tables. So Numbers and Excel can't export in an SQL "format" because such a format does not exist.


Have you tried File > Export to > CSV ... ? Then see if PhpMyAdmin can import that exported .csv file.


SG

Nov 15, 2017 10:36 AM in response to GeminiiFilms

GeminiiFilms wrote:


They said I need to export as .sql and use that to import. Is there any MacOs app that can be used to do this?


I think there must be a misunderstanding there. As noted above you cannot "export as .sql". You can export as .csv and then import .csv into a database. There are many online references discussing how to import .csv with PhpMyAdmin. Here's one. If that doesn't do the trick for you just do a search for "import csv PhpMyAdmin" and you will get hundreds of hits.


SG

Nov 15, 2017 10:58 AM in response to SGIII

Hi. Sorry for any misunderstanding, but I do know how to import a .csv file into MySql through PhpMyAdmin, have done so many times. But the problem is that this file will not import and the hosting company is telling me that it can only accept an .sql file which makes no sense to me. The DB is fully setup, and this table (not entire DB) was exported as a .CSV to begin with from PhpMyAdmin.


So I suppose the more accurate question is not how to export as .sql, but is there a way to convert this table which is now a .csv into an .sql table on a Mac?


I have been researching all day, and there only seems to be fairly pricey services that can do this, but I would prefer to use an App or utility on MacOS if possible.


Thanks

Nov 15, 2017 11:53 AM in response to GeminiiFilms

Again, SQL stands structure query language. It is not a format for data exchange. It is not a format for a table, in Numbers or any other app. It is a language for extracting data from tables in a database.


You need to have a document in Numbers with one table in it. File > Export to > CSV... Open that exported .csv file in TextEdit or another text editor to double-check that the format is exactly what your MySQL database expects. Close the file. Import it into your MySQL database using PhpMyAdmin in the usual way.


SG

No way to export or convert to sql from Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.