ARIS User Group Meeting Wien (German)
Register
ARIS Process Mining in action - Live Demo
Register
ARIS Super User Group
Register

View all
XG

Hi everyone,

I have 2 reports processing two different kinds of models and finally I want the results from the two reports in the same excel file. My idea is to at first create one excel file and add the information from the other report into it.

Is it possible to write something in an existing excel file in report/macro? Could anyone give some suggestions? 

Thanks in advance.

 

I have tried the following code:

var docToInsert = Context.getFile("test1.xlsx", Constants.LOCATION_OUTPUT)

var myOutputObjToInsert = Context.getOutputObject("test2.xlsx", docToInsert)

output.InsertDocument(myOutputObjToInsert, false, false)

output.WriteReport();

I don't know if it really can realize what I want, but anyway, there is an error: cannot  creat outputobjectCannot create document.

by M. Zschuckelt
Posted on Tue, 10/15/2019 - 20:24

Hi,

just a hint: The report is executed on the server, so you do not have access to a client file that was created in a different run of another report. Also you generally do not have access to the file system on the server. These could be options:

- You write a macro that calls both reports and puts together the Excel file on the client (that does not work in the portal, as there are no macros there)

- You write a 2-in-1 report that you can call on both model types you want to process (you need to find a way for a multi-select of all models you need processed, e. g. the Find... dialogue result). Alternatively, if there is a logical link between the 2 model types the report could find the models of the second model type from the models of the first type and produce the output to two tabs of the Excel. This option seems to be the most feasible, because usually there will be some logical link between data you want to see in the same Excel file.

- You let the client upload the file from the first run in a dialog you present at the start of the report. Then you let the report add its results. Personally I would not prefer this option, because you cannot know, if this produces security issues if the client can upload anything. I have not heard of any vulnerabilities so far, but I also have not heard of anybody actually implementing such an idea. Never trust your input.

0
by XT G Author
Posted on Wed, 10/16/2019 - 10:30

In reply to by M. Zschuckelt

Thanks very much for your help!

Actually I already have used a macro to execute these two reports one by one. But how could I write the information from the second report into the excel file created in the first one?

Should I still use Context.getFile(...) and Context.getOutputObject(...) ? Should I add these part in macro or in the second report?

In my opinion, I maybe it's an option to use Context.getFile(...) and getOutputObject(...) in the second report so that I could directly use DefineF to add something?

Or maybe I can use InsertDocument in macro?  I tried but Context.getFile("file_from_report1.xlsx") doesn't work in macro and also the second report.

Thanks again :)

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • BZ
  • Profile picture for user TEF_Bernd
  • ПЦ
  • CR
  • BH
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock