Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-21
11
Medium Priority
?
279 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
  • 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
Technology Partners: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

916 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