This article explains how to create an Access database using a Microsoft Excel sheet as a data source. Access is the database creation and management software included in the Microsoft Office suite of programs. Alternatively, you can export the data from Excel in a format that allows it to be imported into the most famous and popular database engines. Microsoft Access is a program available only for Windows platforms.
Steps
Method 1 of 2: Use Microsoft Access
Step 1. Launch Microsoft Access
It features a red icon in the shape of TO. The main page of the program will be displayed, where you can choose which database model to create.
Access is designed to integrate completely and easily with all products included in the Microsoft Office Professional package, especially with Excel, and is available only for Windows platforms
Step 2. Click on Blank Database
This option is located in the upper left of the program window.
If you need to use another database model offered by Access, select the one you are interested in
Step 3. Click the Create button when prompted
It is located in the lower right part of the pop-up window that appeared. An empty Access database will be created.
Step 4. Click the External Data tab
It is listed at the top of the Access program window.
Step 5. Click the New Data Source button
It is located on the left side of the tab toolbar External data. A drop-down menu will appear.
Step 6. Select the File item
It is one of the options listed in the drop-down menu that appeared. A submenu will appear next to the first one.
Step 7. Click on Excel
It is one of the items in the new menu that appeared. The dialog box for importing Excel data into the database will be displayed.
Step 8. Click the Browse button
It is located in the upper right part of the window.
Step 9. Select the Excel sheet to use as the data source
Navigate to the folder where it is stored, then click the corresponding icon to select it.
Step 10. Click the Open button
It is located in the lower right corner of the window.
Step 11. Specify how the data should be imported into the database
Choose one of the following options by clicking the corresponding radio button:
- Import source data into a new table in the current database- Choose this option if you have created a database without tables or if you want to add a new table to an existing database. By creating a new table you will be able to edit the data directly within Access.
- Append a copy of the records to the '' 'table: choose this option if you are using an existing database and want the records to be automatically added to a database table. By appending the data to an existing table, you can edit it directly within Access.
-
Connect to the data source by creating a linked table '' ': choose this option to create a direct link to external data. In this case the Excel sheet will be opened within Microsoft Excel. Using this import option, the data cannot be edited within Access.
Step 12. Click the OK button
It is located at the bottom of the window.
Step 13. Select a workbook sheet
Click the sheet name of the Excel file you want to import, visible at the top of the window.
- By default Excel creates workbooks consisting of three sheets named "Sheet 1", "Sheet 2" and "Sheet 3". You can only import data from one sheet at a time. If the data is present in all three sheets you will have to import the data of the first and then repeat the procedure for the other two always using the "External data" tab.
- In this case, you can delete, add or change the name of the sheets of an Excel workbook. Any changes you follow will be reflected in the Access database.
Step 14. Click the Next button
It is located in the lower right corner of the window.
Step 15. Enable detection of column headers
Select the "Column headings in first row" checkbox if the names of the columns that make up the selected Excel sheet are stored in the first row (for example the row TO).
Uncheck the indicated check button if you want Access to create the column headings
Step 16. Click the Next button
Step 17. If necessary, edit the sheet columns and database fields
If you need to import all the fields of the Excel sheet without any modification, skip this step. If not, follow the instructions below:
- To change the information of a field, click the corresponding column header. In this way you will have the possibility to change its name, the type of data it contains and define it or not as an index of the table.
- If you don't need to import a specific field, select the "Don't import field (skip)" checkbox.
Step 18. Click the Next button
Step 19. Set the primary key of the database
For best results, do not change the default settings for this aspect of the database, so that Access chooses the primary key.
You can also set the primary key of the table manually, by choosing the "User-defined primary key" option and selecting the name of the corresponding field using the menu on the right of the indicated item. If the table does not need a primary key, choose the "No Primary Key" option (in the context of databases this is not the recommended choice)
Step 20. Click the Next button
Step 21. Add a table name to import data into using the "Import into table: text field:
".
Skip this step to have the database use the default name
Step 22. Click the Finish button
It is located in the lower right part of the window.
Step 23. Click the Close button
It is located in the lower right corner of the data import window. This will close the latter and the database table will be created as specified.
You can select the "Save Import Steps" checkbox to have Access remember the import procedure you used, so that you can reuse it in the future
Method 2 of 2: Using Third Party Database Software
Step 1. Open the Excel document that contains the data to import into the database
Double-click the icon of the Excel file you have chosen to use.
If the Excel file has not yet been created, start the program, click the item Blank workbook, then create the dataset before continuing.
Step 2. Click the File menu
It is located on the Excel menu bar at the top of the program window (on Windows) or the screen (on Mac).
Step 3. Click the Save As item
It is one of the options listed in the menu File.
Step 4. Double-click the This PC entry
It is visible in the center of the dialog box that appeared.
If you are using a Mac, skip this step
Step 5. Choose the file format
Click the "Save As" (on Windows) or "File Format" (on Mac) menu, then select one of the following options:
- If you are using an application that uses a database installed on your computer, click the format CSV (from the English "comma separated values").
-
If you are using a web application choose the format XML.
In this case, if the Excel document does not contain any XML data, you will not be able to save it in the indicated format
Step 6. Click the Save button
It is located at the bottom of the window. The document you created will be saved to disk following the specifications provided.
Step 7. Create a new database using the software you have selected
The procedure to follow varies according to the program you are using, however normally you need to start the software, click on the item New one (or open the menu File and select the option New one) and follow the instructions that will be displayed on the screen.
Step 8. Locate the Import… option
It is usually inserted in the menu File, but the correct position varies from program to program.
Step 9. Select the Excel file to use as the data source
Navigate to the folder where it is stored and double-click the icon of the file you created in the previous steps.
Step 10. Follow the instructions given to you by the database to be able to import the data correctly
Step 11. Save the database
Normally you can press the key combination Ctrl + S (on Windows) or ⌘ Command + S (on Mac) to bring up the "Save" dialog.
Advice
- You can find several websites online that allow you to create a database, however in most cases you will need to register by creating an account.
- If you don't have full database software available, you may need to use a dedicated program to be able to open database files on a Windows or Mac computer.