Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7976237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:52:05+00:00 2026-06-04T08:52:05+00:00

Does anyone know the fastest way to get data from and Excel table (VBA

  • 0

Does anyone know the fastest way to get data from and Excel table (VBA Array) to a table on SQL 2008 without using an external utility (i.e. bcp)?
Keep in mind my datasets are usually 6500-15000 rows, and about 150-250 columns; and I end up transferring about 20-150 of them during an automated VBA batch script.

I have tried several methods for getting large amounts of data from an Excel table (VBA) to SQL 2008. I have listed those below:

Method 1. Pass table into VBA Array and send to stored procedure (ADO)
— Sending to SQL is SLOW

Method 2. Create disconnected RecordSet load it, then sync.
— Sending to SQL VERY SLOW

Method 3. Put table into VBA array, loop though the array and concatenate(using delimiters) then send to stored procedure.
— Sending to SQL SLOW, but faster than Method 1 or 2.

Method 4. Put table into VBA array, loop though the array and concatenate(using delimiters) then place each row with ADO recordset .addnew command.
–Sending to SQL very FAST (about 20 times faster than methods 1-3), but now I will need to split that data using a separate procedure, which will add significant wait time.

Method 5. Put table in VBA array, serialize into XML, send to stored procedure as VARCHAR and specify XML in stored procedure.
–Sending to SQL INCREDIBLY SLOW (about 100 times slower than methods 1 or 2)

Anything I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:52:06+00:00Added an answer on June 4, 2026 at 8:52 am

    There is no single fastest way, as it’s dependent on a number of factors. Make sure the indexes in SQL are configured and optimized. Lots of indexes will kill insert/update performance since each insert will need to update the index. Make sure you only make one connection to the database, and do not open/close it during the operation. Run the update when the server is under minimal load. The only other method you haven’t tried is to use a ADO Command object, and issue a direct INSERT statement. When using the ‘AddNew’ Method of the recordset object, be sure to issue only one ‘UpdateBatch’ Command at the end of the inserts. Short of that, the VBA can only run as fast as the SQL server accepting the inputs.

    EDIT:
    Seems like you’ve tried everything. There is also what is known as ‘Bulk-Logged’ recovery mode in SQL Server, that reduces the overhead of writting so much to the transaction log. Might be something worth looking into. It can be troublesome since it requires fiddling with the database recovery model a bit, but it could be useful for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to get the operating system information from a microsoft sql
Does anyone know the fastest way of comparing a single string to n number
does anyone know a smooth / fast way of removing transparency from e.g. pngs/tiffs
I am trying to migrate data from an Informix database to SQL Server 2008.
Does anyone know how to make this code stop the knob from rotating past
Does anyone know of an existing way to change the order of an existing
Does anyone out there know what image format results in the fastest loading speeds?
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone know if there is any way to restrict access to the remote
Does anyone know how to get list of Page's Tabs with facebooker2 please? Michal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.