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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra quotes appearing in column when exported to CSV

Status
Not open for further replies.

arodri

Technical User
Jul 9, 2010
121
US
Hello,

I have a report that is created in Crysal XI, and we upload it to BusinessObjects InfoView. On InfoView there's no option to export it as CSV, so what I'm doing is exporting it as an "excel data only," then saving it from excel as CSV. As a CSV, I open it in Notepad, and here is a sample of the data I'm getting:

TMCX,MP,51234,bvno@yahoo.com,51234,Jane,Smith,,, 06/01/2011

This was perfect, and now the only thing I need to do is add quotes around the first and last name (Jane,Smith).
This is what I NEED the data to look like when I open it in Notepad:

TMCX,MP,51234,bvno@yahoo.com,51234,"Jane","Smith",,, 06/01/2011

I added the quotes in crystal with the following formula (This adds one quote in crystal):
@FirstName = """"+({MVPSignups.FirstName})+""""

When I upload it in InfoView and save it as an excel first. Up until this point it works perfectly - I get one quote around first and last name in excel. When I save it from excel as CSV format and open it in Notepad, here is what I'm getting:

TMCX,MP,51234,bvno@yahoo.com,51234,"""Jane""","""Smith""",,, 06/01/2011

Does any one know why I'm getting 3 quotes when in Crystal and excel it only shows one? How do I get only one quote?

That's the only formula that gets the single quotes in crystal, but without the formula, I get no qutoes, so I'm sort of stuck!

Thanks in advance for any help!
 
This is really an Excel question, since the Crystal export is OK. Try asking at the Microsoft Office forum, Or first do a SEARCH there.

Or there may be a way to avoid the problem and simplify your procedure. I've got a Crystal set-up that allows csv export, with a choice of delimiters, but with quotes as the default. I have also found that you can get the same effect by combining comma-delimited data in a single large field and exporting that as text. Change the data type and it can be used as csb.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top