07-02-2025 09:30 AM
The range I am looking for is A1:AO414. I have checked and this seems right. It will open in Active X using this range. I can use a single cell A1 and I get data back just not with a range. Is my format correct for .net? A1:AO414
07-03-2025 03:26 AM
@aeastet wrote:
The range I am looking for is A1:AO414. I have checked and this seems right. It will open in Active X using this range. I can use a single cell A1 and I get data back just not with a range. Is my format correct for .net? A1:AO414
Are you sure cell2 needs to be "missing"?
In AX, you leave it unwired. Why not leave it unwired in .NET?
Can you post a SSCCE?
07-03-2025 06:42 AM - edited 07-03-2025 06:52 AM
If you do not connect the missing you get an error out of the get_Range function. I worked on this for hours yesterday. It seems that the ".net to variant" does not know how to interpret the response from the get_Range function. I am able to get other values from the same connection but not get_Range. I can also get a single value. I also found that I could not get column number and row number. It seems that NI only took this development so far and decided that it was worth the effort.
When you open the workbook you can also not leave everything unwired like you did in active X. I found the only way to get the workbook open is to connect all of the input to the property node. .net seems to be different and requires more care than active X did.
You said that you had something that worked in the second post. Can you share?
What is a SSCCE?
07-03-2025 07:00 AM - edited 07-03-2025 07:01 AM
@aeastet wrote:
What is a SSCCE?
I think SSCCE means "Short, Self Contained, Correct (Compilable), Example"
https://www.abbreviations.com/SSCCE
07-03-2025 07:40 AM
Just one comment, make sure that you close the .net references after you have converted the value.
07-03-2025 08:29 AM
@aeastet wrote:You said that you had something that worked in the second post. Can you share?
😉
The object you get is probably not a 2D array but some other class that .NET (or C#) treats as a 2D Array transparently.
I do read Excel, but either through OOXML or ADO (SQL). So my solutions won't match.
You'd probably be able to create one of those objects in a blanc VI, and make a SSCCE... It would eliminate every confusion about what exactly we're talking about.
07-03-2025 08:41 AM
07-03-2025 08:45 AM
@aeastet wrote:
Is the Page index ever different from 'i' in this case?
07-03-2025 08:46 AM
I have tried outputting the variant data in many different ways. 1D variant array, 2D string array, 2D double array, 1D string array, 2D variant array. No matter what I give it I get void unless I ask for only one cell. Then I get a string out with the value.
07-03-2025 08:48 AM
No I am getting the correct data in some of the other vi's in the for loop. I know that I am on the correct sheet. I verified that I am getting good references from the .net. There is no errors in the .net property or invoke nodes. The give good references. It just seems that the .net to variant does not know what to do with the data.