Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Multiple Excel Worksheets to Access
Name: elantro Date: October 25, 2006 at 19:27:25 Pacific OS: Windows 2003 CPU/Ram: Athlon 2500+ / 1GB PC3200
Comment:
I have a large number of sheets (120) in a single Excel workbook file. I can import each sheet individually into an Access table using the import wizard from Access. However, the task is very time consuming. I was wondering if there is a macro or code that can import all the worksheets from my workbook into individual tables in Access with a single command.
Name: pingy Date: October 26, 2006 at 12:36:40 Pacific
Reply:
You could try it in Access VBA with something like:
Sub DoExcel() Dim appExcel As Excel.Application Dim wb As Excel.Workbook Dim sh As Excel.Worksheet Dim strValue As String Dim intRow As Integer Dim intCol As Integer Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("YourTable") Set appExcel = CreateObject("Excel.Application") Set wb = appExcel.Workbooks.Open("blahblah.xls") For Each sh In wb.Sheets strValue = sh.Cells(intRow, intCol) rs.AddNew 'Do your stuff rs.Update Next rs.Close wb.Close appExcel.Quit End Sub
Summary: I loose some data when converting from text..even when I change the format.. example size column in excel worksheet is formated as text.. but when converted to acces only the size field is number, and...
Summary: I am looking for help and info to convert an Excel Spreadsheet to an Access Database (MDB) Any help or guidance would be great! Thanks in advance for the help ...
Summary: I am having trouble importing excel spreadsheets into Access 2000. When I select the file to import there is a message in the status bar saying "Import Spreadsheet Wizard" but the wizard is not visibl...