Export OLE Object (Excel) Text to File - VBA

Export OLE Object (Excel) Text to File - VBA

Anonymous
Not applicable
4,350 Views
2 Replies
Message 1 of 3

Export OLE Object (Excel) Text to File - VBA

Anonymous
Not applicable

Hi,

 

I wonder if somebody could help me please.  I have searched the internet and forums for a solution but have drawn a blank.

 

I have a lot of AutoCAD files which have embedded OLE objects (excel) inside.  I want to be able to export only the text from the Excel OLE object using VBA (or Lisp, I don't mind which) without having to fire up the OLE application (i.e. Excel).  Does anyone if it is possible to do this? 

 

The embedded OLE objects have no link to any external files - so I imagine it must all be held somehow inside the AutoCAD file, but have no idea if or how it can be accessed?!!?

 

Any help anyone can offer is much appreciated.

 

 

Kind Regards

 

Ian

 

 

0 Likes
4,351 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Hi..this was pretty interesting..i looked for quite a few time in google before finally getting the below link

 

http://forums.autodesk.com/t5/Visual-Basic-Customization/How-to-open-an-existing-OLE-excel-worksheet...

 

did not get the time to test any of it..its time to sleep now..i wonder why there is not much documentation around...hope you can get atleast get a start with this...

0 Likes
Message 3 of 3

Anonymous
Not applicable

Hi VBAChallenger,

 

Thanks for your reply.  I had also found the same post and stepped through the code.  It managed to fire up the OLE application and I suppose I could instantiate a loop to extract everything from all cells.

 

I was hoping to avoid having to open the OLE application from a debugging and speed point of view.

 

If I don't manage to find a solution I may have to look again at opening the OLE app, but I'm still hopeful there's a way without having to do this.

 

I'll update the post if I get any further.

 

Thanks..

0 Likes