XmlMappedRange.CopyFromRecordset Method
Copies the contents of an ADO or DAO recordset onto a worksheet, beginning at the XmlMappedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function CopyFromRecordset ( _
Data As Object, _
MaxRows As Object, _
MaxColumns As Object _
) As Integer
int CopyFromRecordset(
Object Data,
Object MaxRows,
Object MaxColumns
)
Parameters
Data
Type: System.ObjectThe recordset to copy into the range.
MaxRows
Type: System.ObjectThe maximum number of records to copy onto the worksheet. If this argument is omitted, all the records in the recordset object are copied.
MaxColumns
Type: System.ObjectThe maximum number of fields to copy onto the worksheet. If this argument is omitted, all the fields in the recordset object are copied.
Return Value
Type: System.Int32
Remarks
If the recordset contains fields with OLE objects in them, this method fails.
Copying begins at the current row of the recordset. After copying is completed, the EOF property of the recordset object is true.
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.