Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Can I launch an .xls which WF did not create?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Can I launch an .xls which WF did not create?
 Login/Join
 
Member
posted
I would like to run a WebFOCUS program to create an excel file which will be used as a data source to a complicated pivot table in an existing spreadsheet. I would then like to immediately launch the complicated spreadsheet. The idea here is to do this with just one click.

Is this even possible? Any ideas?

Thanks,
Jim
 
Posts: 7 | Registered: April 23, 2003Report This Post
<Grzegorz>
posted
Jim,

Yes, it is possible, but not effortless.

Below are some ideas I used. If the ideas are appropriate for you - depends on the detailed requirements.
1. Embedded WF report with Excel Web Query. Described in the "Creating Reports ..." manual, chapter 8 (v 5.2).
2. Excel macro for dynamically fill the spreadsheet with data using Web query (e.g. embedding HOLD'ed HTMTABLE created with WebFOCUS)


' The syntax:
'...
urlpath = "URL;" & "The rest of the path"
Sheet.Activate
With Sheet.QueryTables.Add(Connection:=urlpath, Destination:=Sheet.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
' To remove Query Table, retaining the data:
.Delete
End With
' ...

3. Windows script to run Excel "background process":


// JScript file to run with Windows Script Host.
// D:\ibi\apps\excelrun\runExcel.js
var objXL = new ActiveXObject("Excel.Application");
objXL.visible = false;
objXL.Workbooks.Open(WScript.arguments(0));

5. Skeleton of the Excel VBA macro, which opens the particular workbook, processes it, saves, and quits:

Sub processWorkbook()
' Initializatione, etc.
' ...
' Open the sophisticated spreadsheet template:
thePath = "D:\ibi\apps\tmplt\complicated.xls"
Set theWork = Workbooks.Open(thePath)
' Process theWork, filling it with WF data
' ...
' Save the result as the file visible on web server:
destPath = "Z:\path_to_webserver_directory\output.xls"
theWork.SaveAs(destPath)
theWork.Close
End Sub
'...
Private Sub Workbook_Open()
Application.DisplayAlerts = False
Call processWorkbook
Application.Quit
End Sub
6. The focexec skeleton:
[
-* Read and process report parameters, perform queries, process data, HOLD results etc., etc.:
-* ...
-* Invoke the script which creates the Excel output, using macros, templates, HOLD'ed tables, etc., etc.:
! D:\ibi\apps\excelrun\runExcel.js &WHICH_MACRO
...
-* Pass the resulting Excel to the client browser:
-HTMLFORM BEGIN


<script type="text/javascript">
function passXLS() {
window.location = "http:/webserver/the_path/output.xls";
}




-HTMLFORM END
These are just some of the "puzzle pieces". There is some additional work to do if you would like to create flexible, robust, and secure solution, but I think, that using Excel macros, Windows scripts, JavaScript and WebFOCUS you can achieve your goal, even if it is very sophisticated and specific.

Hope this helps
Grzegorz

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Member
posted Hide Post
Excellent. I'll give it a try! Thanks.
 
Posts: 7 | Registered: April 23, 2003Report This Post
<Pietro De Santis>
posted
You could try this:




[/code]

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Can I launch an .xls which WF did not create?

Copyright © 1996-2020 Information Builders