Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Peachtree CVS file

Status
Not open for further replies.

SBTBILL

Programmer
May 1, 2000
515
US
The Peachtree CVS file is comma delimited. It puts double quotes around text areas that have a comma in them. I've tried append from type cvs and delimited. Even delimited with ,.

Anyone have any experice importing Peachtree files.

Bill Couture
 
what are you getting that you don't want?
what fields are not coming accross the way you need? Attitude is Everything
 
Most lines work fine. Problem is when an original line is something like 1 3/4" widgit, blue. Fox seems able to handle lines that contain the double quoteor the comma but not the combination.

Bill Couture
 
is there a way you can set in peachtree what is used for a delimiter in their export? Attitude is Everything
 
to add to my last post. if peachtree can export using a tab as a delimiter, that should solve your problem. Attitude is Everything
 
Can't change Peachtree's file export structure. Have been thinking of trying some of the old F commands like FOPEN. Problem with Peachtree is that ACCESS and EXCEL seem to be where all the work has gone on.

Bill Couture
 
I guess you have no choice but to use the low level file functions to scan your file for the pattern.

temp = 'one widget 1.2 ", blue'
stuff(temp,atc('"',temp),1,"'")

of course you will need to loop the ATC function until all occurrences are found

One other thought, will excel import your data then use excel to tab delimit an export from excel? Attitude is Everything
 
Bill,
I had a similar problem, and wrote a little routine to change any double quotes inside a quoted field to be two single quotes, then I could import it. (Then optionally once it was in a table, I could replace any doubled single quotes to a single double quote.)

If you want this code (it's a bit much to post here), I'll send it to you.

Rick
 
If Peachtree can export to Excel, I would do that and import the resulting XLS file.

VFP exports excel data quite well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top