Jump to content

ActiveX


Recommended Posts

Hi all,

I have an ActiveX-based VI that writes a 2D array of strings to an Excel worksheet. Occasionally the write fails, with the following error message:

-2147417848

The object invoked has disconnected from its clients.

Can anyone tell me what this means, please? I have little understanding of ActiveX. My VI has been put together by hacking others' examples. Today the VI ran successfully 1630 times in succession before failing. The write is across a network. I attach the offending article. Many thanks in anticipation.

Regards.

AXExcelWrite2DArrayWsheet.vi

Link to comment
  • 12 years later...

It may not be immediately obvious that the string input argument for "ConvertFormula" in the "Application" property node refers to the lower right corner where the 2D input array should go in "RxCy" format where x is the absolute row index and y is the absolute column index (number not letter).   Do not confuse the letters "R" and "C" with column letters because the "R" represents the word "row" and the "C" represents the word "column".

Likewise the string input argument for "Range" in the "Worksheet" property node refers to the upper left corner where the 2D input array should go in "Ax" format where A is the absolute column letter and x is the absolute row index.

See 2 examples shown in the attached image.

axe.png

Edited by Jonathan Anderson
Link to comment

When writing arrays directly to Excel, there is a time limit for Excel to write the array to the selected range. If that limit is exceeded, you will get an error.

The .NET API provides a more detailed error than the ActiveX API.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.