Importing CSV Using CompanyDirectory
Importing CSV Using CompanyDirectory
I have installed Company Directory on my CMS Made Simple 1.6.6 installation (Apache) and I am trying to use its Import CSV functionality. There is no documentation for this functionality and I can't figure out how to get it to work. Has anybody had better luck? What is the format which the CSV should be made in? How does one add a custom defined field or a Category? How does one indicate that a category is selected (1 or Y or yes or the category name)? I have tried everything but I keep on getting the following error message:
CSV Import Report
Dont know how to handle line 1 with the rule identifier ABC Company
What is a Rule Identifier?
CSV Import Report
Dont know how to handle line 1 with the rule identifier ABC Company
What is a Rule Identifier?
Last edited by Charlie on Wed Feb 10, 2010 1:20 pm, edited 1 time in total.
Re: Importing CSV Using CompanyDirectory
I renamed this posting to make a little clearer. I am wondering if anybody out there knows the format of the CVS input for Company Directory? I have already entered 100 by hand and if I had the CVS import protocol it would make life so much easier.
Thanks!
Thanks!
Re: Importing CSV Using CompanyDirectory
how about exporting to CSV and seeing how it exports, then you'll have a good idea of how it imports...
Re: Importing CSV Using CompanyDirectory
I had this great idea of how to figure out the entry order for Company Direct CVS import: I would create a file with 9 entries of NUMBERS and watch where the numbers end up. I figured maybe the problem was that Company Direct wanted to see a number in the first cell and in the following cells.
Well, no luck. When I tried to import the file (1 was the first number - surprise) I received the message:
CSV Import Report
Dont know how to handle line 1 with the rule identifier 1
But this idea might work for other scripts so I thought I'd share it so all is not lost! And I was able to get Calendar to import CVS data for our Events list. However, the directions in the documentation I found here was incorrect:
http://wiki.cmsmadesimple.org/index.php ... t/Calendar
The correct import format should be:
YY-MM-DD hh:mm, YY-MM-DD hh:mm, Title, Summary, Description, Category
I am not positive, but when I put quotes around everything the import into Calendar went almost flawlessly (almost - but couldn't import double-byte characters). This is the same type of information I am looking for for the Company Directory module.
To save files CVS files from Excel with quotes around all information I suggest you use this Macro which I discovered:
http://www.smokeylake.com/excel/text_write_program.htm
It worked wonders for me.
So the upload worked reasonably well in Calendar but not so far in Company Directory. If you have experience using Company Directory CVS import please leave a note to let me know what the format is.
If you found any of this useful perhaps you could help answer a quick programming question I have outlined here:
http://forum.cmsmadesimple.org/index.ph ... 438.0.html
This requires a bit of programming from somebody with more knowledge than myself! Thanks!
Well, no luck. When I tried to import the file (1 was the first number - surprise) I received the message:
CSV Import Report
Dont know how to handle line 1 with the rule identifier 1
But this idea might work for other scripts so I thought I'd share it so all is not lost! And I was able to get Calendar to import CVS data for our Events list. However, the directions in the documentation I found here was incorrect:
http://wiki.cmsmadesimple.org/index.php ... t/Calendar
The correct import format should be:
YY-MM-DD hh:mm, YY-MM-DD hh:mm, Title, Summary, Description, Category
I am not positive, but when I put quotes around everything the import into Calendar went almost flawlessly (almost - but couldn't import double-byte characters). This is the same type of information I am looking for for the Company Directory module.
To save files CVS files from Excel with quotes around all information I suggest you use this Macro which I discovered:
http://www.smokeylake.com/excel/text_write_program.htm
It worked wonders for me.
So the upload worked reasonably well in Calendar but not so far in Company Directory. If you have experience using Company Directory CVS import please leave a note to let me know what the format is.
If you found any of this useful perhaps you could help answer a quick programming question I have outlined here:
http://forum.cmsmadesimple.org/index.ph ... 438.0.html
This requires a bit of programming from somebody with more knowledge than myself! Thanks!
Re: Importing CSV Using CompanyDirectory
I tried that first off, but the exporting function didn't work - probably because of restrictions on my server - not the developers fault. Maybe somebody else out there could try this for me and the others who are searching for this information.jmcgin51 wrote: how about exporting to CSV and seeing how it exports, then you'll have a good idea of how it imports...
Re: Importing CSV Using CompanyDirectory
Perhaps: http://dev.cmsmadesimple.org/bug/view/4256 ?Charlie wrote: the exporting function didn't work - probably because of restrictions on my server - not the developers fault
Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Importing CSV Using CompanyDirectory
What does that mean? What is SVN?
CMSMS is incredible. But where is Calguy?
I found the order:
id,company_name,address,telephone,fax,contact_email,website,details
Unfortunately it still does not want to import:
CSV Import Report
Dont know how to handle line 1 with the rule identifier company_name
Maybe somebody else can help figure this out?
CMSMS is incredible. But where is Calguy?
I found the order:
id,company_name,address,telephone,fax,contact_email,website,details
Unfortunately it still does not want to import:
CSV Import Report
Dont know how to handle line 1 with the rule identifier company_name
Maybe somebody else can help figure this out?
Re: Importing CSV Using CompanyDirectory
Did anyone else discover a fix to this?
I am having the exact same problem!
TIA
nosyguy
I am having the exact same problem!
TIA
nosyguy
Re: Importing CSV Using CompanyDirectory
I have the same problem! why doesn't it recognize the category? there must be a special trick... would like to know the answer.
Re: Importing CSV Using CompanyDirectory
Also, yes, the Export CSV doesnt seem to work either... as already noted. Othwise i'd try to see how that exported.
It seems as though it never likes the first column, its not really an issue of "catergory' it just doesnt want to import anything.. at least to me.
It seems as though it never likes the first column, its not really an issue of "catergory' it just doesnt want to import anything.. at least to me.
Re: Importing CSV Using CompanyDirectory
Looks like a new xml file was uploaded supposing to fix the bug, but i cant seem to get it to work still..
http://dev.cmsmadesimple.org/project/fi ... ackage-314
anyone else have luck?
http://dev.cmsmadesimple.org/project/fi ... ackage-314
anyone else have luck?
Re: Importing CSV Using CompanyDirectory
Hi all, I've also been having the same problem. Uninstalled and then reinstalled with the latest release and was able bo do an export csv of the one record I had put in the Company Directory. I have close to 1000 records to import so getting the import working is very important for me. I am using for the most part the additional fields for my diredctory so will show the main output I got with the export.
First line of the export csv:
#COMPANY=C|company_name|address|telephone|fax|contact_email|website|details|status|latitude|longitude|hierarchy|FIELD:Rank|FIELD:MOS
I included the first two of my additional fields to show how they are configured in the export.
Next in the export file was a long list of Field Definitions
Then the record line
C|"Public, John Q"|||||||published|0|0||MSG|98Z
So using the exported setup I will tray to import again and see what happens.
Hope this helps someone,
TomH
First line of the export csv:
#COMPANY=C|company_name|address|telephone|fax|contact_email|website|details|status|latitude|longitude|hierarchy|FIELD:Rank|FIELD:MOS
I included the first two of my additional fields to show how they are configured in the export.
Next in the export file was a long list of Field Definitions
Then the record line
C|"Public, John Q"|||||||published|0|0||MSG|98Z
So using the exported setup I will tray to import again and see what happens.
Hope this helps someone,
TomH
Re: Importing CSV Using CompanyDirectory
Well still have not been able to figure it out.
Still getting this error on csv import attempt:
An error occurred at line 1: Dont know how to handle line 1 with the rule identifier C
Tried five or six variations with not luck.
Hope someone figures this out and let us know on the board.
TomH
Still getting this error on csv import attempt:
An error occurred at line 1: Dont know how to handle line 1 with the rule identifier C
Tried five or six variations with not luck.
Hope someone figures this out and let us know on the board.
TomH
Re: Importing CSV Using CompanyDirectory
Maybe my problems with import to another module (FrontEndUsers) and how i solved it, maybe can be a help for you.
I found out if the csv's line endings wasn't Unix (LF) the import would fail even though the data was formatted correct.
I found out if the csv's line endings wasn't Unix (LF) the import would fail even though the data was formatted correct.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Importing CSV Using CompanyDirectory
Yeah, I've made adjustments to Products and other modules for MAC formatted ascii files.
but not to CD yet.
make sure the files are in DOS (\r\n) or even better UNIX (\n) format, and NOT mac (\r) format
for now.
but not to CD yet.
make sure the files are in DOS (\r\n) or even better UNIX (\n) format, and NOT mac (\r) format
for now.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.