Focal Point
populating a particular cell in EXCEL

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6231038042

August 08, 2007, 07:19 AM
<Navin>
populating a particular cell in EXCEL
Hi All,

Is there any way to populate a particular cell say "C12" in an EXCEL through WEBFOCUS.


Thanks
Naveen.
WF 7.1.6 UNIX
August 08, 2007, 09:18 AM
Prarie
Sounds like you need an Excel Template.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
But Prarie,

Is that not possible to fill a specified cell without using a template.

or even using a template , how can i fill a particular cell. Webfocus starts printing the data right from the starting cell "A1" . So in that case how can i make that to fill a specified cell.
Naveen,

The same way as many a hunter would shoot a bear behind a tree, ricochet the arrow off of another tree!!

Basically you cannot reference a cell directly within an Excel worksheet at the time the WF report runs because there is no Excel sheet until the report content has been built.

You could use FRL to effect a solution or you could use a sledge hammer and the McGyver technique -
APP FI MCGYVER DISK MCGYVER.MAS (LRECL 80
-RUN
-WRITE MCGYVER
-WRITE MCGYVER FILE=MCGYVER,SUFFIX=FOC
-WRITE MCGYVER SEGNAME=SEG1
-WRITE MCGYVER FIELD=MCGYVER_KEY,   ,A1   ,A1   ,FIELDTYPE=I, $
-WRITE MCGYVER FIELD=SEQUENCE,  ,A3   ,A3   ,$
-RUN

CREATE FILE MCGYVER
MODIFY FILE MCGYVER
FIXFORM MCGYVER_KEY/A1 SEQUENCE/A3
DATA
 001
 002
 003
 004
 005
 006
 007
 008
 009
 010
 011
 012
END
-RUN

JOIN MCGYVER_KEY WITH COUNTRY IN CAR TO MULTIPLE MCGYVER_KEY IN MCGYVER AS J1

DEFINE FILE CAR
  MCGYVER_KEY/A1 WITH COUNTRY = ' ';
  SPC/A1 = ' ';
  CELL_VALUE/A10 MISSING ON = IF SEQUENCE EQ '012' THEN COUNTRY ELSE MISSING;
END

TABLE FILE CAR
SUM  SPC AS ''
     CELL_VALUE AS ''
 BY SEQUENCE NOPRINT
 BY SPC AS ''
 ON TABLE PCHOLD FORMAT EXL2K
END
-RUN

Will place FRANCE in cell C12.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10