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     [SOLVED] EXCEL TEMPLATES

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] EXCEL TEMPLATES
 Login/Join
 
<CSWDT>
posted
I am using a template file in one of our reports. I then save the file as a .xls and sent it to a script we have created. The script edits the file, and then resave the file. I have created some sample sudeo code below.

The question I have is that once the script has edited the file is there a way to send the file back to the user similar to using PCHOLD.
Is there a -SET variable I can use, or even some HTMLFORM code I can create to accomplish this?

TABLE FILE CAR
PRINT MODEL
ON TABLE HOLD AS \\templates\TEMPLATE1.MHT FORMAT EXL2K TEMPLATE 'TEMPLATE' SHEETNUMBER 1
END
TABLE FILE CAR
PRINT MAKE
ON TABLE HOLD AS \\templates\FINAL_TEMPLATE.xls FORMAT EXL2K TEMPLATE 'TEMPLATE1' SHEETNUMBER 2
END

DOS \\scripts\edit_excel_template.vbs \\templates\FINAL_TEMPLATE.xls

"send final edited report back to user" \\templates\FINAL_REPORT.xls



thanks for your help!

This message has been edited. Last edited by: <Kathryn Henning>,
 
Report This Post
<Kathryn Henning>
posted
Hi CSWDT,

You can use the STATE command to see if the script has run and created the FINAL_REPORT.xls file. If it hasn't been created yet, you can use the SLEEP command to keep testing. An example can be found here:

How to use a focexec to check if a file exists.

Then, once you know that the FINAL_REPORT.xls file exists, you can add a DOS command at the end of the FOCEXEC to copy the file to the desired location:

DOS copy FINAL_REPORT.xls /home/directory/FINAL_REPORT.xls

Cheers!

Kathryn
 
Report This Post
Expert
posted Hide Post
I would probably suggest using the SYSTEM syntax to make your DOS call as it will wait for the call to complete and pass back a return code. I would then follow this up with an EDAGET command in an attempt to get the file back to the user.

You might hit time outs depending upon your server response in processing the EXCEL file but it's worth a shot.

Both commands have been subjects of previous threads so just use the search link above.

Incidentally, I wrote an article in the IB - Developer Center (link above) that deals with post processing EXCEL templates using VBScript - link.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [SOLVED] EXCEL TEMPLATES

Copyright © 1996-2020 Information Builders