CSV output
Richard D. Williams
richard at appgrp.net
Sat Feb 26 06:32:30 PST 2011
On 2/25/2011 9:43 PM, Richard Kreiss wrote:
>
>> -----Original Message-----
>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
>> Behalf Of Walter Vaughan
>> Sent: Friday, February 25, 2011 5:05 PM
>> To: filePro
>> Subject: Re: CSV output
>>
>> Richard Kreiss wrote:
>>
>>> Have not tried this yet.
>>>
>>> Is there a way to export a formula as part of a csv output for input
>>> into Excel?
>>>
>> There always is a way....
>> save this below as .cvs file
>>
>> 1000,2000
>> 1500,2500
>> =SUM(A1:A2),=SUM(B1:B2)
>>
>> work for you?
> 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
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
Richard,
ca = start sum column indicator
cb = end sum column indicator
Make sure you are sorting the records the same way you would for the
sub-total.
Make sure your export is in a sub-routine
sn - create a global var. to sense when the sort value has changed
f - create a var to tell the export you are ready to export the formula
p - create a counter first row exported for sort value
o - create a counter for row exported for that sort value
sn ne SORTVALUE
f="=SUM("{ca{p{":"{cb{p+o;gosub wrtout;p="";o="";f=""
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20110226/e52c18d9/attachment.html
More information about the Filepro-list
mailing list