cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to write in a LibreOffice Calc document With OleObject

SOLVED
Occasional Visitor

Trying to write in a LibreOffice Calc document With OleObject

Hello!

 

I'm trying to write in a xls doc with LibreOffice, using TestComplete, but I'm having an error message like that:

 

"[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \nConversion of dispatch object to Sequence failed!"

 

The Javascript code is:

 

function Main() {
try{
  var oServiceManager = Sys.OleObject("com.sun.star.ServiceManager");
  
  var oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop");
  
  var VariantArray = new Array();
  
  var myStruct = oServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue");
  
  myStruct.Name = "Hidden";
  
  myStruct.Value = true;
  
  VariantArray[0] = myStruct;
  
  var oDoc = oDesktop.LoadComponentFromURL("private:factory/scalc", "_blank", 0, VariantArray);
  
  var oSheet = oDoc["getSheets"]().getByIndex(0);
  
}catch(e){
  Log.Error(e);
}

}

In this line  var oDoc = oDesktop.LoadComponentFromURL("private:factory/scalc", "_blank", 0, VariantArray); I'm having this problem.

Please, Help me!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Trying to write in a LibreOffice Calc document With OleObject

The only LibreOffice discussion that I can find is here, and it may or may not help.

https://community.smartbear.com/t5/TestComplete-Functional-Web/OleObject-Libre-Office/td-p/58431

 

I suggest contacting Support directly with your question.  Here's the link:

https://support.smartbear.com/message/?prod=TestComplete

2 REPLIES 2
Highlighted
Community Hero

Re: Trying to write in a LibreOffice Calc document With OleObject

The only LibreOffice discussion that I can find is here, and it may or may not help.

https://community.smartbear.com/t5/TestComplete-Functional-Web/OleObject-Libre-Office/td-p/58431

 

I suggest contacting Support directly with your question.  Here's the link:

https://support.smartbear.com/message/?prod=TestComplete

Community Hero

Re: Trying to write in a LibreOffice Calc document With OleObject

Hi,

 

I am second to Marsha. Just as a wild guess, I think that the problem is due to the fact that JavaScript arrays are not OLE compatible...

What if you try approach described here: https://support.smartbear.com/testcomplete/docs/scripting/specifics/jscript.html#arrays ?
Does it help?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors