BIFF / Office 2007 Question

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

Hey All,

Since the new Excel file formats are different, I was wondering how folks
are dealing with legacy VBA code that uses Get and Seek functions to work
with things. I ask because I'm soon going to be facing these questions ;-)

Any advice / recommendations would be greatly appreciated.

Thanks!
 
In what way what do you consider (FileSystem) Get & Seek functions are
"legacy" and might not work with Office 2007, or are there some other
similarly named functions you are concerned with.

Regards,
Peter T
 
For the most part I'd say the file format change should be transparent to
users and not something to worry about. It seems that you've assumed that
some macros that worked in earlier Excels will be broken in 2007. Some have
been but for the most part MS has tried and succeeded in not making that so.
It may not always seem that way but they want people to upgrade and try not
to create reasons for them not to. So I think the presumption should be
that things will work unless shown otherwise.
 
Hey Jim,

OK. Let's assume we're using Excel 2003 for starters and we have the
following code:

Dim abytFile(1) As Byte

Get m_hFile, , abytFile

If I use the above code with an Excel created in XL 2003 and earlier, the
BOF markers are 9 for lower and 8 for upper byte and the EOF markers are 10
for lower byte and 0 for upper byte. If run against an .xlsx file, it
fails.

Thus, the question is, if there is VBA code that loops through records in a
workbook via Get / Seek, what are the distinguishing markers for these later
workbooks?

Thanks
 
I did not apprecate that you were reading Excel files at the byte level,
something that no Excel methods support (Get being VB). I had Excel methods
in mind in saying that we can assume MS has made whatever changes are
necessary for them to continue to work in Excel 2007 despite the file format
change.

The plot thickens in the new version because besides the XML in ZIP files
that are XLSX and XLSM files there is the new binary in ZIP format XLSB and,
of course, the old binary format is still supported.

Reading Excel files directly is something very few people have done or need
to do but your task may be easier because the new formats are 'open' and so
publically documented. I would think your first step would be to unzip the
new files...
 

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

Back
Top