Graeme Posted August 4, 2010 Report Share Posted August 4, 2010 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 Quote Link to comment
Jonathan Anderson Posted May 4, 2023 Report Share Posted May 4, 2023 (edited) 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. Edited May 4, 2023 by Jonathan Anderson Quote Link to comment
Jonathan Anderson Posted May 4, 2023 Report Share Posted May 4, 2023 I have not been able to populate cells of my spreadsheet with working formulas. See my post at this link for details. Quote Link to comment
LogMAN Posted May 5, 2023 Report Share Posted May 5, 2023 I'm not quite sure if this is what you are looking for but here is an example that works for me: Excel Formula.vi Quote Link to comment
Gribo Posted May 9, 2023 Report Share Posted May 9, 2023 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.