[Excel Package] Error invoking Workbook_Open

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

Hello

We are experiencing an issue while invoking the Workbook_Open action while passing an URL. An exception with the message "This stream does not support seek operations" is raised when we try to open a workbook that is fetched by an url. I can access the file by typing the URL into the browser's URL bar.

I have tried downloading the file and passing it's path to the action, and the action returns the workbook object correctly this way.


I have tried debugging the top level c# code and got the following information from the debug watches:



While the response correctly fetches the length and content type information, it's not possible to obtain a stream for the response object.


Could you check if this is a fixable issue?


Thanks.

My guess is that you would need to download the Excel file, probably with an HTTPGet action, before opening it using the Excel Package actions

Hello Hanno


While changing to that method, i noticed that the excel file that was being fetched was actually a resource file included in the espace... all i had to do was switch the WorkBook_Open action for the WorkBook_OpenBinary action while passing the binary of the file directly.


Although, it still seems like a weird thing to have a specific case in the code to allow the file to be fetched via URL when it's not supposed to work that way. Or are there any specific cases where this method fails (outside of the obivous forbidden, etc errors) ?


Cheers.

Ricardo, this component uses the EPPlus library, I cannot comment on what their intention was with the two different methods.

Perhaps a search on StackOverflow https://stackoverflow.com/questions/tagged/epplus might reveal some information?