Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I have created winform application - to retrieve active excel application details fro desktop. Currently i am using Microsoft.Office.Interop.Excel to get all excel file properties.

I am looking for methodology to retrieve all excel file properties without using Interop.

I have analyzed through so many blogs and I have tried through "Late binding" approach to get excel file properties.In this approach I am unable to get following values "Macro Names","Macro properties","Built-in properties" .

Kindly guide me , If any approach which helps me to get all excel file properties.

Thanks,

Meenakshi K
Posted
Comments
Sergey Alexandrovich Kryukov 8-Jun-15 11:58am    
Why? What do you mean?
—SA
Meenakshi Kabali 9-Jun-15 2:20am    
Hi Sergey Alexandrovich,

I am looking for methodology through .NET able to retrieve all excel properties without interop.In Interop we have VBComponent property through this we can get macro names , line count of each macro and all relevant macro details.But I want to get all these details without interop.

Kindly suggest me methodology present in .net and I am not interested in using 3rd party application.

Thanks,
Meenakshi
Sergey Alexandrovich Kryukov 9-Jun-15 4:06am    
The last link in my answer works for both reading and writing Excel file and is, in my opinion, the most preferred API.
—SA

1 solution

If by "VBProject" you mean VB.NET project, there is nothing related to "interop". If you mean the properties of the resulting assembly, there is also nothing related to "interop", because the assembly is managed. And all the terms you mentioned "late binding", "macro" are also totally irrelevant.

The only thing related to "interop" is Office interop, as you can use Office applications (unmanaged ones) through Microsoft Office Interop. But you also don't need to use it, if you want to read or write some Excel files. Instead, you can use Microsoft Open XML SDK. Please see my past answers referenced in this one: How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[^].

See also this CodeProject article: Creating basic Excel workbook with Open XML[^].

—SA
 
Share this answer
 

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