Implementing Excel directly from Jade - Help Please.

Discussions about design and architecture principles, including native JADE systems and JADE interoperating with other technologies
alanvl
Posts: 29
Joined: Fri Aug 14, 2009 9:16 pm

Implementing Excel directly from Jade - Help Please.

Postby alanvl » Mon Dec 07, 2015 10:28 am

We have a number of systems where we have successfully implemented an interface from Jade to Excel via ActiveX.

We are now having a problem with an existing system where we are trying to include the same functionality. When we attempt to run the application that uses the interface via createExternalProcess we are getting an error "Error Code:14181 Text:ActiveX invoke caused an exception" - this is occurring during a Save As operation (once we have finished creating the excel document).

The issue is that when I run the same application via a "run" from a Jade Fat client we do not get this error. I believe that fault is probably a security issue but not sure how to resolve - the directory we are writing to appears to have correct permissions for "Users". We can directly create "normal" output files to the same directory from the same Jade Process (we can switch between CSV output using File class and Excel ActiveX).

Some Environment Info ...
Jade 6.3.12
Excel 15
Windows Server 2012 R2

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Implementing Excel directly from Jade - Help Please.

Postby BeeJay » Sat Dec 12, 2015 8:24 am

Does the extended error text of the 14181 exception give you any indication of the underlying error that was reported back by Excel and/or Windows?

Cheers,
BeeJay.

alanvl
Posts: 29
Joined: Fri Aug 14, 2009 9:16 pm

Re: Implementing Excel directly from Jade - Help Please.

Postby alanvl » Wed Dec 30, 2015 9:49 pm

Hi BeeJay

The following error is logged
Error Code:14181 Text:ActiveX invoke caused an exception
category:0
continuable:false
currentMethodDesc:XL_I_Workbook::saveAsA
errorItem:SaveAs
extendedErrorText:ActiveX internal error code = -2146827284
SaveAs method of Workbook class failed

The Workbook SaveAs method parameters are optional so I created a saveAsA method that just passed the filename. This worked OK with other systems.

I have since successfully tried the SaveAsCopy method.

Still don't understand why the execution via Jade fat client worked and the other didn't

Ta
Alan

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Implementing Excel directly from Jade - Help Please.

Postby BeeJay » Wed Dec 30, 2015 10:35 pm

Alan,

It looks like -2146827284 (or 0x800A03EC) is quite a common generic error when doing Excel automation, but nothing specifically around encountering this when doing a SaveAs operation.

It's interesting that fat client worked, but thin client didn't. We us SaveAs in our application both thin client and fat client and they work as expected.

Did the client machine in question have any local locale overrides set, and do you allow local locale overrides in thin client using the 'enhanced locale support' ini file option? I notice that one potential cause of this error is related to locale/LCID issues, and that is something that 'potentially' behaves differently when running as fat client versus running as a thin client when you don't have 'enhanced locale support' enabled.

Cheers,
BeeJay.

alanvl
Posts: 29
Joined: Fri Aug 14, 2009 9:16 pm

Re: Implementing Excel directly from Jade - Help Please.

Postby alanvl » Wed Jan 06, 2016 9:54 pm

Hi BeeJay,

Sorry initial post probably not clear, the failing application was a Fat Client application invoked via createExternalProcess, we have a tcp interface to this application that processes requests, some of the processing generates the excel spreadsheet which is returned in the response message. The same application when invoked via the "Run" from a Jade IDE fat client worked OK.

I am happy the the SaveAsCopy works well for us. I had a problem determining the correct parameter values to pass to the SaveAs

Ta
Alan


Return to “Design and Architecture”

Who is online

Users browsing this forum: No registered users and 6 guests