Don't is there anyway of import data from excel by code?

X

x-digital

I'm looking for four corner of world by an answer.

I'd like to import from Excel the datas with rotine that had a progress bar.

thx
 
J

John Vinson

I'm looking for four corner of world by an answer.

I'd like to import from Excel the datas with rotine that had a progress bar.

thx

Importing from Excel in VBA is easy: use the TransferSpreadsheet
method.

Implementing a progress bar in VBA isn't all that hard, but I'm not
sure how to integrate the two so that the bar tracks the import; as
far as I know, the TransferSpreadsheet method imports an entire
spreadsheet in one operation, and doesn't give you checkpoints. I'd
suggest just setting the cursor to Hourglass at the start of the
transfer, and back at the end.

John W. Vinson[MVP]
 
X

x-digital

But I would like to import the data showing the bar of progress, because I
have many tables and registrations.

If I used HourGlass it would not help me a lot, because it would not
indicate in that point would be the import.

thx!

¹PS: I would like to use a different method TransferSpreadsheet, because I
know that would not work with the progressbar.
Somebody doesn't have the code of the routine TransferSpreadsheet, I could
create the rotine to import routine and with progressbar.
 
J

John Vinson

But I would like to import the data showing the bar of progress, because I
have many tables and registrations.

If I used HourGlass it would not help me a lot, because it would not
indicate in that point would be the import.

One alternative would be to use TransferSpreadsheet to *link* to the
spreadsheet, and use VBA code to count the number of records to be
transferred; open recordsets based on the linked spreadsheet, and
transfer data in blocks, updating a progress bar as you do so.

John W. Vinson[MVP]
 
Top