Excel-DNA / Excel-DNA/ExcelDna

Range.Columns property error encountered after upgrading to new version of exceldna

Open
#705 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

[ClassLibrary1_vb_testRange.zip](https://github.com/user-attachments/files/16318356/ClassLibrary1_vb_testRange.zip)

I recently encountered a problem using the latest version
When the range object uses the Columns attribute, it cannot be used normally.

[Range.Columns Property (Microsoft.Office.Interop.Excel) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.interop.excel.range.columns?view=excel-pia#microsoft-office-interop-excel-range-columns)

I used to use "rangeObj.Columns(1)" to get the first column of data in the range, but now when I use the same code, an exception occurs: "System.MissingMemberException"
Previously the following code worked fine:
dim result = rangeObj.Columns(1).value
Now i can only:
Dim temp = rangeObj.Columns(1)
dim result = temp.value

This problem feels very strange to me. This is the only problem I have left after upgrading to the new version. Please help me confirm the reason.

I've attached the project I used. Excel input during debugging:
![Snipaste_2024-07-19_19-52-26](https://github.com/user-attachments/assets/769ab33d-b17c-4ff6-a454-c44c3e964327)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.