ilogic to read different sheets/tabs in excel

ilogic to read different sheets/tabs in excel

Anonymous
Not applicable
326 Views
1 Reply
Message 1 of 2

ilogic to read different sheets/tabs in excel

Anonymous
Not applicable

Hello, 

I was wondering if anyone knows a code or a way to get inventor to recognize which sheets/tabs to read points from excel without any parameters in that sketch. I've been helped with this code

 

GoExcel.CellValue("filename.xls", "Sheet1", "A2")

but its not what I am trying to do.. I need it to let the user pick which excel file to use and which sheet/tabs to read the x-y coordinates from. The command I have is this 

 

Sub Main()

 

   ' Get the CommandManager object.

    Dim oCommandMgr As CommandManager

    oCommandMgr = ThisApplication.CommandManager

 

    ' Get control definition for the line command.

    Dim oControlDef As ControlDefinition

    oControlDef = oCommandMgr.ControlDefinitions.Item( _

                                                 "SCxImportPointsCmd") 

    ' Execute the command.

    Call oControlDef.Execute

End Sub

 

now the question is how do i get it to read like sheet 2 instead of sheet 1? keep in mind the sketch is just importing in points.. it has no parameters or anything to let inventor know to replace a number or where the points are at. I can't use parameters because the points are going to be clear each time a new x-y coordinates are being generated. 

 

 

0 Likes
327 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant

Hi lle5956,

 

I replied to the original thread here:

http://forums.autodesk.com/t5/inventor-forum/ilogic-code-to-read-a-specific-excel-sheet-in-a-workboo...

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes