<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 2/25/2011 9:43 PM, Richard Kreiss wrote:
<blockquote cite="mid:000001cbd567$56496730$02dc3590$@verizon.net"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:filepro-list-bounces+rkreiss=verizon.net@lists.celestial.com">filepro-list-bounces+rkreiss=verizon.net@lists.celestial.com</a>
[<a class="moz-txt-link-freetext" href="mailto:filepro-list-bounces+rkreiss=verizon.net@lists.celestial.com">mailto:filepro-list-bounces+rkreiss=verizon.net@lists.celestial.com</a>] On
Behalf Of Walter Vaughan
Sent: Friday, February 25, 2011 5:05 PM
To: filePro
Subject: Re: CSV output
Richard Kreiss wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Have not tried this yet.
Is there a way to export a formula as part of a csv output for input
into Excel?
</pre>
</blockquote>
<pre wrap="">There always is a way....
save this below as .cvs file
1000,2000
1500,2500
=SUM(A1:A2),=SUM(B1:B2)
work for you?
</pre>
</blockquote>
<pre wrap="">
Walter,
Thanks for the answer. I test putting a formula in a specific cell before I
read this response. It worked.
Foobar(28)="=sum(Y280:AF280)"
When I opened the csv file, in OpenOffice.orgs spreadsheet program, it had
calculated to total.
The only problem, as I see it, is knowing where one will locate the formula
if it isn't at the end of the row or column.
Richard
_______________________________________________
Filepro-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
Subscribe/Unsubscribe/Subscription Changes
<a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
</pre>
</blockquote>
<font face="Courier New, Courier, monospace">Richard,<br>
<br>
ca = start sum column indicator<br>
cb = end sum column indicator <br>
<br>
Make sure you are sorting the records the same way you would for
the sub-total.<br>
Make sure your export is in a sub-routine<br>
sn - create a global var. to sense when the sort value has changed<br>
f - create a var to tell the export you are ready to export the
formula<br>
p - create a counter first row exported for sort value<br>
o - create a counter for row exported for that sort value<br>
<br>
sn ne SORTVALUE<br>
f="=SUM("{ca{p{":"{cb{p+o;gosub wrtout;p="";o="";f=""<br>
<br>
</font>
<pre wrap=""><font face="Courier New, Courier, monospace"><big>
if        wrtout
then                export blah blah blah
if                f ne ""
then                goto wrtform
if                p eq ""
then                p(8,.0,g)=p+"1"        'start row for sort value
if        
then                o(8,.0,g)=o+"1" 'count rows exported for this sort value
if                 x eq ""                'do header
then                blah(1)="label col1";blah(2)="label col";x(1,,g)="x";goto wrtout
if
then                blah(1)=va;blah(2)=vb;return
if        wrtform
then                blah(1)="Total";blah(2)=f;return
Hope this helps,
Richard D. Williams
</big>
</font></pre>
</body>
</html>