S
So_Long
Sorry for asking so many questions, but I'm totally snowed. I've long used the Microsoft Works spreadsheet program on my PC. I would organize data, export it a CSV file (to Notepad), then import the CSV into a MySQL database table.
Now I'm trying to repeat that process on a Mac, using Excel (Microsoft Office for Mac) and a phpMyAdmin upgrade. So I'm not sure where the problems are, but they probably begin with the radically different CSV file.
First, I open an Excel spreadsheet. Then I click SAVE AS and, under Format, choose Comma Separated Values (.csv). The resulting file looks nothing like the Notepad CSV files I'm used to. Instead, it looks like a watered down spreadsheet - with no visible commas between table cells/fields.
When I try to import the CSV file into a database table using phpMyAdmin's default settings...
Fields terminated by... ;
Fields enclosed by... "
Fields escaped by... \
Lines terminated by... auto
....I get this error message:
"Invalid field count in CSV input on line 1."
When I change Format of Imported File to "CSV using LOAD DATA," it works - but it only imports the first row. I changed "Fields terminated by" to , (comma), since that's what's SUPPOSED to be in a CSV file. I also tried changing "Lines terminated by" from auto to \r\n, as that's what I use in my spreadsheets.
I also tried deleting the entries for Fields Enclosed/Ecaped by, which I don't really understand. I think I either used the default settings or slightly modified one of them on my PC.
It's hard to troubleshoot when I'm getting used to a radically different CSV file and a phpMyAdmin upgrade both. But I think I need to figure out the CSV file first.
Can anyone tell me how YOU get data from Excel for Mac into a MySQL database table? To give you an idea of what sort of data I'm working with, a typical row might include the following:
Cell 1: 5
Cell 2: <http://www.sharks.com>
Cell 3: This website's all about sharks. You should check it out!
Cell 4: January 14, 2007
In other words, I'm simply using my spreadsheet to store numerals, dates, URL's and brief amounts of text. I just need to know how to get it into my database.
Thanks.
Now I'm trying to repeat that process on a Mac, using Excel (Microsoft Office for Mac) and a phpMyAdmin upgrade. So I'm not sure where the problems are, but they probably begin with the radically different CSV file.
First, I open an Excel spreadsheet. Then I click SAVE AS and, under Format, choose Comma Separated Values (.csv). The resulting file looks nothing like the Notepad CSV files I'm used to. Instead, it looks like a watered down spreadsheet - with no visible commas between table cells/fields.
When I try to import the CSV file into a database table using phpMyAdmin's default settings...
Fields terminated by... ;
Fields enclosed by... "
Fields escaped by... \
Lines terminated by... auto
....I get this error message:
"Invalid field count in CSV input on line 1."
When I change Format of Imported File to "CSV using LOAD DATA," it works - but it only imports the first row. I changed "Fields terminated by" to , (comma), since that's what's SUPPOSED to be in a CSV file. I also tried changing "Lines terminated by" from auto to \r\n, as that's what I use in my spreadsheets.
I also tried deleting the entries for Fields Enclosed/Ecaped by, which I don't really understand. I think I either used the default settings or slightly modified one of them on my PC.
It's hard to troubleshoot when I'm getting used to a radically different CSV file and a phpMyAdmin upgrade both. But I think I need to figure out the CSV file first.
Can anyone tell me how YOU get data from Excel for Mac into a MySQL database table? To give you an idea of what sort of data I'm working with, a typical row might include the following:
Cell 1: 5
Cell 2: <http://www.sharks.com>
Cell 3: This website's all about sharks. You should check it out!
Cell 4: January 14, 2007
In other words, I'm simply using my spreadsheet to store numerals, dates, URL's and brief amounts of text. I just need to know how to get it into my database.
Thanks.