Reading contents and properties of EXCEL file in .NET/VB

vbvjain
11-04-2004, 11:44 PM
Hi
I am developing an application that requires me to read the contents and properties such as Author Name, Title, Date of creation, etc. of EXCEL document. I created an object and read the contents of EXCEL workbook in a dataset object, but i am unable to get the properties associated with that document. Could anyone help me by telling as to how i can get those properties , maybe buy using certain API etc.
Thanks in advance.

Jamirez
11-05-2004, 06:31 AM
Try this...


Dim sStr as String
'oWB is an object representing a Workbook in your VB.Net Code

sStr = oWB.BuiltinDocumentProperties.Item("Author")



sStr should contain the workbook Author name.

herilane
11-05-2004, 08:22 AM
There's a component that allows you to do it without actually opening the file - works in VB6 at least, I assume it should work in VB.Net as well. Check this thread.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum