473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to quick the time to upload data from excel

chandru8
145 100+
hi to all

iam uploading data from excel to msaccess using vb6.0.
it taking nearly more than 40 min for uploading 30000 records to the access.
is there any way to reduce the time

thanks
Apr 28 '08 #1
3 1017
kadghar
1,295 Expert 1GB
hi to all

iam uploading data from excel to msaccess using vb6.0.
it taking nearly more than 40 min for uploading 30000 records to the access.
is there any way to reduce the time

thanks
Perhaps this might be of help
Expand|Select|Wrap|Line Numbers
  1. dim a
  2. a = range(cells(1,1), cells(1,1).end(-4121).end(-4161)) 
Now the whole data in excel in in an array called 'a'.

Excel is very slow while working cell by cell, so don't ever do that, instead, create a variant. Then when you asign a range to a variant, the variant wont become a Range, but an array of data, which is very handy.

May be, uploading the array to the access will be faster if you do it from the array instead.
Apr 28 '08 #2
chandru8
145 100+
Hi
Thanks For Your Reply
I Need To Copy Data From One Excel To Another Through Vba If That Is The Case How I Have To Use Your Code

Can Explain Me
Thanks
Apr 29 '08 #3
kadghar
1,295 Expert 1GB
Hi
Thanks For Your Reply
I Need To Copy Data From One Excel To Another Through Vba If That Is The Case How I Have To Use Your Code

Can Explain Me
Thanks
same thing, just use a variant
lets say you have your inf from cell A1 to cell J30000, then just do something like this:

(note in this example, i'll create a new workbook, but you can use the OPEN method)

Expand|Select|Wrap|Line Numbers
  1. dim a
  2. with activeworksheet
  3.     a = range(.cells(1,1),.cells(30000,10)
  4. end with
  5. 'You can use END to find the edges of your tables
  6. workbooks.add
  7. with workbooks(workbooks.count).worksheets(1)
  8.      range(.cells(1,1),.cells(30000,10)) = a
  9. end with
HTH
Apr 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: wahodi | last post by:
Dear all I want to provide a function using asp for the users to search for their excel files in their PCs in IE and then upload to my database. Is it possible Best regards wahodi
1
by: Richard Holliingsworth | last post by:
Hello: Thanks for your quick response. I'm trying to import a new Excel file into an A2K table and it's truncating the data. One of the Excel columns is a text field that can be up to 2000...
1
by: Daniel | last post by:
Hi, can u explain to me what is the path need to use in order to upload and download the file based on below solution: 1.Set up a folder that both the web app and SQL server can get to. 2.Do a...
1
by: Mardy | last post by:
Hello I'm trying to determine the best way to allow users to import data from an Excel template to a sql server db via an asp.net page. I'll have about 4 or 5 users that will need to create...
1
by: =?Utf-8?B?TGFtaXM=?= | last post by:
HI, I am doing an aspx application and need to let my users be able to edit the information in my database by the page. My first Idea was to let them export the information to an excel file at...
5
by: priyammaheshwari | last post by:
Hi all, I have a MS Access database in which requests made by people is stored,but a coulmn for cost is left empty which is suppose to be populated by the administrator.Now the administrator wants...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.