Range.CopyFromRecordset(Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range.
public int CopyFromRecordset (object Data, object MaxRows, object MaxColumns);
Public Function CopyFromRecordset (Data As Object, Optional MaxRows As Object, Optional MaxColumns As Object) As Integer
Parameters
- Data
- Object
Required Object. The Recordset object to copy into the range.
- MaxRows
- Object
Optional Object. The maximum number of records to copy onto the worksheet. If this argument is omitted, all the records in the Recordset object are copied.
- MaxColumns
- Object
Optional Object. The maximum number of fields to copy onto the worksheet. If this argument is omitted, all the fields in the Recordset object are copied.
Returns
Remarks
If the Recordset object contains fields with OLE objects in them, this method fails.
Copying begins at the current row of the Recordset object. After copying is completed, the EOF property of the Recordset object is True.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將推出:在 2024 年,我們將隨著內容的意見反應機制逐步淘汰 GitHub 問題,並以新的意見反應系統來取代。 如需詳細資訊,請參閱提交並檢視相關的意見反應