add information to an entry excel

add information to an entry excel

Darkforce_the_ilogic_guy
Advisor Advisor
266 Views
1 Reply
Message 1 of 2

add information to an entry excel

Darkforce_the_ilogic_guy
Advisor
Advisor

is it possible to open new excel worksheet and add information to i it at lets the  user save it if he want to ?

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

WCrihfield
Mentor
Mentor

The quick answer is yes.  But you can't create a new Excel document by just using the GoExcel stuff in iLogic from the Snippets.  If your going to do it using iLogic, you've got to do it the 'hard way', without much help from the rule editor's intellisence ability, because it's reaching outside of Inventor's scope.

The following line is how you get the application and make it visible:

Dim oExcelApp = CreateObject("Excel Application") 'As Microsoft.Office.Interop.Excel.Application

oExcelApp.Visible = True

oExcelApp.DisplayAlerts = False

oWorkBook = oExcelApp.Workbooks.Open(oExcelFileName)

or

oWorkBook = oExcelApp.Workbooks.Add()

oSheet = oWorkBook.Worksheets.Item()

oSheet.Name = "something"

etc.

etc.

You can get some pointers from searching Excel VB on the internet.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes