Find XL version before importing

  • Thread starter Thread starter RD
  • Start date Start date
R

RD

Hi all,

I'm importing into Access 97 an Excel spreadsheet that was exported from
BusinessObjects. BO *says* it exports in Excel 97 format but Access 97 just
doesn't see it that way. I keep getting the runtime error 3274 - External table
isn't in the expected format.

If I run the *exact* same function in Access XP it runs fine. Unfortunately,
this adds yet one more layer to an alrready messy process.

Is there a way to determine the Excel version of a spreadsheet before running
the transfer?

Thanks for any help,
RD
 
It worth playing with it, you might find your answer
Make reference to microsoft excel, and use this code, you can find alot of
properties about the excel you opened, you might find the right one that
answer your question

Dim wd As Excel.Application
Dim myDoc As Excel.Workbook

Set wd = New Excel.Application
wd.Workbooks.Add "c:\aaa.xls"
Set myDoc = wd.ActiveWorkbook

Now check the myDoc properties by entering myDoc.
 
Thanks for that. I still can't find the version of the spreadsheet, only the
version of Excel installed on my machine. Still, it's fun to poke around in
another application's object models.

Fortunately, I've made some progress. Turns out BusinessObjects just sucks. If
one tries to export a table as Excel 97, the export will fail if there are any
"special" characters. Like "-". A simple hyphen like that will kill the
export. So, I *saved* the table as Excel 97. Access 97 doesn't recognize it
but Access XP does. So, I renamed my exported table without special characters
and then renamed it again as I imported it into Acc97. This works fine.

So, this turned out to be a BO issue and not an Access one.

I wonder though, why Acc97 doesn't recognize the saved table but AccXP does.
Oh, well.

Regards,
RD
 
Back
Top