- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hallo, i wrote this ilogic code that helps me to import an excel table in my .idw file.
i need to write a code that can import the excel table from the folder of the .idw file.
in this way i can use aexcel tables in any folder, and not just one
Sub Main () CreateDrawingExcelTable() ' Set a reference to the active drawing document Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet ' Create the placement point for the table Dim oPoint As Point2d oPoint = ThisApplication.TransientGeometry.CreatePoint2d(25, 25) ' Create the table by specifying the source Excel file ' This assumes that the first row in the Excel sheet specifies the column headers ' You can specify a different row using the last argument of the AddExcelTable method Dim oExcelTable As CustomTable oExcelTable = oActiveSheet.CustomTables.AddExcelTable("C:\Users\barbusciat\Desktop\test.xlsx", oPoint, "Tabella colori") End Sub
Solved! Go to Solution.
Link copied