50
Views
7
Comments
Solved
Advanced Excel - Workbook_Open
Question

Good evening, 

While using the Advanced Excel component from the Forge, we ran into an issue when trying to import an excel file into our application. 

We successfully use this component a lot, but we always call the actions Workbook_Open when exporting an Excel (on which we write values on) that we have within our resources as a template. 

We tried to call the action Workbook_Open while importing an Excel file that is not stored as a resource in Outsystems. And it gives the error message :

Access path 'c:\windows\system32\inetsrv\"fileName" denied.

We also tried to store this imported file first in our database before calling the action, but it gives the same message. 

Did someone had the same issue ? 

Thanks in advance !

Sylvian 

Solution

Ok we found out:

The action Workbook_Open tries EITHER to open the file thanks to his FileName, OR with the Binary. 

As we tried to do both as the same time, the error was showing. 

In order to make it more clear for anyone who run into this, hereby a screenshot of the code where we discovered our problem. 

Capture.PNG

Rank: #8033

Hi,

How to fix in Outsystems?

Hello, 

Please see the related screenshot. Only one source should be valid for the Workbook_Open. If you have an input FileName, it may causes the error on the action. 

Rank: #2022

Hello Sylvian,

I saw this in your original  question: 

We successfully use this component a lot, but we always call the actions Workbook_Open when exporting an Excel (on which we write values on) that we have within our resources as a template. 

I have a problem with opening the workbook from a template ( excel xlsx file) which I uploaded as a resource. The error I get when selecting the resource in the Binary_Data field of the Workbook_Open action is that the data type of the resource is None instead of Binary. Do you know how I must upload an excel file as template in a resource so the datatype is binary?

Thanks in advance.

Peter

mvp_badge
MVP
Rank: #91

Hi Peter,

While opening the workbook from a template (i.e. excel xlsx file) which is uploaded as a resource, using the Workbook_Open server action (reference from Advanced Excel Extension)

Instead of referencing the Resource template file as shown below

reference the Resource -> Content runtime property which is of Binary Data type in the Workbook_Open server action

Hope this helps you!


Regards,

Benjith Sam