Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CSV report having double quotes

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CSV report having double quotes
 Login/Join
 
Guru
posted
Hi All,
I am trying to generate CSV report and schedule it in Report caster. The scheduled output coming in mail is having double quotes around the Report header and Data values.
But when I run it from Dev studio, it gives proper output i.e, the headers and data values are comma separated only which is desired.
Is there some problem in RC config settings which is adding this double quotes. How can I remove it in report received via Email? Please suggest.

Thanks.

This message has been edited. Last edited by: FP Mod Chuck,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Virtuoso
posted Hide Post
What HOLD format are you using? Could you provide a simple example using sample data so we can see what you're doing?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
quote:
WebFOCU

Hi,
I am using below code :

 
TABLE FILE CAR
PRINT CAR
MODEL
BODYTYPE
BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT COMT
END
-RUN

 

The csv file received in mail is as below:

 
"CAR","MODEL","BODYTYPE"
"JAGUAR","V12XKE AUTO","CONVERTIBLE"
"JAGUAR","XJ12L AUTO","SEDAN"
"JENSEN","INTERCEPTOR III","SEDAN"
"TRIUMPH","TR7","HARDTOP"
"PEUGEOT","504 4 DOOR","SEDAN"
"ALFA ROMEO","2000 4 DOOR BERLINA","SEDAN"
"ALFA ROMEO","2000 GT VELOCE","COUPE"
"ALFA ROMEO","2000 SPIDER VELOCE","ROADSTER"
"MASERATI","DORA 2 DOOR","COUPE"
"DATSUN","B210 2 DOOR AUTO","SEDAN"
"TOYOTA","COROLLA 4 DOOR DIX AUTO","SEDAN"
"AUDI","100 LS 2 DOOR AUTO","SEDAN"
"BMW","2002 2 DOOR","SEDAN"
"BMW","2002 2 DOOR AUTO","SEDAN"
"BMW","3.0 SI 4 DOOR","SEDAN"
"BMW","3.0 SI 4 DOOR AUTO","SEDAN"
"BMW","530I 4 DOOR","SEDAN"
"BMW","530I 4 DOOR AUTO","SEDAN"
 


I don't want the double quotes around header and values. Please suggest.

Thanks
Anil


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Virtuoso
posted Hide Post
How should the character fields be treated then? No quotes, Single Quotes?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
quote:
But when I run it from Dev studio, it gives proper output i.e, the headers and data values are comma separated only which is desired.

Executed either from DS/AS/RC they all generates the file with double quotes surrounding the heading and data. The double quotes insure the integrity of the string.
I haven't found any option to have them removed automatically.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
As MartinY says, if you don't like the default way the csv is created, you can create your own like this:
DEFINE FILE CAR
CM/A1=',' ;
END
TABLE FILE CAR
PRINT COUNTRY CM CAR CM MODEL 
ON TABLE SAVE 
END


The double quotes make the CSV readable by the standard tools like Excel which opens this file properly because it has the double quotes and commas in it.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
If you generate comma-delimited output without the double-quotes (as in Babak's code), note that trailing blanks will not be suppressed.

More important, you will be in deep trouble if a data value happens to contain a comma.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Thanks All for your valuable suggestion.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CSV report having double quotes

Copyright © 1996-2020 Information Builders