Can I import Excel data?

Source: Internet
Author: User
Tags table name access database
Can I import Excel data?
Author: cg1 Excerpt from: access911.net
Problem:
Can I import Excel data into
Reply:
Manual method:

Check out Access Help:
Help-> Import or link Data and objects
If you manually
From a spreadsheet
Import or link data in a spreadsheet
Before proceeding, make sure that the data in the spreadsheet must be arranged in the appropriate table format, and that each field (column) of the spreadsheet has the same data type, and each row has the same field.
Open the database, or switch to the Database window of the Open database.
Do one of the following:
To import a spreadsheet, on the File menu, point to Get External data, and then click Import.
To link a spreadsheet, on the File menu, point to Get External data, and then click Link table.
In the import (or link) dialog box, select Microsoft Excel (*.xls) in the File type box.
Click the arrow to the right of the Look in box, select the drive and folder where the spreadsheet file is located, and then double-click its icon.
Follow the instructions in the Import Datasheet wizard dialog box. If you are importing from a Microsoft Excel version 5.0 or later workbook, you can import a worksheet in the workbook. However, you cannot import from other multiple spreadsheets, such as the Microsoft Excel version 4.0 workbook file. To import these files, you must first save each worksheet as a separate file.
Attention
You can import or link all the data in a spreadsheet, or just the data from a specified range of cells. Although users usually create a new table in Microsoft Access to import or link, you can append data to an existing table as long as the spreadsheet column headings match the name of the table field.
Access will attempt to assign the appropriate data type to the imported fields, but you should check the fields to make sure they are set to the desired data type. For example, in an Access database, a phone number or postal code field may be imported as a number field, but it should be changed to a text field in Microsoft access because any calculation of these types of fields is not desirable. You should also check and set field properties, such as formatting, if necessary.
Note that the above article still contains two practices and an extended approach:
1, directly with the import
2, with the link table
3, when you just want to import Excel data to the existing table, you can first link to an XLS file, and then directly with the Jet SQL statement to do:
insert into [Access table name] (field1,field2) Select field1,field2 from [XLS link table]


Programming Method:

Please use the TransferSpreadsheet method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.