?
Solved

Please check to see if there are any characters that are invalid in my CSV

Posted on 2011-03-21
11
Medium Priority
?
275 Views
Last Modified: 2012-05-11
Hi I'm getting an import error with my 3rd party program.

Can you please check to see if anything is in invalid in my attached CSV?
Cake.csv
0
Comment
Question by:Computer Guy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 50
ID: 35178635
Hello,

What error are you getting with your 3rd party program?

The CSV imports fine into Excel. I see that most rows are just comma delimited, but the last field in some rows is encased in double quotes " to ensure that commas within the field are not treated as separate fields. That is standard practice.

What is the 3rd party tool?

cheers, teylyn
0
 
LVL 3

Author Comment

by:Computer Guy
ID: 35178662
Pilotkaraoke.com
Songbook creator
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35178704
The ampersand & and the apostrophe ' are invalid characters in csv files.
Cake-updated.csv
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:Computer Guy
ID: 35178713
Is there any other way around it?
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35178964
Did you try to quote them?
Cake-updated-2.csv
0
 
LVL 3

Author Comment

by:Computer Guy
ID: 35179056
jimyX,

What ever you did worked!

I didn't see any double quotes in the CSV file you uploaded. Can you please be a little more specific on what you did so I can try it?

Thanks!
0
 
LVL 24

Accepted Solution

by:
jimyX earned 2000 total points
ID: 35179088
I just quoted the fields that included & or '.

For example the following lines:
1,Bryan Adams,Cut's Like A Knife
1,Sonny & Cher,I Got You Babe

Became:

1,Bryan Adams,"Cut's Like A Knife"
1,"Sonny & Cher",I Got You Babe

And I updated all the records.
0
 
LVL 3

Author Comment

by:Computer Guy
ID: 35179094
Is there a way to do that audomatically? of do I have to do it manually?
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35179239
May be by using Excel (some codes) that should be possible. Anyway, I use different programming language and that is very much possible.
0
 
LVL 3

Author Comment

by:Computer Guy
ID: 35181542
I did notice when I added the " around the tags with ', when I imported them into my program, I had to remove the ", when I was in the program.

Is there a way to have the " hidden in excel so it won't be part of the text I import?
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35182287
If you import by using a program that can't handle & or ' (unless they are quoted) then Excel can't help you because the csv file is a standard format and does not relate to excel. Excel is just a reader. It's better if you eliminate or replace the & and ' with another suitable symbol or character.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question