Forums

(solved) General SQL question

chrissy6930 04 Sep, 2013
Hi all,

I hope u don't mind me asking this in here but I'm kinda stuck.
I've got an excel 2010 file with an address list which I need to import into my DB
I used this tutorial to convert xls into xml:
tutorial
my table structure is:
CREATE TABLE IF NOT EXISTS `#__cf_data_companies` (
`cf_id` int(11) NOT NULL AUTO_INCREMENT,
`cf_uid` varchar(255) NOT NULL,
`cf_created` datetime NOT NULL,
`cf_modified` datetime NOT NULL,
`cf_created_by` int(11) NOT NULL,
`cf_modified_by` int(11) NOT NULL,
`cf_ipaddress` varchar(255) NOT NULL,
`cf_user_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`address2` varchar(255) NOT NULL,
`zip` varchar(15) NOT NULL,
`town` varchar(255) NOT NULL,
`cc` varchar(5) NOT NULL,
`phone` varchar(255) NOT NULL,
`web` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`sec` tinyint(4) NOT NULL,
`regs` varchar(10) NOT NULL,
`sigs` varchar(4) NOT NULL,
PRIMARY KEY (`cf_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
could anybody pls tell my why importing the attached xml doesn't work? I just don't see it 😶

Joomla 3.1.5; CF 4.0.1
GreyHead 04 Sep, 2013
Hi chrissy,

Have you tried exporting from Excel to CSV and then importing that using PHPMyAdmin. That works OK , though you might need to do some cleaning up of the UTF-8 characters afterwards. A bit more info in this StackOverFlow answer.

Bob
chrissy6930 04 Sep, 2013
hi Bob,

thats weird... I tried CSV at first... and it didn't work either... and of course I'm using phpmyadmin
pls find my csv file attached
GreyHead 05 Sep, 2013
Hi crissy6930,

That looks as though it should work but there are some problems with the Character set which appears to be losing the accented characters.

Bob
This topic is locked and no more replies can be posted.