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

Excel/VFP reporting 254 character limitation

Status
Not open for further replies.

RoadRunnerOz

Programmer
Aug 22, 2000
128
AU
I am creating an Excel spreadsheet complete with formulas.
My last line in the report is a total of other group totals. ( I'm tracking orders by company & clients subtotalling by client then company then all.)


Here's the code:
PARAMETERS lrow, lgroupadd
WAIT WINDOW "Writing totals for all orders..." NOWAIT

WITH oexcel.activeworkbook.activesheet
.RANGE("A"+ALLTR(STR(lrow))).VALUE ="Totals for all Companies/Clients"

FOR x= 72 TO 79 && H to M
rg=CHR(x)+ALLTR(STR(lrow))
.RANGE(rg).formula= "=&lgroupadd" && bombs here!
.RANGE(rg).FONT.bold=.T.
.RANGE(rg).numberformat = "$#,##0.00;[Red]-#,##0.00"
lgroupadd=STRTRAN(lgroupadd,CHR(x),CHR(x+1))
ENDFOR
endwith

as long as len(lgroupadd) < 254 I'm ok
lgroupadd is H10+H34+H67+...

I can see the complete line for lgroupadd in the debugger but VFP cuts it of during substitution.


System capacities says :
Maximum # of characters per character string or memory variable 16,777,184
Maximum size of character fields 254

I was assumming my variable was NOT a field, it isn't. But VFP &quot;thinks&quot; it is?

any ideas for a work around?

TIA
Michael Ouellette
mouellette@compuserve.com
 

Solution found! I found I could cut n paste manually so
I substituted
.RANGE(rg).formula= &quot;=&lgroupadd&quot;

with

_Cliptext = &quot;=&quot;+lgroupadd
.RANGE(rg).select
.paste

Cheerio Michael Ouellette
mouellette@compuserve.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top