Making changes in a BOM with API

Hi,

I'm trying to work with an excel based BOM, but I can't get get the changes to in the BOM to stay and detach from the BOM.

If I omitt the bom.detach statemate, the user is left with excel spreadsheet open, if I include it the changes are lost

What am I missing ?

My bit of code looks like this,

Set View = Drawing.GetFirstView Set View = View.GetNextView Set BomTable = View.GetBomTable If Not (BomTable Is Nothing) Then BomTable.Attach3 Set xl = GetObject(, "Excel.Application") Set xlsh = xl.ActiveSheet

' do excel stuff xl.Quit BomTable.Detach Set xl = Nothing Set BomTable = Nothing End If

Cheers Craig

Reply to
Craig T
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.