Re: Extracting Excel File items within Access via VBA



Look at the Transferspreadsheet function in the Help file for retrieving
data from Excel. Look at the Dir function in the Help file for getting file
names.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@xxxxxxxxxxxxxxx




<rlntemp-gng@xxxxxxxxx> wrote in message
news:1184165236.342078.83850@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I need to extract information from some Excel files but am stuck with
part of it:

As an example, I have the following Excel File that has 3 tabbed
sheets:
FileName: C:\ExcelData\JulyFile1.xls
SheetName: Sheet1-07032007 RowCount: 325 ColumnCount: 15
SheetName: Sheet2-07102007 RowCount: 450 ColumnCount: 25
SheetName: Sheet3-07172007 RowCount: 625 ColumnCount: 45
(I have 7 other Excel files with similar attributes)

I have code to open an Excel object, but am having trouble extracting
some other items from these files.

In my Access app, I need to loop through a series of Excel Files in a
folder and need to retrieve the filename if it is indeed an .xls
filetype.
Within each file, I need to retrieve the names of the sheet tabs, as
well as the row count and column count and column names within each
sheet.

Does someone have a code sample of how these items can be extracted
from an Excel file via VBA?

Thanks....



.



Relevant Pages

  • Re: Is it much faster to retrieve from query or table?
    ... I am retrieving data from Access into Excel through ADO. ... As it entails quite a bit of work on the Excel side to retrieve ... you need to get the recordset out of the ...
    (comp.databases.ms-access)
  • Re: Export to Excel
    ... Look at the Transferspreadsheet function in the Help file. ... Your Resource For Help With Access, Excel And Word Applications ... > Basically export query1 to MainDoc.xls (query1 tab) ...
    (microsoft.public.access.formscoding)
  • Re: MS PWA - Resource View - Limited to "Days" & "weeks", need to see
    ... I found this unsuitable for my reporting needs, because I could not retrieve the "Task" level detail of a Project Plan, thus I took the following approach. ... I do this every week, and export to excel, and locally run a merge of Staff/Team/Dept/Finance/etc data to each Task/Resource, Then run specific report extracts via Pivots. ... Is there a way to modify the View in PWA to allow me to select "Months" as a valid period. ...
    (microsoft.public.project)
  • Copy and Transpose
    ... end of the Excel session. ... Currently, to retrieve the data, I read ADO recordsets and assign the ... append/update validating the recordset fields with the cell values. ... following routine: since the Access tables are transposed respect to the ...
    (microsoft.public.excel.programming)
  • Re: Retrieving Exchange Rate Data from a Website
    ... You are looking for a method to automatically retrieve data from the net. ... I once did this a long time ago and built a macro to retrieve stock quotes. ... This is a great way to search for excel solutions... ... >> Patricia, ...
    (microsoft.public.excel.programming)