Solved

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

Posted on 2011-03-21
11
273 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
Independent Software Vendors: 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 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

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 describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

739 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