Export / Edit and Import an Excel CSV via phpmyadmin
#41
Posted 04 April 2006, 06:20
I have tried to export the tables as described, I have read and understand what you are saying but my myphpAdmin does have the Windows or a zip button and everytime I try it a different way it wants me to download the whole SQL file ie a backup.
I also am not so sure this will even work for me because I have a ^ delimited products.dat file(which can be opened by EL and open office) and the line returns well there is none
ex. product_name^item^3.90
Could someone give me a general idea how I could add a this kind of file. Because I agree with the other guy who posted on page one that EP&PA and even the excel import didnt work.
Maybe I should just stick to snail pace. I dunno
Thanks for any help,
Keep up on osCommerce changes and updates at Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.
#42
Posted 04 April 2006, 19:11
matrix2223, on Apr 4 2006, 06:20 AM, said:
I have tried to export the tables as described, I have read and understand what you are saying but my myphpAdmin does have the Windows or a zip button and everytime I try it a different way it wants me to download the whole SQL file ie a backup.
I also am not so sure this will even work for me because I have a ^ delimited products.dat file(which can be opened by EL and open office) and the line returns well there is none
ex. product_name^item^3.90
Could someone give me a general idea how I could add a this kind of file. Because I agree with the other guy who posted on page one that EP&PA and even the excel import didnt work.
Maybe I should just stick to snail pace. I dunno
Thanks for any help,
What version of PHPMyAdmin are you running? My example's were originally posted when I was using 2.6.1, and should be compatible upward.
If you can't export, then I would suggest updating PMA, if your host allows.
Meanwhile: just for those who don't understand the basics of exporting a table, below are some visual guides.
Hope they help :-)
[img]http://www.euro-guard.co.uk/images/basic1.gif[/img]
[img]http://www.euro-guard.co.uk/images/basic2.gif[/img]
[img]http://www.euro-guard.co.uk/images/basic3.gif[/img]
Following these steps will provide you with a CSV on your desktop.
If you want it zipped, Zip it.
A/ Two. But the lightbulb has to really 'want' to change.
#43
Posted 05 April 2006, 01:05
If I know how to post a screen shot I would do that so everyone can see.
Thanks for the help
Keep up on osCommerce changes and updates at Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.
#44
Posted 05 April 2006, 01:46
matrix2223, on Apr 4 2006, 09:05 PM, said:
If I know how to post a screen shot I would do that so everyone can see.
Thanks for the help
You're way, way behind. The current version is 2.8.0.2. I suggest you download and install the most recent stable version, you'll be glad you did.
Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
#45
Posted 05 April 2006, 16:43
But really, I am learning so much and I appreciate all of this help!
#46
Posted 05 April 2006, 16:48
Since I have a hosting company that has PHP and MySQL available,( but I can't really play with it until I upgrade my service...which I'm not ready to do...) You show the Myphpadmin page... is that a generic page that everyone gets to from their hosting company or do you have to go to the PHP site to do what you are talking about. Sorry to be such a beginner....
#47
Posted 05 April 2006, 16:58
Nanci, on Apr 5 2006, 12:48 PM, said:
Since I have a hosting company that has PHP and MySQL available,( but I can't really play with it until I upgrade my service...which I'm not ready to do...) You show the Myphpadmin page... is that a generic page that everyone gets to from their hosting company or do you have to go to the PHP site to do what you are talking about. Sorry to be such a beginner....
It's not hard to install although the directions are a little cryptic.
Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
#48
Posted 06 April 2006, 00:24
Or would you suggest finding a hosting company that does allow it??
THANKS!!!
#49
Posted 06 April 2006, 00:30
Nanci, on Apr 5 2006, 08:24 PM, said:
Or would you suggest finding a hosting company that does allow it??
THANKS!!!
Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
#50
Posted 08 April 2006, 10:49
#51
Posted 08 April 2006, 22:22
thewrath1, on Dec 5 2005, 11:07 PM, said:
I hope this explains things a bit easier...
[img]http://www.euro-guard.co.uk/images/instructions_csv_idiots.gif[/img]
That screenshot was excellent. It helps but now I am not getting the products_to_categories to show any of the new records that are showing up in the products section. I have set all of my products_ids to match what was initially there, but the new products wont show anywhere else. Am I missing something? Does anyone have a script I can write in mySQL to create my products database over from scratch? and If so, could you explain to me what ways to change the verbiage so that I can make my own columns? I am sorry but I don't understand php language, looks like html but the latin version to it...LOL
#52
Posted 08 April 2006, 23:50
selmaboyd, on Apr 8 2006, 06:22 PM, said:
Okay, so I just got the products_to_Categories to show the new products, but I still don't see it on oscommerce admin. Any help here guys?
#53
Posted 09 April 2006, 10:21
I have tried this every which way without success. I keep getting the above error message.
I've exported into Windows Excel, Mac Excel (I use OS X 10.4.6) and plain old CSV. I've compressed it, and exported it uncompressed. I've exported the file and immediately imported it without making any changes, and I still get the same error.
SQL-query :
LOAD DATA LOCAL INFILE '/tmp/phpymOtDD' REPLACE INTO TABLE `products`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
MySQL said:
#1148 - The used command is not allowed with this MySQL version
Yes the escape character has been put in as a double backslash.?
I've also tried removing the \n from Lines Terminated, same result.
Browsers used Safari 2.0.3 and Firefox 1.5.0.1 although I can't see it will make a difference.
phpMyAdmin 2.5.6
MySQL 4.1.7
Apache/2.0.55 (Unix) mod_ssl/2.0.55 OpenSSL/0.9.7a 5.0.5 (Zend: 2.0.5)
Does anyone have any idea why this works for some and yet others keep getting this error?
This, for me at least, is potentially very useful, not only for populating the store but for making changes such as global price changes. With several thousand items that is not something I would care to do through the admin backend.
Help. Please.
#54
Posted 09 April 2006, 11:24
datasmog, on Apr 9 2006, 06:21 AM, said:
I have tried this every which way without success. I keep getting the above error message.
I've exported into Windows Excel, Mac Excel (I use OS X 10.4.6) and plain old CSV. I've compressed it, and exported it uncompressed. I've exported the file and immediately imported it without making any changes, and I still get the same error.
SQL-query :
LOAD DATA LOCAL INFILE '/tmp/phpymOtDD' REPLACE INTO TABLE `products`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
MySQL said:
#1148 - The used command is not allowed with this MySQL version
Yes the escape character has been put in as a double backslash.?
I've also tried removing the \n from Lines Terminated, same result.
Browsers used Safari 2.0.3 and Firefox 1.5.0.1 although I can't see it will make a difference.
phpMyAdmin 2.5.6
MySQL 4.1.7
Apache/2.0.55 (Unix) mod_ssl/2.0.55 OpenSSL/0.9.7a 5.0.5 (Zend: 2.0.5)
Does anyone have any idea why this works for some and yet others keep getting this error?
This, for me at least, is potentially very useful, not only for populating the store but for making changes such as global price changes. With several thousand items that is not something I would care to do through the admin backend.
Help. Please.
check your MySQL language. I found that these commands are sometimes different for languages...I had lang for MyPHP admin set at en-utf-8 and MySQL connection collation set to cp1251_Ukrainian_ci
This worked but I had to try the different language settings in the MyPHP admin SQL home page. Another thing that worked successfully for me was the contribution at this link:
http://www.oscommerce.com/community/contri...5/category,all/
Start by installing version 1 dated 15 Nov 2002. it comes with very good detailed directions, then install and replace the excel.php file with the upgraded contribution dated 29 Jul 2005.
After this you can see the changes immediately on your oscommerce manager pages. One other note, I prefered to save my files as Tab Deliminated Text, for one, you can work on your spreadsheet in excel and then select Tab Deliminated Text for the save as function. I liked this better than CSV because it uses a simpler seperator [tabs] and it doesn't get confused with anything else that might appear in your spreadsheet. Also, because you can even view and edit in Notepad, which I also liked because you can see all the columns lined up and all you have to do is use tab button to move them over.....this really worked for me because I have thousand of products that each have lengthy descriptions and everything imported and exported in a synch!
#55
Posted 09 April 2006, 20:29
keithratliff, on Nov 15 2005, 11:50 PM, said:
You will need to make at least 4 manually modifications. Actually 4 csv files can do all this for you.
1) Create your entry in the "products" table... You will need to know the identifier of this record.
2) Create your entry in the "products_description" table. You will need to use the same identifier to link this description of the item back to the "products" table.
3) Create a category in the "category" table.. You will need remember the record identifier.
4) Create an entry in the "products_to_categories" that link the "products" table entry to the "category" table entry.
I followed everything you said up until directions # 1 I am now totally lost.
Could you please ( or someone else if they have the time) explain to me:
1) what you mean by the "identifier" of the "products" table and how do I figure out what the identifier is?
2) Is the identifier generated by the computer or do I pick my own products id numbers and so on?
3) If my products have their own Manufacturers UPC information for identifying their products, how do I imput them?
4) One more thing, I installed the excel contribution so, I don't know if I may have some conflict with anything here. I also installed the upgrade to the original contribution but I didn't like it, both gave me problems with the fields.
5) If I go into the PHP file myself, is there a code that I can add to get my MUPC's put on so that the tables can be organised by this so that customer order fullfillment could be easier?
6) One more thing...I use the same manufacturer for all of my products, is there any way I can make my storefront have a way customers can browse by Design Style instead of Browse by Manufacturer?
----------Does anyone have the code for doing this too?
I MUCH MUCH MUCH Appreciate any help that anyone can give me.
#56
Posted 10 April 2006, 11:49
selmaboyd, on Apr 9 2006, 12:24 PM, said:
Thanks for the response, but it's not the languaage.
This error is caused by the "Load Data Local" command and is a "Security Feature" in current versions of MySQL. It is possible to configure MySQL without this feature, but it is a default setting.
There are workarounds if you know how and can be bothered to faff around, but ask your hosting company to change the settings their end, it's simpler.
#57
Posted 11 April 2006, 20:32
selmaboyd, on Apr 9 2006, 08:29 PM, said:
Could you please ( or someone else if they have the time) explain to me:
1) what you mean by the "identifier" of the "products" table and how do I figure out what the identifier is?
2) Is the identifier generated by the computer or do I pick my own products id numbers and so on?
3) If my products have their own Manufacturers UPC information for identifying their products, how do I imput them?
4) One more thing, I installed the excel contribution so, I don't know if I may have some conflict with anything here. I also installed the upgrade to the original contribution but I didn't like it, both gave me problems with the fields.
5) If I go into the PHP file myself, is there a code that I can add to get my MUPC's put on so that the tables can be organised by this so that customer order fullfillment could be easier?
6) One more thing...I use the same manufacturer for all of my products, is there any way I can make my storefront have a way customers can browse by Design Style instead of Browse by Manufacturer?
----------Does anyone have the code for doing this too?
I MUCH MUCH MUCH Appreciate any help that anyone can give me.
1,2) The identifier is the row number, which is given to that row (ie: a row with a product) when inserting it into the db.
The row number, is unique, and increments by 1 automatically. It has to be unique.
If you keep inserting things into the db, the row number will just continue, unless you choose to replace the existing numbers.
When I export a table, I empty it, and when bringing it back i replace any existing, so the numbers always remain the same as they were.
3) The manufacturer id is a column in the product table, the number is referred to the manufacturer table values.
So if you change them in this column in products, they can be found on the site when looking at that particular manufacturer.
4) I cant speak for the Excel contrib, as I have never used it, never needed to. As I remember, Easy Populate is the same contrib, taken further, which is how EP began.
5) If you are looking to add an extra field for a Manufacturer code, you can do one of 2 things, either set it as a products attribute, or get someone or a contrib to help u add an extra column to the products table.
Im sure you will find this aleady done many times on the forum.
6) Again, this could be done 2 ways, either a complete duplicate of the way manufacturers work, except by style. Or, preferably, as a product attribute, which is what this was designed for.
You choose your styles, colours, finishes, and fill them at the time of enetering products.
These values can then be applied when searching through your products by visitors.
Hope this helps.
thewrath1
A/ Two. But the lightbulb has to really 'want' to change.
#58
Posted 29 April 2006, 14:56
Thanks for all your tips.
Jo
#59
Posted 29 April 2006, 16:33
I know this sounds like a nubie question
Thanks
Keep up on osCommerce changes and updates at Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.
#60
Posted 03 May 2006, 15:06
So : i'm working on a database which present some products ( a lot of products ^^)
someone made an excel array with every datas i need so i export this file in CSV to import it in phpmyadmin.
but my problem is that the original file (.xsl) contain some special charts like " ' " or " é " and my database in phpmyadmin is in UTF8 : it means that it cuts some strigs when tere is some ' or other special charts... annoying ^^
how can i export my original file in CSV UTF8 ? is it possible ?
or simply : what can i do to conserv my special chart in final database ?
thanks a lot to everyone which will help me ^^














