You are viewing limited content. For full access, please sign in.

Question

Question

SDK Script (Control ToolBox) WorkFlow - Read File Excel

asked on January 27, 2014

Hi

 

its possible read file excel from sdk script workflow. 

use multiple libraries to read excel files work in windows applications etc. 
but in the sdk does not work. Add references, but not work

 

Its possible read files excels from sdk script (toolbox) workflow ?

 

Thanks

0 0

Answer

SELECTED ANSWER
replied on January 28, 2014

Hi,

 

Are you using the Workflow Designer on a different machine than your Workflow Server?

 

If so, you need to make sure that the Workflow Server knows where to find the assemblies that your script activity references.  In other words, copy the assemblies (e.g., closedxml.dll) to the Workflow Server's machine and put them at the same folder location as you have them on your Workflow Designer's machine.

 

If your script is running successfully when tested in the Workflow Designer's Script Editor, but is failing when it runs as part of a workflow, the issue is most often a missing (or misplaced) assembly reference.

1 0

Replies

replied on January 27, 2014

What do you mean adding references does not work? What references did you try to add?

0 0
replied on January 27, 2014 Show version history

For example:

 

microsoft.office.interop.excel

http://closedxml.codeplex.com/

http://excelpackage.codeplex.com/

 

not work in sdk script workflow, but work in applications windows, etc.

 

thanks

0 0
replied on January 27, 2014

Are you saying they're not showing up in the list of files you can add or that you add them and then they don't work?

 

Workflow is CPU-architecture specific, so if you installed the x64 version, you need x64 versions of the files you're trying to reference. I'm guessing those are x86 libraries since most Office installations are 32-bit.

0 0
replied on January 27, 2014

Hi, Miruna Babatie

 

the steps you take are the following

 

1. Add references for example closedxml.dll

2. Execute code from sdk editor. Work ok.

3. When publish don't work

 

Add script code (scExcel.txt)

Add CodeImagen1 

Add ExecuteCodeImagen1 (Execute from sdk editor, its work fine. Work ok)

Add ImagenWorkFlowDesign 

Add ExecuteImagenWorkFlowDesign (Execute from workflow designer, don't work. This token

scexcel_%errorexcel = SI2, because not read code line :

 var libro = new XLWorkbook(ARCHIVO_EXCEL);

 

Machine:

installed office 2007

Laserfiche Client

workflow designer

workflow administration console

 

thanks.

 

 

 

CodeImagen1.png
ExecuteCodeImagen1.png
ImagenWorkFlowDesign.png
ExecuteImagenWorkFlowDesign.png
scExcel.txt (3.98 KB)
CodeImagen1.png (49.58 KB)
0 0
replied on January 28, 2014

Based on the token value logged, it looks to me like your script executed and threw an error. But you are catching the error and just setting a token, you are not logging the error.

0 0
SELECTED ANSWER
replied on January 28, 2014

Hi,

 

Are you using the Workflow Designer on a different machine than your Workflow Server?

 

If so, you need to make sure that the Workflow Server knows where to find the assemblies that your script activity references.  In other words, copy the assemblies (e.g., closedxml.dll) to the Workflow Server's machine and put them at the same folder location as you have them on your Workflow Designer's machine.

 

If your script is running successfully when tested in the Workflow Designer's Script Editor, but is failing when it runs as part of a workflow, the issue is most often a missing (or misplaced) assembly reference.

1 0
replied on January 28, 2014

Ok thanks

Miruna Babatie and Jacob Seene 

 

Ok. Not problem. working fine. Only move dll to path:

C:\Program Files\Laserfiche\Laserfiche Workflow 9

 

Workflow its ok.

 

thanks.

0 0
replied on January 27, 2014

Hi,

 

Respect:

Workflow is CPU-architecture specific, so if you installed the x64 version, you need x64 versions of the files you're trying to reference. I'm guessing those are x86 libraries since most Office installations are 32-bit.

 

if the error is x86 or x64 , so don't work (execute from sdk editor and execute from workflow designer (when publish) ) , right ?

You are not allowed to follow up in this post.

Sign in to reply to this post.