As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I've used an Excel template file with an auto-run macro to do it. You can read about template files here: .
Here is a macro to get you started (the name "Auto_Open" causes it to run automatically when the file is opened):
Private Sub Auto_Open()
Dim strFileName As String
Dim strYear As String
Dim strMonth As String
Dim strDay As String
Dim strSeconds As String
' We only want the macro to do something when the report
' is first opened, and not thereafter. . .
If Left(ActiveWorkbook.Name, 9) = "WFServlet" Then
'Create a default file name
strFileName = "MyReport_"
strYear = Year(Now)
strMonth = (Month(Now))
If Len(strMonth) = 1 Then
strMonth = "0" & strMonth
End If
strDay = Day(Now)
If Len(strDay) = 1 Then
strDay = "0" & strDay
End If
strSeconds = Second(Now)
If Len(strSeconds) = 1 Then
strSeconds = "0" & strSeconds
End If
strFileName = strFileName & strYear & "-" & strMonth & "-" & strDay & "-" & strSeconds & ".xls"
' 1 is the option to save as Excel Workbook
Application.Dialogs(xlDialogSaveAs).Show strFileName, 1
End If
End Sub
Rob
WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
Posts: 88 | Location: MI | Registered: July 23, 2009
-* File VadivelNagaraj1.fex
-SET &DTE=EDIT(&DATEDMYY,'99')| EDIT(&DATEMTYY, '999$$9999');
-SET &DAY=&DATEWT;
-SET &XLS=&DTE | '_' | &DAY | '_' | EDIT(HHMMSS('A8'),'99_$99_$99');
TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE HOLD AS &XLS FORMAT EXL2K
END
? FILEDEF
THIS SHOULD DO THE TRICK
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
-SET &MDYYSS = &MDYY || &TOD; APP HOLD BASEAPP TABLE FILE CAR PRINT SALES BY COUNTRY ON TABLE HOLD FORMAT EXL2K AS &MDYYSS ON TABLE SET STYLE * UNITS=IN, LEFTMARGIN=0.500000, RIGHTMARGIN=0.500000, TOPMARGIN=0.500000, BOTTOMMARGIN=0.500000, SQUEEZE=ON, ORIENTATION=PORTRAIT, TITLETEXT='&MDYYSS',$
ENDSTYLE END
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
The ability to customize the name of the output file (as delivered to the browser/excel/Acrobat) is not available until the 7.6 version. The only way around this in the 7.1.4 version is to hold the file locally and then use some other mechanism like FTP for delivery or use ReportCaster.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
The default excel output filename shows as WFservlet.xls, even if i cannot customize the filename dynamically, will i be able to hardcode the filename in fex file so that it display other than WFservlet.xls when the open/save popup shows.
Refer back to the post by Rob and read up on Excel templates. He's given you a lot to get you started.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
To create a template file in Excel 2003 (2007 is a little different, but you can figure it out), create a new workbook, and Select Macro > Macros from the Tools menu. Type Auto_Open for the macro name and click Create. Now paste the code I supplied above (don't duplicate the first and last lines!), and edit as necessary.
After editing your macro, save your workbook as a regular Excel file, and then do a Save As to a Single File Web Page (.mht) format.
You can search "EXL2K TEMPLATE" in the WebFocus help, or this forum for information on using template files. See, e.g. .
Rob
WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
Posts: 88 | Location: MI | Registered: July 23, 2009
I followed excel macro approach couple of times, but still getting an error mentioned below. Can you please advise on this. Also, can you please share more details on -htmlform approach too.
(FOC3290) EXL2K: Template file is not a valid WebArchive file (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND
ThanksThis message has been edited. Last edited by: VadivelNagaraj,
Do you have the mht file sitting in the same folder as the fex that is looking at it, or in one that is within the path. The mht file is the one that is the template.
I am using the WebFOCUS Developer Studio tool through Citrix. Under Applications folder of the Unix server, individual folder is created for each project. Under each project folder, 5 folders(HTML Files, Maintain Files, Master Files, Other, & Procedures) are created by default WebFOCUS env team. So, The fex files exists in Procedures folder and mht files are copied to Other folder. Pleae let me know if this is not correct.