Inventor add-on interacting with Excel

Inventor add-on interacting with Excel

bhenderson
Advocate Advocate
744 Views
4 Replies
Message 1 of 5

Inventor add-on interacting with Excel

bhenderson
Advocate
Advocate

I have an Inventor add-on written by another using Visual Studio. It's been working fine for years but recently has been problematic.

 

The add-on creates a pre-formatted Excel spreadsheet when run on an assy file. Of late I have been finding instances where a worksheet from a newly created spreadsheet gets inserted into another Excel file I have open. And other occurrences where Splits and Freeze Panes are created or moved in the existing spreadsheet when I make a new one.

 

it's not a big task to fix these problems but I'm wondering if anyone has any ideas of what might be occurring and how to avoid it.

 

excel error in office.png


PDMC 2021
Inventor Build 353 Release 2021.3.3
Vault Pro 2021 Build 26.2.24.0, 2021.2.1 Update
0 Likes
745 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

This would be really difficult to diagnose without seeing the code being used by the Addin that creates/edits/reads the Excel files.  I see that you're using Inventor 2018, but which version of Excel are you using?  Have you recently upgraded either software, that you believe may have started the problem occurring?  If this problem only occurs when you have another Excel file open while creating the new ones, is this the new behavior, or has it worked correctly under those same circumstances in the past, but not now?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

bhenderson
Advocate
Advocate

I thought that might be the case re the source code.

 

As for updates, yes there has been several Windows, Inventor, Vault and Office updates. I think this problem began when we switched from standalone Office to Microsoft 365 apps for Enterprise around 6 months ago.

 

The add-in and Excel have worked flawlessly for several years. The problem is only new. I'm thinking the problem is in the add-in calling Excel to start and populating the worksheets. If a spreadsheet is already open it gets confused about which spreadsheet to insert the worksheet & data into.


PDMC 2021
Inventor Build 353 Release 2021.3.3
Vault Pro 2021 Build 26.2.24.0, 2021.2.1 Update
0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

The bit about it getting confused when multiple worksheets are open at the same time, and it getting confused sounds like it shouldn't be too difficult to fix.

It is still recognizing and using Excel, right?  Are you sure it's using Excel and a windows built-in alternative?  Have you checked the system variables to see if it is using LibXL?  If you're using Windows 10, go to Settings > System > About > System info > Advanced system settings > and search through that dialog to find where it shows the system variables.  When it is set to use that LibXL (or a similar spelling), that means it is set to bypass opening Excel when the alternative can handle the job.  It's useful for folks that don't have Excel.

Is the software installed locally, then you just get a license over the network/internet, or is the software installed on the network somewhere?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

bhenderson
Advocate
Advocate

Thanks for the detailed description. There's nothing like the LibXL thingy in the variables. Not even remotely close.

 

Re the software, not sure if you're talking about the add-in software or Office. The add-in is local in C:\ProgramData\Autodesk\Inventor 2018\Addins. It's a dll file. I imagine Office is also local but who knows where it goes to get/check stuff.

 


PDMC 2021
Inventor Build 353 Release 2021.3.3
Vault Pro 2021 Build 26.2.24.0, 2021.2.1 Update
0 Likes