How can I transfer more than 16384 records into Excel 2003

5 pts.
Tags:
Microsoft Excel
Microsoft Excel 2003
Visual Basic
Hi All, I am trying to transfer a table with more than 20,000 records from Access 2003 to Excel 2003, The code I'm using within VB goes like this:
Private Sub Allstock_excel_Click()

Dim filename As String
filename = "D:Automotive_RaporeArchivesAllstockReportAllstock_" & Format(Now, "DD-MM-YYYY-HH-MM-00") & ".xls"

DoCmd.TransferSpreadsheet acExport, 5, "tblAllstock", filename

Dim obj
Dim obook

If MsgBox("Transfer Complete." & vbCrLf & vbCrLf & "Would you like to open the file now?", vbYesNo) = vbNo Then Exit Sub

Set obj = CreateObject("Excel.Application")
Set obook = obj.workbooks.Open(filename)
obj.Visible = True

End Sub
The issue i am facing is that it wont let me transfer more than 16384 records into excel. Is there any coding or modifying the existing coding so I can transfer over that mark? Thanks for your help.

Answer Wiki

Thanks. We'll let you know when a new response is added.

It looks suspiciously like your data exceeds the 1GB memory limit of Excel 2003. The 2GB limit of Excel 2007 may not, in practice, be a sufficient solution. You could (with sufficient RAM have two independent copies of Excel open at the same time, each with part of your file but this may very well run counter to your application needs. Is there any reason why the whole of your Access database should be in Excel at once rather than a query subset?
For memory limits, see this for example.
By the way, the second parameter for TransferSpreadsheet should be 8 rather than 5, for Excel 2002 and 2003.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ToddN2000
    How are you importing this into Excel? You might try importing to separate worksheets within the workbook. I too am curious as to why the whole DB needs to be imported to Excel.  If it is to create a .CSV or other file format, you might want to try the open source "Open Office"  that may not have the same restrictions.

    15,605 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following