How add file to resource folder

How add file to resource folder

  

hi ,

    How to add excel file to resources folder in data tab dynamically without publishing the module


Thanls

R.karthik

Hi,


For that you need to run Windows command line. Here's an example:

   ServiceStudio.exe -importResource espace.oml excel.xlsx


Additional help of the command line options can be found executing: 

   ServiceStudio.exe -h


Finally, because there are still limitations with this command line approach (e.g. only allows 1 file at a time) two additional approaches to create such dynamic importing of resources have previously been done in [1] and [2].


Cheers!

Hello Karthik,

Could you explain to us why do you need to dynamically add an excel file to resources?

What's your use case?

Depending on what you wants to do, may exist different approaches or the ones presented may indeed be what you need...

Cheers.

Eduardo Jauch wrote:

Hello Karthik,

Could you explain to us why do you need to dynamically add an excel file to resources?

What's your use case?

Depending on what you wants to do, may exist different approaches or the ones presented may indeed be what you need...

Cheers.


Hi Eduardo,

                  Actually i need to import 36k record from Excel file to table if I do this in screen action it will get time out so I decided to use timer action so I need the file to be changed dynamically each time when I need to load data.

 Thanks

R.karthik

I think you're approaching this in the wrong way.

I would do the following:

1. Upload file from application

2. Store in database

3. wake timer to process the file.

In the timer, I would use the standard approach of processing lines up to the timeout, than would wake the timer again and finish the action.

By the way, without this approach in timer, having the file in the resources possibly will not avoid a timeout...

Cheers

Eduardo Jauch wrote:

I think you're approaching this in the wrong way.

I would do the following:

1. Upload file from application

2. Store in database

3. wake timer to process the file.

In the timer, I would use the standard approach of processing lines up to the timeout, than would wake the timer again and finish the action.

By the way, without this approach in timer, having the file in the resources possibly will not avoid a timeout...

Cheers

Hi Eduardo, 

              How to store excel file in db .

Thanks

R.karthik


When you upload a file, it is a binary, that you can access through the YourUploadWidgetName.Content.

So you just need a binary field in an entity, set its value to the content of the file and do a CreateOrUpdate like you usually do.

Cheers