Microsoft Excel 16.0 Object Library Missing from COM Reference list

Microsoft Excel 16.0 Object Library Missing from COM Reference list

paul.t.macknight
Advocate Advocate
11,915 Views
2 Replies
Message 1 of 3

Microsoft Excel 16.0 Object Library Missing from COM Reference list

paul.t.macknight
Advocate
Advocate

I am trying to do some work between Revit and Excel, and for reasons I won't go into right now I don't have access to Visual Studios (suffice it to say I won't get permission from IT), and have been using the Macro editor to do the work. However, I am having issues getting data back into Revit and it's looking more and more like it's because I'm missing the Microsoft Excel XX.0 Object Library reference. I have the Microsoft.Office.Interop.Excel library referenced and am still unable to retrieve unwrapped cell values from my Excel files to use/manipulate within Revit.

 

Annotation 2021-07-07 104456.png

 

Any ideas about why I'm missing the COM Excel Object Library (side note, Office 16.0 Object Library is listed) and how I can get SharpDevelop to find it, or a workaround that utilizes just the Interop library, would greatly appreciated.

0 Likes
Accepted solutions (1)
11,916 Views
2 Replies
Replies (2)
Message 2 of 3

paul.t.macknight
Advocate
Advocate
Accepted solution

While I would still like to know why I can't see the Excel 16.0 Object Library in SharpDevelop like I can in Visual Studio when I've used it previously (at the time, it was Excel 15.0), I have found a solution:

 

Excel.Range idRng = (Excel.Range)oSheet.Cells[i,j]

Then, I cast idRng to the data type that I need (string or double).

0 Likes
Message 3 of 3

paul.t.macknight
Advocate
Advocate

In terms of why 2016, it's because of the software I have available at work. We recently switched to 365 Apps for enterprise (though I have no doubt we're still a version behind, for some reason), but before then the most recent version I had was 2016 and see it on my personal computer at home (I also recently bought 2019 on another online site, similar price but can't remember which one right now). But since I'm at work and creating automation tools in the time it would take me to manually do the task, I'm stuck with using what they have available for me to use (pretty strict about downloading software rather than installing what's approved and already on the network).

 

I'd prefer to use the Object Library, but since I don't have that luxury and have had to find alternate ways, I don't have any issues with manipulating content. Just not as refined as I would prefer. I would recommend people go that route if it's an option for them.

0 Likes