Type | Description | |||
Source as Variant |
The Source parameter may be one of the following:
| |||
Options as Variant | A String expression that specifies different options to be used when loading data using the Import method as explained bellow. |
Return | Description | |||
Variant | Reserved for future use only. |
Here's a few samples of using Import method with arrays, using the /COM version:
Here's a few samples of using Import method with arrays, using the /NET version:
The DataColumns property accesses the control's Columns collection, so you can rename or specify the column's type once the control's data is loaded. The PivotColumnsFloatBarVisible property specifies whether the Columns collection is displayed to a floating bar, so user can drag and drop columns to the control's pivot bar so it gets data summarized. The ClearData method clears the control's data. Use the DisplayPivotData property to specify the number of rows to be displayed on the control's list. The LoadHeadersOnly property loads the headers only, so no data is loaded.
The control can load data using one of the following methods:
The AppendData method appends data to the control (prevents clearing data already loaded).
The following properties may be used to group and summarize the data, once it is loaded:
If the Source parameter points to a string, the Options parameter indicates a list of options separated by space character ( or \r, \n or \r\n newline delimiters ) as listed option=value, where the option and the value could be:
For instance, if the Options parameter is "hdr=0 eof=';'", it indicates that the data in the Source contains no header information, and the fields inside the data are separated by a ; character. If the Options parameter is "eof=';' str=`'`" it indicates that the separator of the fields in the data is ; character while the ' character delimits the strings inside the data.
If the Source parameter points to a safe array ( two-dimensional ), the Options parameter may include the following word:
The following samples show how to load data from specified text (item 1;item 2#item 3;item 4), using different options (eor='#' eof=';' hdr=0). The data looks as follows once the Import method is called
VB6, VBA (MS Access, Excell...)
With Pivot1
.Import "item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0"
End With
VB.NET
With Expivot1
.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
End With
VB.NET for /COM
With AxPivot1
.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
End With
C++
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXPIVOTLib' for the library: 'ExPivot 1.0 Control Library'
#import <ExPivot.dll>
using namespace EXPIVOTLib;
*/
EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0");
C++ Builder
Pivot1->Import(TVariant("item 1;item 2#item 3;item 4"),TVariant("eor='#' eof=';' hdr=0"));
C#
expivot1.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0");
JavaScript
<OBJECT classid="clsid:5C9DF3D3-81B1-42C4-BED6-658F17748686" id="Pivot1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
Pivot1.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0");
</SCRIPT>
C# for /COM
axPivot1.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0");
X++ (Dynamics Ax 2009)
public void init()
{
;
super();
expivot1.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0");
}
Delphi 8 (.NET only)
with AxPivot1 do
begin
Import('item 1;item 2#item 3;item 4','eor=''#'' eof='';'' hdr=0');
end
Delphi (standard)
with Pivot1 do
begin
Import('item 1;item 2#item 3;item 4','eor=''#'' eof='';'' hdr=0');
end
VFP
with thisform.Pivot1
.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
endwith
dBASE Plus
local oPivot
oPivot = form.Activex1.nativeObject
oPivot.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
XBasic (Alpha Five)
Dim oPivot as P
oPivot = topparent:CONTROL_ACTIVEX1.activex
oPivot.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
Visual Objects
oDCOCX_Exontrol1:Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")
PowerBuilder
OleObject oPivot
oPivot = ole_1.Object
oPivot.Import("item 1;item 2#item 3;item 4","eor='#' eof=';' hdr=0")