내보내기(0) 인쇄
모두 확장
확장 최소화
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

DoCmd.TransferSpreadsheet Method (Access)

Office 2010

The TransferSpreadsheet method carries out the TransferSpreadsheet action in Visual Basic.

.TransferSpreadsheet(TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA)

A variable that represents a DoCmd object.

Parameters

Name

Required/Optional

Data Type

Description

TransferType

선택

AcDataTransferType (영문)

The type of transfer you want to make. The default value is acImport.

SpreadsheetType

선택

AcSpreadSheetType (영문)

The type of spreadsheet to import from, export to, or link to.

TableName

선택

Variant

A string expression that is the name of the Microsoft Office Access table you want to import spreadsheet data into, export spreadsheet data from, or link spreadsheet data to, or the Access select query whose results you want to export to a spreadsheet.

FileName

선택

Variant

A string expression that's the file name and path of the spreadsheet you want to import from, export to, or link to.

HasFieldNames

선택

Variant

Use True (–1) to use the first row of the spreadsheet as field names when importing or linking. Use False (0) to treat the first row of the spreadsheet as normal data. If you leave this argument blank, the default (False) is assumed. When you export Access table or select query data to a spreadsheet, the field names are inserted into the first row of the spreadsheet no matter what you enter for this argument.

Range

선택

Variant

A string expression that's a valid range of cells or the name of a range in the spreadsheet. This argument applies only to importing. Leave this argument blank to import the entire spreadsheet. When you export to a spreadsheet, you must leave this argument blank. If you enter a range, the export will fail.

UseOA

선택

Variant

This argument is not supported.

You can use the TransferSpreadsheet method to import or export data between the current Access database or Access project (.adp) and a spreadsheet file. You can also link the data in a Microsoft Excel spreadsheet to the current Access database. With a linked spreadsheet, you can view and edit the spreadsheet data with Access while still allowing complete access to the data from your Excel spreadsheet program. You can also link to data in a Lotus 1-2-3 spreadsheet file, but this data is read-only in Access.

참고 사항참고

You can also use ActiveX Data Objects (ADO) to create a link by using the ActiveConnection property for the Recordset object.

The following example imports the data from the specified range of the Lotus spreadsheet Newemps.wk3 into the Access Employees table. It uses the first row of the spreadsheet as field names.

DoCmd.TransferSpreadsheet acImport, 3, _ 
 "Employees","C:\Lotus\Newemps.wk3", True, "A1:G12"
이 정보가 도움이 되었습니까?
(1500자 남음)
의견을 주셔서 감사합니다.
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2014 Microsoft. All rights reserved.