Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / July 2007

Tip: Looking for answers? Try searching our database.

need to convert 34 excel files into one access file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
learningaccess - 28 Jun 2007 18:20 GMT
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?
Signature

Thanks!

Klatuu - 28 Jun 2007 18:48 GMT
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.
Signature

Dave Hargis, Microsoft Access MVP

>  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?
learningaccess - 28 Jun 2007 18:58 GMT
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,

Signature

Thanks!

> 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
[quoted text clipped - 11 lines]
> > access file.
> > Any suggestions?
learningaccess - 28 Jun 2007 20:26 GMT
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
Signature

Thanks!

> 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
[quoted text clipped - 11 lines]
> > access file.
> > Any suggestions?
Alain Vaillancourt - 29 Jun 2007 16:28 GMT
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".

> 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?
Chris Reveille - 05 Jul 2007 20:16 GMT
Import the first file into a table
Link to all the other spreadsheets
Use an append query to append to newly created table.

Signature

Chris

>  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?
jmoss111 - 05 Jul 2007 22:36 GMT
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
   

>Import the first file into a table
>Link to all the other spreadsheets
[quoted text clipped - 5 lines]
>> access file.
>> Any suggestions?
PACALA - 08 Jul 2007 15:26 GMT
NO PROBLEMS, CONTACT ME...
Signature

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
JAN.PACALA@ZOZNAM.SK
SKYPE: PACALA.BA1

>  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?
tina - 08 Jul 2007 18:45 GMT
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...
>
[quoted text clipped - 6 lines]
> > access file.
> > Any suggestions?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.