dsofile.dll and Excel 2007 file format

  • Thread starter Reinhard Thomann
  • Start date
R

Reinhard Thomann

Hi,
i intend to read document properties (meta info) of an Excel file with
dsofile.dll.
I read that it works fine with Excel 2003 file format.

Does ist also work with Excel 2007 file format?

TIA
Reinhard
 
R

Reinhard Thomann

Thanks.
It works fine with dsofile.dll 2.1 as long as file extension is *.xlsx
If i change file extension to something else e.g. *.aaaa it fails.
Excel file format 97-2003 doesn't habe this restriction!

How can i overcome this behavior, because i don't like
to change the file extension of my application?

TIA
Reinhard
 
P

Peter T

If i change file extension to something else e.g. *.aaaa it fails.

It doesn't "fail" but you can't see all the Office doc' properties. Simply
rename the file before you start and rename as original when done

Sub test()
Dim sFile As String, sFileTmp As String
Dim dso As DSOFile.OleDocumentProperties

' first ensure the file is not already open

sFile = "C:\<path>\myExcel2007file.aaaa"
sFileTmp = sFile & ".xlsx"

Name sFile As sFileTmp

Set dso = New DSOFile.OleDocumentProperties

dso_Open sFileTmp
' do stuff
dso.Close

Name sFileTmp As sFile

End Sub

Regards,
Peter T
 

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