need to convert 34 excel files into one access file

G

Guest

Hi,
I have 34 excel files of identical layout that I need to convert into one
access file. The data in these 34 files combined very much exceeds the
maximum allowable number of rows in excel.
Well I can successfully save one excel file into access using the import
wizard. My difficulty is in adding the additional 33 files to this first
access file.
Any suggestions?
 
G

Guest

I don't mean to be rude, I will try to explain. You are trying to use Access
like a spreadsheet. It is not at all like a spreadsheet, it is a relational
database. What you are trying to do is use Access like a spreadsheet. If
you are wanting to use Access, then you need to analyse your data and create
related tables to store the information; otherwise, you would be better off
to just keep the data in Excel.
 
G

Guest

I realize that thanks. I need to combine these 34 excel sheets and sort them
in various ways to get needed information. My first three sheets alone
exceed excel's row limit of just over 65000 rows.
Can you assist me in combining these 34 spreadsheets into one access table
so I can sort the information various ways and get needed information. I
also neeed to do calculations aka. expressions in access.
Thanks,
 
G

Guest

Dave,
I think I need just a "Flat File Database" as opposed to a Relational
Database. If you could help me out I would GREATLY appreciate it.
Chris
 
A

Alain Vaillancourt

If you want to import all your Excel files to the same Table in an Access
file, after importing the first Excel file in a "New Table", for the other
Excel files you can choose to import "In an Existing Table" in the "Import
Spreadsheet Wizard".
 
G

Guest

Import the first file into a table
Link to all the other spreadsheets
Use an append query to append to newly created table.
 
J

jmoss111 via AccessMonster.com

I do a lot of this type of work and have built processes to automate
importing a lot of files:

Always require the user to build uniformly named files.. that's like trying
to herd cats.

I have a vb script that reads a specific folder and builds a text file
containing all files in that folder of a specific type:
========================
Dim objFSO
Dim ofolder
Dim objStream
Set objFSO = CreateObject("scripting.filesystemobject")
'create the output file
Set objStream = objFSO.createtextfile("c:\FileList\tblMyFileList.txt", True)
CheckFolder (objFSO.getfolder("J:\MyShare\MyFolder\")), objStream
'MsgBox "File Search Completed." + vbCr + "Please check c:\FileList\
tblMillFIleList.txt for details."
Sub CheckFolder(objCurrentFolder, objLogFile)
Dim strTemp
Dim strSearch
Dim strOutput
Dim objNewFolder
Dim objFile
Dim objStream

strSearch = ".xls"

For Each objFile In objCurrentFolder.Files
strTemp = Right(objFile.Name, 4)
If UCase(strTemp) = UCase(strSearch) Then
'Got one
strOutput = CStr(objFile.Path)
objLogFile.writeline strOutput
End If
Next

'Recurse through all of the folders
For Each objNewFolder In objCurrentFolder.subFolders
CheckFolder objNewFolder, objLogFile
Next

End Sub
===============================================
Then I import the text file in c:\FileList\tblMyFileList.txt into my database
and add a column for tablename and parse the filename part from the
path/filename string and insert into tablename

A code module contains :
=================================
Set rs = db.OpenRecordset("SELECT * FROM tblMilARFileList ;", dbOpenSnapshot)
rs.MoveLast
rs.MoveFirst

Do While Not rs.EOF
MyARFile = rs!MilARFiles
MyTable = rs!tablename
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
mytablename, MyARFile, True
rs.MoveNext
Loop
====================================================================

and finally I consolidate the tables:

Dim db As Database
Dim tbl As TableDef
Dim strNewTablename As String

DoCmd.SetWarnings False


Set db = CurrentDb


For Each tbl In db.TableDefs
If tbl.Name Like "FY" & "*" Then

strNewTablename = tbl.Name
CurrentDb.Execute "Insert into tblMillARConsolidated select *
from " & strNewTablename
DoCmd.DeleteObject acTable, strNewTablename

End If
Next tbl
db.Close

======================================================

Hope this helps,

Jim






Chris said:
Import the first file into a table
Link to all the other spreadsheets
Use an append query to append to newly created table.
Hi,
I have 34 excel files of identical layout that I need to convert into one
[quoted text clipped - 4 lines]
access file.
Any suggestions?
 
G

Guest

NO PROBLEMS, CONTACT ME...
--
PACALA JAN [ACCESS DEVELOPER]
SEND 10$ TO...
ACCOUNT:
SK31 1100 0000 0026 1674 0428
SwiftCode: TATRSKBX
Tatra banka as,Hodzovo nam.3, 811 06 Bratislava
(e-mail address removed)
SKYPE: PACALA.BA1
 
T

tina

these newsgroups are for the FREE exchange of ideas, information, and
assistance. this is absolutely NOT the place to troll for business, such
postings are not welcome, and they make such a bad impression that it can
only hurt your reputation in the Access community.

if you want to post actual advice and assistance here in the newsgroups for
all to benefit from, or post questions of your own, then your participation
will be welcomed.


NO PROBLEMS, CONTACT ME...
--
PACALA JAN [ACCESS DEVELOPER]
SEND 10$ TO...
ACCOUNT:
SK31 1100 0000 0026 1674 0428
SwiftCode: TATRSKBX
Tatra banka as,Hodzovo nam.3, 811 06 Bratislava
(e-mail address removed)
SKYPE: PACALA.BA1


learningaccess said:
Hi,
I have 34 excel files of identical layout that I need to convert into one
access file. The data in these 34 files combined very much exceeds the
maximum allowable number of rows in excel.
Well I can successfully save one excel file into access using the import
wizard. My difficulty is in adding the additional 33 files to this first
access file.
Any suggestions?
 

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