LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Executing/opening file from BRE graph

    Employee
    Posted 05-24-2013 05:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: aop

    Hi!

    Is there some easy way to run/open/execute a file from the BRE graph. E.g. I have an excel output and after it has executed I would like to clock a node to it that would run a certain excel-macro workbook for additional formatting (the macro workbook is built in a way that it automatically opens the BRE Excel Output, formats the workbook and closes the BRE Excel Output File and itself without any interaction needed from the user).

    As this probably isn't supported right out of the box I wonder if there's some really easy way to configure the python node to do this?

    Thanks in advance!


  • 2.  RE: Executing/opening file from BRE graph

    Employee
    Posted 05-24-2013 08:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hey,

    Within a java or python node you can always execute another process.
    You can also interact with any 3rd party Java API within the Java node by including the relevant jars in the classpath.

    However, how you would use such APIs (or if any exist) or how you would write another program to interact with Excel and run macros is probably a question better suited to a Microsoft/Excel forum.

    Regards,
    Tim.


  • 3.  RE: Executing/opening file from BRE graph

    Employee
    Posted 05-24-2013 08:55

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    I almost forgot to mention...
    Using the Output Excel node in LAE 4.6, you are able to specify a "TemplateInputFile".
    This "template" file needs to be in the same XLS or XLSX format as the file to which you are writing - i.e. it is not an Excel ("xltx" etc) template file.
    When writing to the new file, it will first load the existing template file, and then add your changes from the node to the output file.
    If you have any formulas, pictures, or charts etc which depend on data within your template, then these will be re-evaluated when the Excel file is opened.

    Note that using the Append Excel file, things like formatting, charts, images etc are not preserved in the new file you are writing to (in XLSX format.. In XLS format they are).

    However, this will be fixed in the upcoming LAE 4.6.1 release such that you have the option in the Append Excel node to preserve all of these images/charts etc in the file you are appending to.
    The reason that this was not allowed in 4.6.0, and will not be enabled by default (you still need to modify a parameter to allow this) in 4.6.1 is that in order to preserve the charts and images, the node needs to load all of the existing workbook into memory, which could lead to the node running out of memory and failing.

    Tim.


  • 4.  RE: Executing/opening file from BRE graph

    Employee
    Posted 05-27-2013 01:58

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: aop

    Thanks for the answers!

    Basically my macro workbook runs automatically upon opening so there would be no interaction needed between BRE and Excel in particular other than standard open file operation (similar to double clicking a file in windows explorer, I'm just not familiar with either Java or Python).


  • 5.  RE: Executing/opening file from BRE graph

    Employee
    Posted 05-28-2013 01:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: aop

    It seems I got it to work now!