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)

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