Focal Point
[SOLVED] Opening Excel hold file.... from a HTML page or Fex file

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

May 26, 2008, 12:57 AM
Sai Salveru
[SOLVED] Opening Excel hold file.... from a HTML page or Fex file
Hi,

I have generated an hold file and saved in excel format(In others folder). I want to call this excel file from fex file or html file.

I have used
-HTMLFORM
Its giving the report in HTML format.

But the same thing if i call PDF file, i am able to open the PDF report.

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 7.1.4
May 26, 2008, 01:45 AM
Sai Salveru
I HAVE GENERATED EXCEL FILE USING THE BELOW CODE..

TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
WHERE RECORDLIMIT EQ 10
ON TABLE HOLD AS SAI_EXL1 FORMAT EXCEL
END

THE EXCEL FILE NAME SAI_EXL1.XLS IS SAVED UNDER OTHER FOLDER.

NOW I WANT TO OPEN THIS SAI_EXL1.XLS FROM A FEX FILE.
PLEASE LET ME KNOW HOW THIS CAN BE DONE.


Webfocus 7.1.4
May 26, 2008, 07:43 AM
Danny-SRL
Sai,
Try this in your focexec:
  
!"C:\Program Files\Microsoft Office\Office12\excel" C:\path_where_xl_saved\SAI_EXL1.XLS 

C:\Program Files\Microsoft Office\Office12 is usually where Excel is installed


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 26, 2008, 10:19 AM
Francis Mariani
This is another way, the location of Excel is not required:

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=/approot/temp/book1.xls">
</head>
</html>


In IE, the Excel file opens in the IE window. In Firefox, the file is downloaded and then opened in Excel.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 26, 2008, 05:41 PM
Waz
To use -HTMLFORM you must specify the type and location.

FILEDEF SAI_EXL1 DISK OTHERS/sai_exl1.xht
SET HTMLFORMTYPE = XLS
-HTMLFORM SAI_EXL1


If you created the XLS in the same fex, you may not need the FILEDEF.
If the xls is not in an APP directory, the FILEDEF will need to change to a path.
Check the extension of the xls file, is it xls or xht.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 26, 2018, 01:21 AM
DMoses
I keep getting a 404 resource not found error. Is there anyone who can help?
<html>
<head>
<meta http-equiv="refresh" content="0; url=baseapp/cat_work_data.xlsx">
</head>
</html>
  



WebFOCUS 8203

Windows, All Outputs
April 26, 2018, 11:10 AM
FP Mod Chuck
Dmoses

Try this....

CONTENT="2; URL=/approot/baseapp/cat_work_data.xlsx">


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
April 26, 2018, 12:29 PM
Francis Mariani
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=/approot/baseapp/Book1.xls">
</head>
</html>

This does still work after ten years. As Chuck mentioned, approot must be specified. The 2 in the CONTENT attribute means refresh after 2 seconds.

Also important is that the file must be on the web server (if it is different than the reporting server.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server