3. HowTo
To find and download the script and supporting files, "Switch to Contents view" (see upper left corner of this page).
- Export from Outlook
Export as csv, have the Outlook instance at hands to understand the columns contents.
- Edit file in Excel (Windows/Macintosh)
You can use any other spreadsheet app if you like. You need to fill the fields that are mentioned in the cfg.py file. See the exmaples for person_fullname and typeofbusiness vs. jobtitle in the Features and Intro pages. More information to come. Any contributions appreciated.
- Prepare file for import
Make sure, the planned delimiter (usually ";") is not inside any field. Save as csv. Transfer to OGo machine (you probably can do this on your workstation) Recode file if neccessary (in my case I had to: recode mac..lat1
) - Start the import
See below.
Actual interactive session:
$ ./import_perscomp.py Please enter username: xxxxx Please enter password for user xxxxx: yyyyy Please enter filename: testlat1.csv . line 1 : Enterprise Bser Test with number SKY393410 inserted. Fetching again ... ... OK. line 1 : Person Hans-Jrgen Karow with number SKY393580 inserted. Assigning Person SKY393580 to Enterprise SKY393410 . Reading line 2 ... continue (nobreaks,noaskstops asking)? line 2 : Enterprise Curriculum with number SKY393770 inserted. Fetching again ... ... OK. !! 2 persons with lastname Meyer exist: Bettina Meyer Peter Meyer Should I insert Karin Meyer anyway? ("yes" inserts, "no" skips)? yes line 2 : Person Karin Meyer with number SKY393940 inserted. Assigning Person SKY393940 to Enterprise SKY393770 . Reading line 3 ... continue (nobreaks,noaskstops asking)? line 3 : Person Anja Teemann with number SKY394130 inserted. . Finished. Parsed 3 lines, Inserted 2 enterprises Inserted 3 persons.
import_perscomp.py - "OGo" instead of "SKY"
I had lots of errors running the script until I replaced all ocurrences of SKY with OGo.
Walter
Script Dies Immediately
awilliam@estate3:~/tmp/SafetyLoad> ./ImportContacts.py
Please enter username: adam
Please enter password for user adam: *****
Please enter filename: SafetyTraining.csv
Traceback (most recent call last):
File "./ImportContacts.py", line 408, in ?
password = cfg.password)
TypeError: __init__() got an unexpected keyword argument 'login'
awilliam@estate3:~/tmp/SafetyLoad>
xmllib.Error
very cool idea.
though i am stuck:
./import_perscomp.py
Please enter username: xxxxx
Please enter password for user xxxxx: yyyyy
Please enter filename: testlat1.csv
/usr/lib/python2.3/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead.
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning)
Traceback (most recent call last):
File "./import_perscomp.py", line 431, in ?
crt_enterprise_number = insert_enterprise ( enterprisedict ) # Check and insert
File "./import_perscomp.py", line 170, in insert_enterprise
number_of_existing_enterprise = enterprise_exists (enterprise['name'] )
File "./import_perscomp.py", line 154, in enterprise_exists
result = server.enterprise.fetch ( "description = '" + name + "'" )
File "/tmp/ogo/xmlrpclib.py", line 829, in __call__
return self.__send(self.__name, args)
File "/tmp/ogo/xmlrpclib.py", line 995, in __request
verbose=self.__verbose
File "/tmp/ogo/xmlrpclib.py", line 866, in request
return self.parse_response(h.getfile())
File "/tmp/ogo/xmlrpclib.py", line 910, in parse_response
p.feed(response)
File "/usr/lib/python2.3/xmllib.py", line 171, in feed
self.goahead(0)
File "/usr/lib/python2.3/xmllib.py", line 382, in goahead
self.unknown_entityref(name)
File "/usr/lib/python2.3/xmllib.py", line 801, in unknown_entityref
self.syntax_error("reference to unknown entity `&%s;'" % name)
File "/usr/lib/python2.3/xmllib.py", line 794, in syntax_error
raise Error(Syntax error at line %d: %s % (self.lineno, message))
xmllib.Error: Syntax error at line 38: reference to unknown entity `™'
any idea what this ™ thing means?
TIA
chris
xmllib.Error
very cool idea.
though i am stuck:
./import_perscomp.py
Please enter username: xxxxx
Please enter password for user xxxxx: yyyyy
Please enter filename: testlat1.csv
/usr/lib/python2.3/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead.
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning)
Traceback (most recent call last):
File "./import_perscomp.py", line 431, in ?
crt_enterprise_number = insert_enterprise ( enterprisedict ) # Check and insert
File "./import_perscomp.py", line 170, in insert_enterprise
number_of_existing_enterprise = enterprise_exists (enterprise['name'] )
File "./import_perscomp.py", line 154, in enterprise_exists
result = server.enterprise.fetch ( "description = '" + name + "'" )
File "/tmp/ogo/xmlrpclib.py", line 829, in __call__
return self.__send(self.__name, args)
File "/tmp/ogo/xmlrpclib.py", line 995, in __request
verbose=self.__verbose
File "/tmp/ogo/xmlrpclib.py", line 866, in request
return self.parse_response(h.getfile())
File "/tmp/ogo/xmlrpclib.py", line 910, in parse_response
p.feed(response)
File "/usr/lib/python2.3/xmllib.py", line 171, in feed
self.goahead(0)
File "/usr/lib/python2.3/xmllib.py", line 382, in goahead
self.unknown_entityref(name)
File "/usr/lib/python2.3/xmllib.py", line 801, in unknown_entityref
self.syntax_error("reference to unknown entity `&%s;'" % name)
File "/usr/lib/python2.3/xmllib.py", line 794, in syntax_error
raise Error(Syntax error at line %d: %s % (self.lineno, message))
xmllib.Error: Syntax error at line 38: reference to unknown entity `& trade ;'
any idea what this & trade ; thing means?
TIA
chris
I am trying to import a database of about 2000 contacts from ACT! and would appreciate if I could use your script.
Thanks in advance,
Venky
Replies to this comment