<div dir="ltr">I agree with Scott Nelson. I refuse to to CSV because I can't guarantee what the users have entered will work unless xlating the quotes and commas during the export - and then I am modifying their data.<div><br></div><div>I prefer tab delimited. </div><div>export ascii rpt= /usr/tmp/report.txt r=\n f=\t<br></div><div>or</div><div>export ascii out=(filename) r=\n f=\t</div><div><br></div><div>Excel and SQL recognize it naturally, and a TAB cannot be entered by a user into a data field.</div><div><br></div><div>If some recipient can't handle it, I will sometimes convert to Excel for them.</div><div><br></div><div>PS. I'll tolerate a pipe delimiter (as used in Informix), since it is unlikely to be entered by a user.<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Timothy R Barr, CPE, VP/CTO<br>Evaluator Services and Technology, Inc</div><div>1801 Oberlin Rd, Suite 204</div><div>Middletown, PA 17057<br><span><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice">717-985-1122</span></span></span></span> x 1131</span></div><div><span><span title="Call with Google Voice"><span title="Call with Google Voice">855-569-6022</span></span> (Tollfree Middletown)</span><br><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice"><span title="Call with Google Voice">855-500-6022</span></span></span></span> (Tollfree Fax)<br></div><div><a href="mailto:tim.barr@evalsvs.com" target="_blank">tim.barr@evalsvs.com</a></div><div><img src="http://images.evalsvs.com/ESTLogo.png" width="200" height="57"><br></div></div></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br><br>---------- Forwarded message ----------<br>From: Scott Nelson <<a href="mailto:scott@logicdatasystems.com">scott@logicdatasystems.com</a>><br>To: Jean-Pierre Radley <<a href="mailto:appl@jpr.com">appl@jpr.com</a>>, "<a href="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a>" <<a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>><br>Cc: <br>Bcc: <br>Date: Sun, 2 Jul 2017 12:05:18 -0500<br>Subject: Re: CSV export issues<br>I stopped doing CSV because of the issues with commas and quotes. I do Pipe delimited files, save them as .pi or .txt and give the customer instructions on importing into excel.<br>
<br>
export word rpt=(f) is the correct sytax, but you don't want @td since it has slash in it.<br>
<br>
<br>
<br>
On 07/01/2017 03:44 PM, Jean-Pierre Radley via Filepro-list wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I am trying to generate a spreadsheet using<br>
<br>
export word rpt= /usr/tmp/report.csv<br>
<br>
The filePro file is an inventory of metal parts. In the Description<br>
field the single or double quote may show up as the conventional<br>
abbreviation for feet or inches, e.g.:<br>
<br>
6" DIAL CALIPER WHITE FACE<br>
<br>
Whenever this happens, processing goes nuts at the quote-mark: all the<br>
fields of every record up to the next one with a quote-mark are output<br>
on the same line of the CSV file. If there are over 600 records between<br>
two fP records with a quote mark, the CSV file will have a line with<br>
over 600 columns.<br>
<br>
I can of course use an edit to remove the quote-marks, but is there some<br>
way to use some escape mechanism to preserve them in the CSV?<br>
<br>
Another minor annoyance: I wanted to define the output file from data<br>
in the filePro input. Say field 1 is the customer number:<br>
<br>
f = 1 { "-" { @td; export word rpt=f<br>
or<br>
f = 1 { "-" { @td; export word rpt=(f)<br>
<br>
Neither works.<br>
<br>
</blockquote>
<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Bill Campbell <<a href="mailto:bill@celestial.com">bill@celestial.com</a>><br>To: <a href="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a><br>Cc: <br>Bcc: <br>Date: Sun, 2 Jul 2017 12:58:08 -0700<br>Subject: Re: CSV export issues<br>On Sat, Jul 01, 2017, Jean-Pierre Radley via Filepro-list wrote:<br>
>I am trying to generate a spreadsheet using<br>
><br>
> export word rpt= /usr/tmp/report.csv<br>
><br>
As others have pointed out, CSV files have problems dealing with<br>
quotes, and not all CSVs are created equally depending on the<br>
spreadsheet program.<br>
<br>
I've found that using tab-delimiters instead of commas tends to<br>
have fewer issues as tabs aren't generally found in ascii fields,<br>
and are readily accepted by spreadsheets.<br>
<br>
My most frequent use is exporting data from my Unify based<br>
accounting software to LibreOffice Calc from SCO OpenServer to<br>
CentOS Linux where I avoid the issue by using a MySQL table as<br>
the transfer agent avoiding any issues with data types.<br>
<br>
Bill<br>
--<br>
INTERNET: <a href="mailto:bill@celestial.com">bill@celestial.com</a> Bill Campbell; Celestial Software LLC<br>
URL: <a href="http://www.celestial.com/" rel="noreferrer" target="_blank">http://www.celestial.com/</a> PO Box 820; 6641 E. Mercer Way<br>
Voice: <a href="tel:%28206%29%20236-1676" value="+12062361676">(206) 236-1676</a> Mercer Island, WA 98040-0820<br>
Fax: <a href="tel:%28206%29%20232-9186" value="+12062329186">(206) 232-9186</a> Skype: jwccsllc <a href="tel:%28206%29%20855-5792" value="+12068555792">(206) 855-5792</a><br>
<br>
Foreign aid might be defined as a transfer from poor people in rich<br>
countries to rich people in poor countries -- Douglas Casey<br>
<br>
<br>______________________________<wbr>_________________<br>
Filepro-list mailing list<br>
<a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.<wbr>com</a><br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" rel="noreferrer" target="_blank">http://mailman.celestial.com/<wbr>mailman/listinfo/filepro-list</a><br>
<br></blockquote></div><br></div></div></div>