Excel lookup using Shared data file

Excel lookup using Shared data file

LukeDavenport
Collaborator Collaborator
819 Views
5 Replies
Message 1 of 6

Excel lookup using Shared data file

LukeDavenport
Collaborator
Collaborator

I need to read from an Excel spreadsheet using iLogic in C360, and it appears from this article that this is possible using a shared data file. Before I embark on this, can anyone confirm that this works well, and which functions can be used for the Excel lookup. Can I use iLogic GoExcel functions on it, or Excel = CreateObject("Excel.Application"), or another method to access the spreadsheet?

Any information appreciated, just want to assess the likely obstacles before writing any code.

Thanks,

Luke

 

 

 

 

Reply
Reply
0 Likes
820 Views
5 Replies
Replies (5)
Message 2 of 6

LukeDavenport
Collaborator
Collaborator

Quite disappointed to not get a response yet for this. Can Autodesk assist please?

 

I'm now doing this work for a client. A little more background - the plan was to use the customer's existing price calculation spreadsheet on the C360 server as follows:

 

1) Write a few numbers to Excel from Inventor model.

2) Let Excel do the calculation.

3) Read the calculation result back into Inventor.

 

So having followed the instructions in this article https://autode.sk/2MbXMh1 - I uploaded the model. Results:


a) The iLogic GoExcel functions do not work as expected (https://autode.sk/2MxGI2g)

b) The standard excelApp = CreateObject("Excel.Application") code gives the following error:

 

System.Exception: Cannot create ActiveX component

 

BUT - quoting from this Autodesk article https://autode.sk/2MbXMh1

 

'Data files (for C360) can come from any source, including databases, Excel, or hand-edited CSV or XML files'

 

So is this article correct? Can I actually talk to an Excel spreadsheet on a C360 server or not?

Thanks,

Luke

 

Reply
Reply
0 Likes
Message 3 of 6

Jon.Balgley
Alumni
Alumni

Hi Luke --

 

In the future, for the best service from Autodesk, please open a support case.

Link: https://knowledge.autodesk.com/contact-support/using-my-product 

 

As far as Excel on C360:  The GoExcel functions *do* work now.  But read-only.  You can only read values from the cells, you can't push new values into the sheet/formulas and compute different results.


Jon Balgley
Reply
Reply
0 Likes
Message 4 of 6

LukeDavenport
Collaborator
Collaborator

Jon, thanks for the reply, I appreciate it.

 

In this particular case I need to open a spreadsheet, write values to it and then read a calculated value from it, then close it without saving.

 

Can you confirm that there is no supported method to do this in C360 at present?

Thanks,

Luke

Reply
Reply
0 Likes
Message 5 of 6

Jon.Balgley
Alumni
Alumni

Yes, confirming there is no supported way to do that on C360 at present.  Sorry.

 

Mostly, this is due to the fact that we don't (can't) run Excel itself on the servers.  Instead, we use an alternative library that only supports reading.  Basically, you can use a spreadsheet for data, but not for calculations.

 

If you need to, there's a way to make desktop Inventor use this alternative library, so that your local environment matches the C360 environment.  Let me know if you need that (I don't remember the spelling off the top of my head).

 

 


Jon Balgley
Reply
Reply
0 Likes
Message 6 of 6

LukeDavenport
Collaborator
Collaborator

Ok thanks Jon. We'll have to go with a 'read-only' approach. It might be worth updating this article to make it really clear that only GoExcel functions within iLogic are supported (no access using Excel interop), and also that GoExcel can only be used to read, not write.

 

Also importantly, this article needs updating, as it currently says that GoExcel is not supported at all.

Thanks,
Luke

 

 

Reply
Reply
0 Likes