[Excel Binary reader/writer] Discussion

[Excel Binary reader/writer] Discussion

  
Forge Component
(0)
Published on 2010-11-30 by Paulo Tavares
0 votes
Published on 2010-11-30 by Paulo Tavares
Hi,
is it possible to give an example using this extension? I am trying to fill out an excel template with data from my application maintaining the style sheet of the excel template. Can you give me an example for this specific case?

Regards, André Passos.

When I try to publish the extension I get the message

You are trying to Upload or Publish an Extension whose Intellectual Property is Protected, since it was created in a different Agile Platform Infrastructure than ''rdkost1.sbv.signintra.com''. To obtain the Intellectual Property Rights for using this Extension in ''rdkost1.sbv.signintra.com'' Infrastructure, please go to OutSystems' Intellectual Property Services at 'http://www.outsystems.com/ipp'.

Oh my... Well, that is easy to fix - if you're in a hurry, you should access that URL and submit the extension through it. You'll be e-mailed a download link for the "unlocked" extension.

I'll do it and update the version that is uploaded here soon-ish, so if you want to wait a few moments, I'll let you know when it's done!

Regards,

Paulo Tavares
Hi Carolina,

Just uploaded a version which hopefully no longer warns you about IPP. Please let us know if it works for you now.

Regards,

Paulo Tavares
Hi, 

how can I use Workbook_Open action to open a file that is deployed in the Resources folder?

Regards, André.
Hi André,

The Resources folder contents in Service Studio may or may not be deployed to the server when you publish, depending on the deploy action you choose.

Since they will be deployed to the application folder, or one of its sub-folders, you only need to access the file in the right path, and probably pass it to the Workbook_Open action, depending on what kind of input it expects.

I hope this helps.

Regards,

Paulo Tavares
Hi Paulo,

Thanks for the quick answer. Please find attached the oml file to see what I am doing. It is just a simple test. I am also interested in replacing the path for something like Resources.template.xls in the input of the Workbook_Open action. Is this possible?

Regards, André.
Hi André,

I did not create this extension, so I am not sure how this works, but I would assume that the filename would be the local filename.

As such, I would expect it to be something like "template.xls", or ".\template.xls". Is the file deployed to the application folder, to a sub-folder?

I am not sure where exactly does the extension start to read from, but I would expect the filename to be a relative path starting from the application folder. Do try it out. If that doesn't work, let's see if someone else has had experience with the extension.

Also, be sure to read this article regarding reading files from the file system.

I hope this helps.

Regards,

Paulo Tavares
Hi Paulo, 

well it doesn't work... I will keep trying.

Regards, André.
Hi André,

Well, what's the error you get?

What's being logged in Service Center?

Regards,

Paulo Tavares
Hi,

with ".\template.xls" or "template.xls" in the Workbook_Open action I get "Could not open the workbook.Could not find the file.". Although if I write "http://localhost/Application/admin/template.xls" in the browser I can access and download the file...

Regards, André Passos.
Hi André,

Well, if that doesn't work, I'll suggest you write the file to a temporary folder where you have permissions, and read the file from there.

That way, your path can be an absolute path, something like C:\temp . I'm not really sure where the ASP.Net process is working from, so actually using a relative path seems to be a bad idea.

Do remember to set the adequate permissions, as mentioned in the previous posts.

Let us know if this helps.

Regards,

Paulo Tavares
Hello,

Would it be possible to upgrade this component to an 5.1 or 6.0 version?

When I upgrade it manaly it produces some warnings (see attachment).

Kind regards,
Evert
Community,

May I please know the correct usage of Cell_WriteRange? Specifically the DataSet parameter. It expects an Object type while I have a record list. I'm trying to cast my record list by using ToObject(MyList) but it is giving me error.

Please help.

Regards,
Shiva
Hello,

Since there was some discussion about this component (and some explaining about how to use of it) in another post I thought it would be handy that the link would be available in this post.

So for some explaining of this widget you can check it here

Kind regards,
Evert
Hi,

I have made a few fixes to this component and added a few functions. Maybe it can be useful for someone else.

Problems that experienced where that when i was using this component in 5.1 and used the function cell_writerange it was writing wrong fields to the excel file. When i used this function with an entity object it was showing in the excel file originalkey and and two other generated fields and nothing from the entity. When using a structure it was showing the data of the structure like it should  but also showing a few extra genereated fields.
So i opened the extension in integration studio and fixed this component.

I also took the liberty to add a few functions.
Workbook_Create i've splitted in these two
- Workbook_Create2003
- Workbook_Create2007

i also added
- Worksheet_Create
- Worksheet_RemoveByIndex
- Worksheet_RemoveBySheet

I made changes to the function Cell_Writerange. When sending an empty recordlist to this function with writeheader to true it was not writing a header. I changed this and now it writes a header when writeheader is set to true. Useful when you want to import this excelfile using ExcelToRecordlist.

To be used from version 5.1 onwards.

Regards,
wrote:
Hi,

I have made a few fixes to this component and added a few functions. Maybe it can be useful for someone else.

Problems that experienced where that when i was using this component in 5.1 and used the function cell_writerange it was writing wrong fields to the excel file. When i used this function with an entity object it was showing in the excel file originalkey and and two other generated fields and nothing from the entity. When using a structure it was showing the data of the structure like it should  but also showing a few extra genereated fields.
So i opened the extension in integration studio and fixed this component.

I also took the liberty to add a few functions.
Workbook_Create i've splitted in these two
- Workbook_Create2003
- Workbook_Create2007

i also added
- Worksheet_Create
- Worksheet_RemoveByIndex
- Worksheet_RemoveBySheet

I made changes to the function Cell_Writerange. When sending an empty recordlist to this function with writeheader to true it was not writing a header. I changed this and now it writes a header when writeheader is set to true. Useful when you want to import this excelfile using ExcelToRecordlist.

To be used from version 5.1 onwards.

Regards,
 
 Not sure if my previous attached file was ipp protected. IPP has been removed from the attached file. Couldnt update my previous post no permission.
André Passos wrote:
Hi,

with ".\template.xls" or "template.xls" in the Workbook_Open action I get "Could not open the workbook.Could not find the file.". Although if I write "http://localhost/Application/admin/template.xls" in the browser I can access and download the file...

Regards, André Passos.
 Did anyone figure out how to pass the filename to the Workbook_Open method? I am having the same problem Andre was.
 
Hello Corey,

The link to another forum post was broken, maybe you can find your answer here. There was some discussion about the use of this component:

Forum post

Hope it helpfull, else let it know.

Kind regards,
Evert