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     (Closed) Master File for Excel input

Read-Only Read-Only Topic
Go
Search
Notify
Tools
(Closed) Master File for Excel input
 Login/Join
 
Master
posted
I'm working on a project that will use an Excel file with multiple sheets. All the sheets have the same format (they contain data by quarter). In the .acx file for the workbook, there is a parameter that tells the master what sheet in the workbook to read (WORKSHEET=FY19-1stQuarter). This workbook will generally contain 2 sheets but could have as many as 8. I don't want to manually update the acx file(s) every time the job runs or have a different master for each sheet. Is it possible to define a global variable to hold the sheet name? I've tried this:
This is in the master:

FILENAME=TANF_BILLING, SUFFIX=DIREXCEL,$
VARIABLE NAME=SHEETNAME, USAGE=A64, DEFAULT=Sheet1,$

This in in the acx file:

SEGNAME=SHEETDATA, WORKSHEET='&&SHEETNAME', HROWS=1, $

This is the test fex:

-SET &&EXCELFILE='fy19_tanfcw_billing_by_quarter_update.xlsx';
-SET &&SHEETNAME='FY19-2ndQuarterSoleSource';
FILEDEF TANF_BILLING DISK tanf/&&EXCELFILE
TABLEF FILE TANF_BILLING
PRINT *
ON TABLE HOLD
END

If I run this I get the following:

(FOC31041) DIREXCEL CRSYN TANF_BILLING: 1
(FOC1006) FILE IS NOT ALLOCATED OR FAILED TO OPEN  : TANF_BILLING


When I have WORKSHEET=FY19-2ndQuarterSoleSource in the acx file it works fine. Is it not possible to use an global variable with the WORKSHEET parameter? BTW, this parameter is not mentioned in the 8206 Describing Data manual.

This message has been edited. Last edited by: jgelona,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
If the parameter cannot be used, maybe not the best option, but you can define as many mas/acx as you have Excel/Sheets.
Then, since you already have a parameter to tell you which sheet to use, call the proper mas/acx accordingly

-SET &EXCELFILE= DECODE &SheetToUse (1 'TANF_BILLING_S1'
-                                    2 'TANF_BILLING_S2'
-                                    3 'TANF_BILLING_S3'
-                                 ELSE 'TANF_BILLING_S4');

TABLEF FILE &EXCELFILE
PRINT *
ON TABLE HOLD
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
jgelona

I used the DATASET attribute in the master file and hard coded the excel spreadsheet name and then I was able to use the &&WORKSHEET in the .acx file.


DATASET=wfretail82/sales_demo.xlsx, DV_INCLUDE=NO, $


If I tried to use a global variable for the DATASET name it failed with the same error as you. That may be a bug...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Master
posted Hide Post
Thanks Chuck but that did not working for me. We are still on 8008 which could be part of my issue (we can't get to 8206 because we are having Tomcat compatibility issues with our environment). Too bad -SET &ECHO=ALL; doesn't show master/acx parsing.

Martin, I'm trying to avoid having multiple masters that describe identical data.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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     (Closed) Master File for Excel input

Copyright © 1996-2020 Information Builders