Focal Point
[Case-Opened] Error FOC3290: Output in EXL2K Worksheets

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

February 10, 2011, 11:40 PM
Vinay Kumar
[Case-Opened] Error FOC3290: Output in EXL2K Worksheets
Hi,

I am trying to fetch two reports in WORKSHEET 1 and 2 in Excel.

I am getting the following error. Could anyone help me.

(FOC3290) TEMPLATE FILE must be in "Single File Web Page" format

I have created a MHT file in baseapp.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 11, 2011, 02:37 AM
ChristianP
Hello Vinay,
when you save the EXL2K File as an *.mht you can chose in the save as properties "whole work folder" or Range "table". i think you have chosen Range "table". I had the same problem some days ago!!

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
February 11, 2011, 03:33 AM
Vinay Kumar
Christian,

Are you talking about below properties?




WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 11, 2011, 04:28 AM
ChristianP
Vinay,
yes!!!! i use a german windows version and was not sure abaout the right translation. you have to chose entire workbook!!

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
February 11, 2011, 04:30 AM
Vinay Kumar
Christian,

From the beginning i have been using the same settings, still i am getting the same error.

Any other solution?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 11, 2011, 04:42 AM
ChristianP
Vinay,

which Excel Version are you using to build the .mht file. I used 2003, because with 2007 it did not work!!

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
February 11, 2011, 07:13 AM
Vinay Kumar
I am using 2003 version only!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 11, 2011, 10:54 AM
Luiz De Assis
Vinay,
Can you post your code (or part of it)? Thanks

L
February 11, 2011, 10:07 PM
Vinay Kumar
Hi,

Could any one tell me how to do this in mainframe focus?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 11, 2011, 10:41 PM
Vinay Kumar
Excel 2000 doesn't support "Web Archive file format"? Is that true?

Multiple workbooks in Excel


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 14, 2011, 05:25 AM
Vinay Kumar
Below code has worked on mainframe focus.

  
TABLE FILE File1                             
PRINT Field1                                    
  ON TABLE HOLD AS OUTPUT1 FORMAT EXL2K OPEN 
  ON TABLE SET STYLE     
  TYPE=REPORT, TITLETEXT='REPORT 1', $             
  TYPE=HEADING, SIZE=18, $               
ENDSTYLE
END                                              
TABLE FILE File2
  PRINT Field2                               
  ON TABLE HOLD AS OUTPUT1 FORMAT EXL2K CLOSE
  ON TABLE SET STYLE 
  TYPE=REPORT, TITLETEXT='REPORT 2', $             
  TYPE=HEADING, SIZE=18, $                         
ENDSTYLE
END                                  
FIN  



WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 14, 2011, 06:42 PM
N.Selph
Make sure your mht file has at least 2 sheets WITH CONTENTS, or you will get that error.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
February 14, 2011, 11:16 PM
Vinay Kumar
quote:
Originally posted by N.Selph:
Make sure your mht file has at least 2 sheets WITH CONTENTS, or you will get that error.


With Contents?
You mean to say there should be some data in mht file before executing the procedure?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 15, 2011, 09:15 AM
redapple
I recently used Excel Templates and ran into the same error.

N.Selph is correct, you need two worksheets. One where the data (produced by WebFOCUS/FOCUS)will be loaded. The other worksheet will be the formatted end-result that you want the user to see.

On the "formatted" worksheet include some content. Column headers, alternate row colors, etc. Also you will need to reference the cells of the data sheet on the formatted sheet. Something like =Data!A14

Hope this helps.


WebFOCUS 7.6.11
Developer Studio on Windows XP. Server Components running on Windows Server 2003.
Excel, HTML, PDF
February 15, 2011, 01:36 PM
Kerry
Hi all,

FYI, info from our internals: The code you are running on the mainframe should also work from WebFOCUS. The ON TABLE SET STYLE needs an ‘*’ after it and I would also change the HOLD to PCHOLD to display the output.

All the comments about having an Excel workbook with 2 sheets with contents is absolutely correct when using Excel Templates. I believe this case is strictly a 2 worksheet compound document and should not need templates.


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
February 15, 2011, 08:21 PM
Vinay Kumar
Kerry & Redapple,

sorry, still i haven't understood what you guys meant by content in excel sheet.

Could any one place a screen shot here.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 16, 2011, 02:17 PM
Kerry
Hi Vinay,

From our internals: This is not an Excel TEMPLATE issue, so don’t worry about the comments regarding the requirements of using Excel Templates until you plan to go that direction.

This code will give you want you are looking for – an excel workbook with 2 worksheets called Report 1 and Report 2.

TABLE FILE CAR                             
PRINT COUNTRY                                    
  ON TABLE PCHOLD AS OUTPUT1 FORMAT EXL2K OPEN 
  ON TABLE SET STYLE *
  TYPE=REPORT, TITLETEXT='REPORT 1', $             
  TYPE=HEADING, SIZE=18, $               
ENDSTYLE
END                                              
TABLE FILE EMPDATA
  PRINT PIN                               
  ON TABLE PCHOLD AS OUTPUT1 FORMAT EXL2K CLOSE
  ON TABLE SET STYLE *
  TYPE=REPORT, TITLETEXT='REPORT 2', $             
  TYPE=HEADING, SIZE=18, $                         
ENDSTYLE
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
February 16, 2011, 10:59 PM
Vinay Kumar
I already tried that code and it worked for me.

Anyways Thanks Kerry!!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 24, 2011, 04:49 AM
Vinay Kumar
Records: 1 million

How to break the workbook (In Excel) after reaching the max records i.e 65K.

Output:
Workbook 1: 65K records
Workbook 2: 65K records
and so on.

Could any one help me!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 24, 2011, 06:55 AM
shakila25
Hi Vinay,
TABLE FILE CAR
PRINT *
COMPUTE LINENUM/I9 = LINENUM + 1;
ON TABLE SET ASNAMES ON AND HOLDLIST PRINTONLY
ON TABLE HOLD AS HDFNL
END
-RUN
-SET &LINES_C = &LINES;
-SET &MAXROWS=65000;

-SET &CMPND = IF &LINES_C EQ 0 THEN 'CLOSE' ELSE 'OPEN';
-SET &LOOPNUM = IF &LINES_C GT &MAXROWS THEN 2 ELSE 1;
-REPEAT ENDAIR FOR &CT FROM 1 TO &LOOPNUM
-SET &STDWHERE = IF &CT EQ &LOOPNUM AND &LOOPNUM NE 1 THEN 'WHERE LINENUM GT &MAXROWS.EVAL' ELSE 'WHERE LINENUM LE &MAXROWS.EVAL';
-SET &SHEETNAME = IF &CT EQ &LOOPNUM AND &LOOPNUM NE 1 THEN 'SHEET 2' ELSE 'SHEET 1';
-SET &CMPND = IF &CT NE &LOOPNUM THEN 'OPEN'
-ELSE IF &CT EQ &LOOPNUM AND &CMPND EQ 'CLOSE' THEN 'CLOSE'
-ELSE 'OPEN';
SET COMPOUND = &CMPND.EVAL
TABLE FILE HDFNL
PRINT
*
BY LINENUM NOPRINT
&STDWHERE.EVAL
ON TABLE SET ONLINE-FMT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=8, TITLETEXT='&SHEETNAME.EVAL',$
TYPE=TITLE, STYLE=BOLD, JUSTIFY=CENTER,$
TYPE=DATA, COLUMN=STMT_DT, JUSTIFY=RIGHT,$
TYPE=DATA, COLUMN=TRANS_DT, JUSTIFY=RIGHT,$
TYPE=DATA, COLUMN=TKT_ISS_DT1, JUSTIFY=RIGHT,$
TYPE=DATA, COLUMN=TRAV_DPRT_DT, JUSTIFY=RIGHT,$
ENDSTYLE
END
-RUN
-ENDAIR


WebFOCUS 7.6.x
Windows
Output: Excel,PDF, HTML
February 24, 2011, 08:44 AM
Vinay Kumar
Thanks Shakila! I shall test and let you know! BTW have you tried it?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
February 24, 2011, 01:21 PM
N.Selph
The contents in the 2 worksheets don't need to be anything more than a label like
"Data will go here" in cell A1 in one sheet, and " " (space) in cell A1 in a second sheet.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
February 25, 2011, 12:04 AM
Vinay Kumar
Thanks Selph!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats