_PasteSpecial Method
_PrintOut Method
Activate Method
AddComment Method
AdvancedFilter Method
ApplyNames Method
ApplyOutlineStyles Method
AutoComplete Method
AutoFill Method
AutoFilter Method
AutoFit Method
AutoFormat Method
AutoOutline Method
BorderAround Method
Calculate Method
CheckSpelling Method
Clear Method
ClearComments Method
ClearContents Method
ClearFormats Method
ClearNotes Method
ClearOutline Method
ColumnDifferences Method
Consolidate Method
Copy Method
CopyFromRecordset Method
CopyPicture Method
CreateNames Method
CreatePublisher Method
Cut Method
DataSeries Method
Delete Method
DialogBox Method
Dirty Method
EditionOptions Method
FillDown Method
FillLeft Method
FillRight Method
FillUp Method
Find Method
FindNext Method
FindPrevious Method
FunctionWizard Method
GetEnumerator Method
GoalSeek Method
Group Method
Insert Method
InsertIndent Method
Justify Method
ListNames Method
Merge Method
NavigateArrow Method
NoteText Method
Parse Method
PasteSpecial Method
PrintOut Method
PrintPreview Method
RemoveSubtotal Method
Replace Method
RowDifferences Method
Run Method
Select Method
SetPhonetic Method
Show Method
ShowDependents Method
ShowErrors Method
ShowPrecedents Method
Sort Method
SortSpecial Method
Speak Method
SpecialCells Method
SubscribeTo Method
Subtotal Method
Table Method
TextToColumns Method
Ungroup Method
UnMerge Method
Erweitern Minimieren
0 von 2 fanden dies hilfreich - Dieses Thema bewerten.

Range.CopyFromRecordset Method

Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim Data As Object
Dim MaxRows As Object
Dim MaxColumns As Object
Dim returnValue As Integer
Dim range1 As Range
returnValue = range1.CopyFromRecordset(Data, MaxRows, MaxColumns)
int CopyFromRecordset(
	[In] object Data, 
	[In, Optional] object MaxRows, 
	[In, Optional] object MaxColumns
);
public int CopyFromRecordset(
	/*in*/System.Object Data, 
	/*in*/System.Object MaxRows, 
	/*in*/System.Object MaxColumns
);
function CopyFromRecordset(
	 Data : Object, 
	 MaxRows : Object, 
	 MaxColumns : Object
) : int;

Parameters

Data

Required Object. The Recordset object to copy into the range.

MaxRows

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

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.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
© 2013 Microsoft. Alle Rechte vorbehalten.