[Excel Package] Problem using WorkBook_AddSheet

Forge Component
(5)
Published on 2018-08-02 by Carlos Alfaro
5 votes
Published on 2018-08-02 by Carlos Alfaro

Hi Outsystems team,

I'm using version 11. I am iterating a Binary Data List using for each, and in each cycle I'm using the action "WorkBook_AddSheet" in order to create a new sheet in an Excel file I created (I used the action "Workbook_create" before the For Each cycle). So, my goal is to create a new Excel sheet for each element of that binary data list. The problem is, this action requires a mandatory input being the data that I want to add to this new sheet. The thing is, this input must be of the type "Object", and I am running a binary data list, so I can't use those elements in the "WorkBook_AddSheet" action. Does anyone knows how to convert binary data into Object type? Or if there is another way of adding this data to that action?

Thanks,

Alexandre

Hi Alexandre

As previously mentioned, this component has been deactivated and you should consider rather using Advanced Excel to achieve your goal.

For the record though, you can use the ToObject() function to convert anything to an object.

Hanno

Hanno wrote:

Hi Alexandre

As previously mentioned, this component has been deactivated and you should consider rather using Advanced Excel to achieve your goal.

For the record though, you can use the ToObject() function to convert anything to an object.

Hanno


Hi Hanno,

I used that function but I got the following error message while running the program: "Object reference not set to an instance of an object.".

And I don´t understand what you mean about using Advanced Excel... i followed your advice and downloaded that component (this WorkBook_AddSheet function for example, is an Advanced Excel extension). Or is there anything I'm missing?

Alexandre

Alexandre, you are then posting under the wrong component, which is confusing.

If you are using the Advanced Excel component and having errors, please can you share your oml file with me so that I can debug?


Hanno wrote:

Alexandre, you are then posting under the wrong component, which is confusing.

If you are using the Advanced Excel component and having errors, please can you share your oml file with me so that I can debug?


Sorry about that, this is my second post in the forum, so I'm still kinda "lost" in here.

I attached the oml file. Really appreciate your help!


I'll take a look when I have some time later today and get back to you