OLEObject question

B

Bragadiru

Hi,

In FoxPro I added to a Excel sheet few fields :

_control=xlref.activesheet.oleobjects.add('Forms.textbox.1')
_control.Object.Value="New Value"
....
The xls files were created a long time ago and now, I need to parse them.

Now in C# 2003 + PIA's, how can I access the oleObjects properties ?

I tried :
Excel.OLEObjects oleObjects =
(Excel.OLEObjects)wrkSheet.OLEObjects(Type.Missing);

foreach(Excel.OLEObject oleObject in oleObjects)

{

oleObject.Enabled = true; // it's working

BUT to what should I cast oleObject.Object ?? to access its Value property.

}

Excel.TextBoxes txtBoxes =
(Excel.TextBoxes)wrkSheet.TextBoxes(Type.Missing); returns 0 elements.


Or maybe I just need a different approach.

Thanks for any advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top