iLogic to launch Excel file?

iLogic to launch Excel file?

Anonymous
Not applicable
536 Views
1 Reply
Message 1 of 2

iLogic to launch Excel file?

Anonymous
Not applicable

What's the best way to get iLogic to launch Excel? 

 

I know I can use

ThisDoc.Launch("path\file.ext")

 

But, I want to launch an excel file, and have it appear on the proper sheet (set by a parameter).   Is this possible?

 

 

 

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

MjDeck
Autodesk
Autodesk

Here's sample code to do it.  The GoExcel.Close is required only if you have already used some GoExcel functions in the same rule.

 

GoExcel.Close
Dim sheetName As String = "Sheet3"
newExcelApp = CreateObject("Excel.Application")
newExcelApp.Visible = True
' Open a file that is in the same directory as this part:
wb = newExcelApp.Workbooks.Open(IO.Path.Combine(ThisDoc.Path, "ExcelSheetList.xlsx"))
wb.Sheets(sheetName).Activate ' Sample code to activate a specific sheet

 


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes