TransferSpreadsheet Error, Access 2003 to Excel 2007.

  • Follow


Hello

I've had Excel 2007 installed and am trying to run an Access 2003
application that transfers data to Excel. All the procedures worked
fine when using Excel 2003.
The section of code that is generating the error is:

  'Transfer the recordset data to the workbook.
  DoCmd.TransferSpreadsheet acExport, , QueryName, strNewWorkbookPath
_
                            , , NamedFormula

The error details are:
err.Number
3274

err.Description
External table is not in the expected format.

Any ideas as to how I can fix this error?
0
Reply BJ 3/19/2008 10:46:21 PM

Just a guess, but maybe set Excel's default to saving files in the older 
Excel 2003 format. If the newly created Excel file is in 2007 format, Access 
2003 may be unable to write to it. That's what the error description sounds 
like to me.

"BJ" <bradley.john@westrac.com.au> wrote in message 
news:37629b21-4c9c-4851-a56d-ba27777bd4b0@s37g2000prg.googlegroups.com...
> Hello
>
> I've had Excel 2007 installed and am trying to run an Access 2003
> application that transfers data to Excel. All the procedures worked
> fine when using Excel 2003.
> The section of code that is generating the error is:
>
>  'Transfer the recordset data to the workbook.
>  DoCmd.TransferSpreadsheet acExport, , QueryName, strNewWorkbookPath
> _
>                            , , NamedFormula
>
> The error details are:
> err.Number
> 3274
>
> err.Description
> External table is not in the expected format.
>
> Any ideas as to how I can fix this error? 

0
Reply Paul 3/20/2008 12:31:22 AM


On Mar 20, 9:31=A0am, "Paul Shapiro" <p...@hideme.broadwayData.com>
wrote:
> Just a guess, but maybe set Excel's default to saving files in the older
> Excel 2003 format. If the newly created Excel file is in 2007 format, Acce=
ss
> 2003 may be unable to write to it. That's what the error description sound=
s
> like to me.
>
> "BJ" <bradley.j...@westrac.com.au> wrote in message
>
> news:37629b21-4c9c-4851-a56d-ba27777bd4b0@s37g2000prg.googlegroups.com...
>
>
>
> > Hello
>
> > I've had Excel 2007 installed and am trying to run an Access 2003
> > application that transfers data to Excel. All the procedures worked
> > fine when using Excel 2003.
> > The section of code that is generating the error is:
>
> > =A0'Transfer the recordset data to the workbook.
> > =A0DoCmd.TransferSpreadsheet acExport, , QueryName, strNewWorkbookPath
> > _
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0, , NamedFormula
>
> > The error details are:
> > err.Number
> > 3274
>
> > err.Description
> > External table is not in the expected format.
>
> > Any ideas as to how I can fix this error?- Hide quoted text -
>
> - Show quoted text -

Thanks for your reply Paul.

I've tried looking through my latest book on Excel and Access
integration, but am unable to find any distinctly different code for
creating / referencing Excel to that in my 2003 version books.

Is there a way to set the version of Excel (97-2003) when opening it
in Access 03 via vba?
Do I have to add a new library to Access 03 in order to reference
Excel 07?
0
Reply BJ 3/21/2008 6:16:47 AM

I had this problem & it appears to be a glitch.  I have macros that execute 
TransferSpreadsheet and/or SendObject.  You just have to go into the Action 
part and re-set the Excel version.  Here's the problem, though.  I have some 
users on 2003 and some on 2007 and even though the Excel format 97-2003 
appears identical in Access 2003 and Access 2007 they are NOT compatible.  
Fortunately, I kept Access 2003 on an older machine & backed up all my 
databases to it.
-- 
I hope you understand what I'm saying.  Even though you save your db in 2003 
version, if you are running Access 2007 & use SendObject or 
TransferSpreadsheet to an Excel file, it won't work for users that don't have 
Access 2007.

"BJ" wrote:

> On Mar 20, 9:31 am, "Paul Shapiro" <p...@hideme.broadwayData.com>
> wrote:
> > Just a guess, but maybe set Excel's default to saving files in the older
> > Excel 2003 format. If the newly created Excel file is in 2007 format, Access
> > 2003 may be unable to write to it. That's what the error description sounds
> > like to me.
> >
> > "BJ" <bradley.j...@westrac.com.au> wrote in message
> >
> > news:37629b21-4c9c-4851-a56d-ba27777bd4b0@s37g2000prg.googlegroups.com...
> >
> >
> >
> > > Hello
> >
> > > I've had Excel 2007 installed and am trying to run an Access 2003
> > > application that transfers data to Excel. All the procedures worked
> > > fine when using Excel 2003.
> > > The section of code that is generating the error is:
> >
> > >  'Transfer the recordset data to the workbook.
> > >  DoCmd.TransferSpreadsheet acExport, , QueryName, strNewWorkbookPath
> > > _
> > >                            , , NamedFormula
> >
> > > The error details are:
> > > err.Number
> > > 3274
> >
> > > err.Description
> > > External table is not in the expected format.
> >
> > > Any ideas as to how I can fix this error?- Hide quoted text -
> >
> > - Show quoted text -
> 
> Thanks for your reply Paul.
> 
> I've tried looking through my latest book on Excel and Access
> integration, but am unable to find any distinctly different code for
> creating / referencing Excel to that in my 2003 version books.
> 
> Is there a way to set the version of Excel (97-2003) when opening it
> in Access 03 via vba?
> Do I have to add a new library to Access 03 in order to reference
> Excel 07?
> 
0
Reply Utf 3/21/2008 6:49:01 PM

3 Replies
630 Views

(page loaded in 0.054 seconds)

Similiar Articles:
















7/24/2012 6:08:19 AM


Reply: