Modify Table values

Modify Table values

Ganesh_Shahane
Observer Observer
246 Views
5 Replies
Message 1 of 6

Modify Table values

Ganesh_Shahane
Observer
Observer

dear all, I want to access table on my drawing sheet and modify values in that tables.

Can someone please help with VBA code to achieve the same.

 

0 Likes
247 Views
5 Replies
Replies (5)
Message 2 of 6

Michael.Navara
Advisor
Advisor

This is relatively easy job. 

Dim drw As DrawingDocument = ThisDoc.Document
Dim sheet As Sheet = drw.ActiveSheet
'First table on active sheet
Dim table As CustomTable = sheet.CustomTables(1)
'Put data. Values are like Excel cell address
table.Rows(1)(1).Value = "A1"
table.Rows(2)(1).Value = "A2"
table.Rows(1)(2).Value = "B1"
0 Likes
Message 3 of 6

Gshahane01
Explorer
Explorer

Thank you..  there is one table with embedded excel spreadsheet. How to modify the values in it.

0 Likes
Message 4 of 6

Michael.Navara
Advisor
Advisor
0 Likes
Message 5 of 6

Gshahane01
Explorer
Explorer

Could you please suggest VBA code for same how to first get to that table by name and then modify underlying table. Refer attached screenshot, the tables are listed under 3rd party.

 

0 Likes
Message 6 of 6

Michael.Navara
Advisor
Advisor

Embeded Excel spreadsheets are OLE objects and it is hard to edit them. This object can't be used as source for CustomTable.

I have no sample for it. Sorry.

 

 

0 Likes