Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

Automate Manual Process of Combining Several Excel Worksheets into a Single Workbook.


David Briars
Go to solution Solved by Martin Yergeau,

Recommended Posts

My end user runs five focexecs out of App Studio.  

Each fex ends with a TABLE command containing a ON TABLE PCHOLD FORMAT EXL2K subcommand. 

My end user then manually takes the single worksheet created by each fex, and combines them into one workbook.  The end user then sends the 'combination' workbook out to the consumers of the information. 

My end user asked if I could automate this manual process.  

I cannot readily do a thing like create one new focexec and -INCLUDEing each of the five fexes, and then adding the compound open/close parms to the ON TABLE PCHOLD subcommand, because each of the fexes have many Dialogue Manager -label and -GOTO commands, using the same label names.  

Any ideas of what I could try or take a look at?  

Thank you all.  

 

 

  

 

 

Link to comment
Share on other sites

  • Solution
Posted (edited)

Hi David,

Having the same label names within several distinct fex has no impact since each has its own "logical reference".

I have that all the time in my fexs and I don't have any issue.

In all my fexs I have a label named "-XEND" that I reference after each step to stop processing when an error occurs using :

-IF &FOCERRNUM NE 0 THEN GOTO XEND;

I think that in WF7 it was causing an issue but since WF8 it's not anymore a problem to have the same label names.

Edited by Martin Yergeau
  • Like 1
Link to comment
Share on other sites

I found the following in the RS Admin doc for 8207

So, by deduction I assume it confirm that you can have the same label name in several fex since you cannot branch to a label from another one.

Further more if you have several tasks in a RC schedule where each calls a specific fex. Each task has its own "execution ID" AFAIK

image.png.cf574299ed2e0318e863c2c2f0635663.png

  • Like 1
Link to comment
Share on other sites

Thank you Martin and David!

I created my driver fex, added the -INCLUDEs of the individual five report fexes, added the compound subcommands to the PCHOLDs, and behold, the resulting workbook contained the five required worksheets perfectly.  

Agreed, I must have been thinking of a previous release or version, regarding my concern about 'reusing' label names.    

Kudos to the ibi product staff for continuing to update and improve the product.  

Thank you again Martin and David for your expert support, in this thread, as well as, the other threads I have learned from.  

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Great to hear that it worked. Mostly thanks to Martin. 

As a side note, the documentation that Martin pasted in here, seems to imply that a fex could -INCLUDE itself (call itself recursively). It seems like this could cause a problem or just wouldn't work. 
I have done recursive fex calls using EXEC and it can work. But you will want to make sure you can kill your agent in the reporting server console because it is easy to create a runaway agent when developing something that uses recursion. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...