Import Excel Datasheet

O

Oded Kovach

Hello there

I need to import excel datasheet into access table.

The excel workbook can provide more then one worksheet.

How can i know how many worksheets are on excel workbook, their names and
import one of then to access table?

any help would be useful
 
J

John Nurick

Hi Oded,

Presumably you're trying to do this in VBA code. If you go to
http://groups.google.com and search for

"drink soup audibly" group:microsoft.public.excel.programming

you'll find a message from onedaywhen that includes a GetWSNames()
function. This returns an array containing all the worksheet names. You
can use something like the following in the Load event of your form to
put the names into a combobox (cboSheetNames). The combo's RowSourceType
must be set to "Value List".

Dim strWBKName As String

strWBKName = "C:\Folder\File.xls"
Me.cboSheetNames.RowSource = Join(GetWSNames(strWBKName),";")
 
J

Jamie Collins

John Nurick said:
If you go to
http://groups.google.com and search for

"drink soup audibly" group:microsoft.public.excel.programming

you'll find a message from onedaywhen that includes a GetWSNames()
function.

LOL! Try searching the entire www for another occurrence of that
phrase. I've seen Steve Kass using GUIDs to reference his key posts
(e.g. try searching google groups for
9647763D-823F-46CB-9704-18F15D16E687) but I seem to have inadvertently
invented an alternative using memorable but uncommonly used phrases!

Jamie.

--
 
J

John Nurick

Let's make a habit of it.

LOL! Try searching the entire www for another occurrence of that
phrase. I've seen Steve Kass using GUIDs to reference his key posts
(e.g. try searching google groups for
9647763D-823F-46CB-9704-18F15D16E687) but I seem to have inadvertently
invented an alternative using memorable but uncommonly used phrases!

Jamie.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top