Aaron Healey Posted July 4, 2010 Share Posted July 4, 2010 Hi i was wondering is there a way to change the Category ID from Numbers but to letters for example instead of 12345 etc but this insteadABCDEFGHIJ etc please.As i have a client that has a spreadsheet which is 67,000 records. and i dont want to go through all the Category ID's and change to numbers because will take for ever.Is there a way i can do this?Regards,Aaron Link to comment Share on other sites More sharing options...
rocky Posted July 4, 2010 Share Posted July 4, 2010 No, MySQL doesn't support autoincrement with letters instead numbers. Even if it did, this is not a good idea, since you will most likely break something in PrestaShop if you do it. You should try to use your spreadsheet software to convert the letters to numbers for you. A formula that adds together the ASCII code of each character, then subtracts 65 for each character should work. Link to comment Share on other sites More sharing options...
Aaron Healey Posted July 4, 2010 Author Share Posted July 4, 2010 Ok, Also in the fields i have the names for the images already but what is easiest/quickest way to add http://shopper.purchaseit.co.uk/shop_images/ in front of all the image names in the spreadsheet. please as theres 65,000 and the way i been doing it is double clicking in each field and adding the image url Link to comment Share on other sites More sharing options...
rocky Posted July 4, 2010 Share Posted July 4, 2010 This is another thing you should be able to do with a formula. Create a separate column, then add a formula that adds that URL in front of whatever is in the previous column, then convert the column to text, then delete the previous column. Link to comment Share on other sites More sharing options...
Aaron Healey Posted July 5, 2010 Author Share Posted July 5, 2010 Would it be possible for you to upload an example please as i have never done this in Excel before?Regards,Aaron Link to comment Share on other sites More sharing options...
rocky Posted July 6, 2010 Share Posted July 6, 2010 I've attached an excel file with formulas. The formula I'm using to add the URL in front of the image filename is: =CONCATENATE("http://www.example.com/",$C1) I tried to write a formula to convert the letter ID to a number ID. The best I could come up with was: =CODE($A1)-64 This will convert A to 1 and Z to 26, but it only converts the first letter, so AB would be 1 too. It might be possible to write a formula split the string into characters and add together the ASCII codes, but I can't figure out how at the moment. excel.xls Link to comment Share on other sites More sharing options...
Aaron Healey Posted July 6, 2010 Author Share Posted July 6, 2010 Mate you are a star, but i found a addon for excel which can do it as well haha, wasnt free mind you lol but a site i use gives you it for free with serial lolBut that your example is excellent for future reference.Regards,Aaron Link to comment Share on other sites More sharing options...
Recommended Posts