Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2009, 02:31 PM
Member
 
Join Date: Mar 2009
Posts: 14
Rep Power: 0
nida is on a distinguished road
Default Import error for csv file in outlook
Hi,
I have exported my contacts in a csv file , file is created but when i import it into outlook following error message is displayed:

File error has encountered in csv(window) translator while initializing translator to build field map .

But when i open the csv file and save it as in CSV format again , it is imported without any error,

Following is the code to create csv File:

CSVWriter writers = new CSVWriter(new FileWriter("c:\\Contacts.csv"), ',');
writers.writeNext(header);
writers.writeAll(pda.getContacts(login_id), false);
writers.close();
can any one help me?
Thanks.

Last edited by nida; 05-21-2009 at 02:45 PM.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 05-21-2009, 02:51 PM
OrangeDog's Avatar
Senior Member
 
Join Date: Jan 2009
Location: Cambridge, UK
Posts: 838
Rep Power: 2
OrangeDog is on a distinguished road
Default
And what package is CSVWriter in?
__________________
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-23-2009, 11:28 AM
Member
 
Join Date: Mar 2009
Posts: 14
Rep Power: 0
nida is on a distinguished road
Default
it's com , r u asking about???
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-23-2009, 12:14 PM
Senior Member
 
Join Date: Feb 2009
Posts: 589
Rep Power: 1
pbrockway2 is on a distinguished road
Default
> when i import it into outlook following error message is displayed:

Microsoft plays fast and loose with formats, so it quite possible that opening and saving the file again in whatever their spreadsheet app is called will result in a csv file that Outlook will use without complaining.

Some Java csv libraries (like Ostermiller's) give you an option of saving in a format that Microsoft can understand. But OD is right: you really have to say what package this CSVWriter you are using comes from. It isn't a standard Java class - so unless you say, no-one can know the first thing about it.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to import a ejb bean in java file vijayinani Enterprise JavaBeans 2 06-30-2009 11:05 PM
Getting access denied error while importing file using input type="file" with IE7 sarang1 Advanced Java 5 03-08-2009 02:50 AM
how to import war file with tomcat? makpandian NetBeans 0 12-31-2008 12:00 PM
Pre-Populating an Outlook Email KeithHenn Advanced Java 3 10-23-2008 04:13 PM
error with import java.io.* osval New To Java 4 08-06-2007 10:12 PM


All times are GMT +2. The time now is 05:27 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org