Export to Excel 2007

I'm using the code below to export a large data set from Access 2007 to Excel 2007. My code works fine exporting to Excel 2003 but I need it to be in 2007 due to the file's size. Everytime I try to export to an xlsx extension I get an error saying the extension is invalid or the file is corrupt.

Sub ExportSuppliersAllExcel()
Dim oXLApp As Object
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "dm_DBTR", "C:\Users\aoconnell.RAUC\Documents\dm_DBTR.xls", True
Set oXLApp = CreateObject("Excel.Application")
oXLApp.workbooks.Open "C:\Users\aoconnell.RAUCH\Documents\dm_DBTR.xls" oXLApp.Visible = True
Exit Sub
End Sub

Sponsored Links:

Related Topics

Access to Excel 2007 export annoyance
I've globally disabled the "Always create backup" general option for Excel 2007, but this only works when I start up from Excel. When I export to Excel 2007 within Access 2007, which I do very frequently, the resulting spreadsheet has this (quite annoying and unnecessary feature for me, anyway) turned back on. I can export to .xls without this issue, but prefer the more compact .xlsx format.

Anyone have a fix for this


Access 2007 report to Excel 2007. Keeps forcing me to choose Excel 2003?
I am having trouble export and Access 2007 report to Excel 2007. When I click export to excel it is only allowing me to export to excel 2003 or lower. The reason this is an issue is my report is over 64K of data.


Docmd.Transferspreadsheet from Access 2007 to Excel 2007 .xlsm
Trying to export a Access query to an Excel file like I've done hundreds of times with previous versions.

Simply put, I want to export a query from Access 2007 to Excel 2007 to a .xlsm file.

When I have a query open and click [External Data]>[export to Excel] the xlsm file format is not even in the list.


Export a report to Excel .... issue
I can export the report to excel on other machines. But when I try it on mine the export, excel icon is not highlighted. There is something that is not check on my machine. Have any clues?

The db is split and running 2007. I am the admin so I should have full rights


No Option to Export to .xlsx
I'm trying to export a report to excel and I don't get an option to use Excel 2007 (Excel 2003 and 95 are the only choices in the drop-down menu). I have the entire Office 2007 suite installed. If I want to export a table, the .xlsx option is available. Am I missing a feature or is a program setting out of whack?


Export to Excel button is always disabled (Access 2007)
I notice that, no matter the context, the shortcut menu button to export to Excel is always disabled. The Export drop down button is enabled, but it only shows PDF and XPS as target formats. However there is no problem in exporting to Excel from tables, queries or even reports using the ribbon tools. I want users to be able to export selected reports to Excel but I don't want to give them full access to the ribbon. Is there a way of doing this? I'm using Access 2007 SP3.

Update: a further curiousity. If the database is in accdb format, I can use print preview, right-click on the preview, then select Export.>Excel and that works. But the Export option isn''t available after conversion to accde format. Rats


Export to Excel
I am trying to export a query out of Access 2007 and into excel. When I run my export, it continues to run for hours without exporting the file.

On average, the query returns 30k-60k records so I am dumbfounded as to why it will not export.


Export to Excel
Have an issue exporting to excel. I am using MS Access 2007. The query to be exported contains over 130 columns. If I try to make a table out of it, I get a message saying "record is too large". The query runs fine when opened directly. I can also export the query using the excel export button (important - I have to choose the option "Export Data with Formatting and Layout"). But when I try to use the TransferSpreadsheet macro action or command, it pops up the "Enter Paramter Value" window (same occurs if I use the excel export button and do not select the option "Export Data with Formating and Layout"). I tried to check the apprently wrong expressions but the queries work fine and I guess it is related to the fact that the records are too large. My question is, how can I still use a macro to automate the export? I do not want to do the export manually as I have over 30 queries to export to different excel worksheets. thx


How to export an Access 2007 report to Excel via VBA
And it's unclear if they're for 2003 or 2007.

I've got a report in Access 2007 that I would like to be able to export to Excel using VBA.
The ribbon already has an option to export to Excel, which does everything I want, but the ribbon gets disabled as one of my security protocols, so the users are blocked from using the export options here.

Is there a way to call this feature from VBA/Allow this on a custom built ribbon/do something similar via VBA?

I've looked into using the TransferSpreadsheet method, but the query for my report is a rather big union query, based on a filter form, and is too complex for the TransferSpreadsheet method to use.


Exporting more than 65000 Access rows to Excel
I have Office 2007 and am trying to export a table with 500,000 rows of data into an Excel worksheet. However it is not letting me do this.

Since Excel 2007 has capacity for upwards of 1 million rows why can't I export a huge Access table.


Exporting more than 65000 Access rows to Excel
I have Office 2007 and am trying to export a table with 500,000 rows of data into an Excel worksheet. However it is not letting me do this.

Since Excel 2007 has capacity for upwards of 1 million rows why can't I export a huge Access table


Export Access 2007 Pivot Table to Excel 2007
I'm trying to export my Access pivot tbl to Excel but it will not export the calculated fields that I've added. Does anyone know how to get it to export from Access to Excel and include the calculated fields?


Export To Excel, Access 2010
I need to export a query to excel , the query comes from a big table but it's filter out by a pre selection date I picked but when it export to excel everything will be come in to excel, & I need only a part of it.

IS there a way to export to excel only what is displayed on the Query & not on what is hard coded


Export table to excel using excel template
I would like to export a table or query (using Access VBA) to excel 2007, using an excel template (for headings, formatting, totals, etc


Access 2007 - Export report to Excel
I have some reports that I export to Excel. If the heading is one word, the heading shows in Excel but if it is a heading like, "Membership with 2 or more Products," then all that appears is Text14 for example. Is there anyway to get the heading to show in Excel?


Export all tables to 1 excel file
I'd like to export all my tables in a Access 2007 db to one Excel-file where every table name should be the excel tab name. The first row should represent the column names.


Ms Access 2007 report export to excel 2007
is there a way to export a list (record set) of report from access 2007 to excell, keeping the format. I would like to automate the process using VBA.

Note : if you need a copy of the database I can send it,


Access results export to Excel
I use Access 2007 and Excel 2007. My Access query results are over 600,000 line items. Excel 2007 worksheets have over 1,000,000 rows unlike older versions.

Why, when I am exporting to Excel, am I limited to 65,000 lines? (There must a way to have my Access results exported
to one Excel worksheet with ONE step


Export to excel
Can somebody help with the code for Export to Excel. In my form, I need to add a command button - When the I click I want to export the datas from the table to excel. How to do it?
I m new in VB codes. Please help !


Export to excel
Can somebody help with the code for Export to Excel. In my form, I need to add a command button - When the I click I want to export the datas from the table to excel. How to do it?