ARIS Community - We Love BPM

Excel Output Error

fox.jedah's picture
by fox jedah in Reports & Macros posted on 2016-05-12

Hi everybody,

 

I'm working on a report, in Aris 7.1. An excel output, that i want to open to modify.

The report extracts data from risk objects inside a model.  If i make it work on a model with just two risk objects, it works flawlessly, but (there's always a but) if i try to run it with a real model (with 200 or more risks) the thing just explodes.

 

All i get is the attached error, which i will translate with some context:

 

"Error during execution time for this command sequence"

"Command sequence: SCRIPTNAME, line 392 [var wbk =Context.createExcelWorkbook(filename, xlsTemplateData);]

"cannot create output object, Unable to construct record instance"

Is this a filesize server limit thing? when i try to open the output created without trying to modify it with this method, it gets a popup saying that data may be missing from the file.

I have tried to pull out reports with the same big data, and this is the first time i get this kind of error, but this is the first time I'm trying to edit an excel output.

Thanks for your time, any input will be valuable, as the time deadline is watching over my shoulder.

Kind regards.

 

 

 

13465 Views
0 Likes
5 Comments
Attachments
Robert Goldenbaum posted on 2016-05-12

Hi,

if you open an existing workbook with. e.g. 10 lines, and then try to write 200 lines - could it be that it has problems because only 10 lines exist ?  Have you tried to check if the cells exist before writing ?

BR Robert

fox jedah posted on 2016-05-12

Hi Robert,

first of all, thanks! i thought this forum was dead, glad to see someone here.

Now, yes, the cells exist, as i created them with the same report. I added a counter to control how many rows we are using, and the problem is when we open the file, i haven't even enabled the modifications we want/need.

The workflow should be like this:

- Script opens the model

- gets the data from the model, from all the risk objects

- puts that data into an array.

- prints the array as outputln in the excel output.

-writes the excel output

-calls the modify function

-this should open the file (here's where the scripts dies)

-modify column sizes, adds formulas and stuff

-write the excel

-as the script finishes, this should send the report from the server to the client.

-we celebrate.

So, the code should work with the 200 lines, as it works with 2. 

I will recheck if this is trying to write out of bounds, but as you can see....it should at least open the file.

 

thanks!

 

Tricarico Romain posted on 2016-05-12

Hi,

Do you run aris with localserver or on a stand alone server?

On local server, the amount of java memory is limited with localserver. try it with a server, or increase memory allocation in config files.

Otherwise, could you share the code?

Best regards,

fox jedah posted on 2016-05-12

Hi Tricarico,

Thanks for your help!

We run Aris (as far as i know) on a stand alone server, and i don't know how much memory allocation has configured...maybe that's the problem, i will contact IT.

For now i can't share the code, actually i had a couple of troubles for sharing that little code that is showing in the background of the capture...compliance stuff.  I will ask permission from the gods above and hopefully, i will share the code tomorrow.

Thanks again!

Robert Goldenbaum posted on 2016-05-13

Hi,

ahm well, perhaps you should tell us why you want to modify the excel sheet afterwards at all...  Can't you use a template e.g. for column sizes ?

BR Robert