Click here to Skip to main content
15,881,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello guys,

This is my first time in the site, so possibly i am unsure how to ask questions. Still here it is -

I have an excel file containing xml files in oledb object form.

What i need is, how can i get the label and file path of that xml file stored in oledb using C#.

Note: OE1.name is not getting me the right thing.

What I have tried:

private void button2_Click(object sender, EventArgs e)
       {

           xlapp = new Excel.Application();
           xlwb = xlapp.Workbooks.Open("C:\\Users\\Vijay\\Documents\\File1.xlsm");
           xlws = xlwb.Worksheets["Sheet1"];



           foreach (Excel.OLEObject OE1 in xlws.OLEObjects())
           {

            MessageBox.Show(Convert.ToString(OE1.Name));

           }

           xlwb.Close();
           xlapp.Quit();

       }
Posted
Comments
Karthik_Mahalingam 2-Mar-17 22:23pm    
debug this object (OE1) and see what are all the available properties that you can use on it.
Praveen Behera 3-Mar-17 1:22am    
I did, but unfortunately, I dont see any such method to invoke filepath or label.
Karthik_Mahalingam 3-Mar-17 1:39am    
why filepath
Praveen Behera 7-Mar-17 1:21am    
Hi Karthik, These are embeded xml files. All I need is to open them read the xml content and deserialize them into a dataset. Needed filepath to open them. Or, is there any way to read the content? Thanks for your help.
Karthik_Mahalingam 7-Mar-17 1:36am    
oh sorry dude, i am unaware of this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900