91:
How can I find out if the user clicks the grid's header
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMovePivot1(short   Button,short   Shift,long   X,long   Y)
{
	OutputDebugStringW( L"Type of ColumnFromPoint: " );
	/*
		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();
	OutputDebugStringW( _bstr_t(spPivot1->GetColumnFromPoint(-1,-1)) );
	OutputDebugStringW( L" should not be VT_NULL" );
	OutputDebugStringW( L"Type of ValueFromPoint: " );
	OutputDebugStringW( _bstr_t(spPivot1->GetValueFromPoint(-1,-1)) );
	OutputDebugStringW( L" should be VT_NULL" );
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");

90:
What should I set FormatPivotHeader to, to show it on the columns header only

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");
spPivot1->PutFormatPivotHeader(_bstr_t("(iaggregate ? ( caption + ` <off -6><font ;6>(` + lower(caggregate) + ')</off></font>') : caption) + ( ( display=1 ? `<c>Date: ") +
"<b><upline><dotline>` + date(`now`) : `` ) + `</dotline> </b>` )");
spPivot1->EndUpdate();

89:
What should I set FormatPivotHeader to, to show "Report Generated on 7/9/2016 14:20" etc when the report is executed (ie the date and time will change)

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");
spPivot1->PutFormatPivotHeader(_bstr_t("(iaggregate ? (`<b>` + caption + `</b> <off -6><font ;6>(` + lower(caggregate) + ')</off></font>') : caption) + `<r>ReportDate:") +
" ` + date(`now`)");
spPivot1->EndUpdate();

88:
Is it possible to display aggregate result on parent rows as well

/*
	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->BeginUpdate();
spPivot1->PutHeaderHeight(22);
spPivot1->PutDefaultItemHeight(20);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"12[bold],0");
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"nempty","not empty","");
	var_FormatConditionalAppearance->PutExpression(L"len(value) != 0");
	var_FormatConditionalAppearance->PutBackColor(RGB(240,240,240));
spPivot1->PutPivotColumns(L"sum(5)[nempty]/6");
spPivot1->PutIncludeExpandColumn(EXPIVOTLib::exIncludeExpandColumn);
spPivot1->PutDrawGridLines(EXPIVOTLib::exNoLines);
spPivot1->PutShowBranchRows(EXPIVOTLib::ShowBranchRowsEnum(EXPIVOTLib::exBranchIncludeAggregate | EXPIVOTLib::exBranchTree));
spPivot1->EndUpdate();

87:
How do I show expanded/collapsed rows

/*
	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->BeginUpdate();
spPivot1->PutHeaderHeight(22);
spPivot1->PutDefaultItemHeight(20);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"12[bold],0");
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"nempty","not empty","");
	var_FormatConditionalAppearance->PutExpression(L"len(value) != 0");
	var_FormatConditionalAppearance->PutBackColor(RGB(240,240,240));
spPivot1->PutPivotColumns(L"sum(5)[nempty]/6");
spPivot1->PutIncludeExpandColumn(EXPIVOTLib::exIncludeExpandColumn);
spPivot1->PutDrawGridLines(EXPIVOTLib::exNoLines);
spPivot1->EndUpdate();

86:
How do I show expanded/collapsed columns

/*
	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->BeginUpdate();
spPivot1->PutHeaderHeight(22);
spPivot1->PutDefaultItemHeight(20);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"nempty","not empty","");
	var_FormatConditionalAppearance->PutExpression(L"len(value) != 0");
	var_FormatConditionalAppearance->PutBackColor(RGB(240,240,240));
spPivot1->PutPivotColumns(L"sum(5)[nempty]/12");
spPivot1->PutFormatPivotHeader(L"(iaggregate ? ( caption + ` <r>[` + lower(caggregate) + `]` ) : caption)");
spPivot1->PutIncludeExpandColumn(EXPIVOTLib::exIncludeExpandColumn);
spPivot1->EndUpdate();

85:
Where you have say "Sum of ...." as the first row heading of the pivot are there and options to be able to change this text as a whole

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"nempty","not empty","");
	var_FormatConditionalAppearance->PutExpression(L"len(value) != 0");
	var_FormatConditionalAppearance->PutBackColor(RGB(240,240,240));
spPivot1->PutPivotColumns(L"sum(5)[nempty]/12");
spPivot1->PutFormatPivotHeader(L"(iaggregate ? (`<b>` + caption + `</b> <off -6><font ;6>(` + lower(caggregate) + ' )') : caption)");
spPivot1->EndUpdate();

84:
How can I get the data column from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMovePivot1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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();
	OutputDebugStringW( L"DataColumn" );
	OutputDebugStringW( _bstr_t(spPivot1->GetDataColumnFromPoint(-1,-1)) );
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->Refresh();

83:
Is there any way for the user to change the alignment at runtime (using excontextmenu)

// RClick event - Occurs once the user right clicks the control.
void OnRClickPivot1()
{
	/*
		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();
	EXPIVOTLib::AlignmentEnum h = spPivot1->GetDataColumns()->GetItem(long(5))->GetAlignment();
	/*
		Includes the definition for CreateObject function like follows:
		#include <comdef.h>
		IUnknownPtr CreateObject( BSTR Object )
		{
			IUnknownPtr spResult;
			spResult.CreateInstance( Object );
			return spResult;
		};
	*/
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCONTEXTMENULib' for the library: 'ExContextMenu 1.0 Type Library'
		#import <ExContextMenu.dll>
		using namespace EXCONTEXTMENULib;
	*/
	EXCONTEXTMENULib::IExContextMenuPtr c = ::CreateObject(L"Exontrol.ContextMenu");
		c->PutFlatImageWidth(0);
		c->PutToString(_bstr_t("Alignment[align=1][dis],[group=0x71](Left[typ=2][grp=100][close=0][id=0],Center[typ=2][grp=100][close=0][id=1],Right[typ=2][grp") +
	"=100][close=0][id=2])");
		c->Getitem(h)->PutChecked(VARIANT_TRUE);
		h = c->Select(vtMissing,vtMissing,vtMissing);
	EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(5));
		var_Column->PutAlignment(h);
		var_Column->PutHeaderAlignment(h);
	spPivot1->Refresh();
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarVisible));
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(5));
	var_Column->PutAlignment(EXPIVOTLib::RightAlignment);
	var_Column->PutHeaderAlignment(EXPIVOTLib::RightAlignment);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->Refresh();

82:
Is there any way for the user to change the alignment at runtime

// RClick event - Occurs once the user right clicks the control.
void OnRClickPivot1()
{
	/*
		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();
	OutputDebugStringW( L"The column gets aligned to the center" );
	EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(5));
		var_Column->PutAlignment(EXPIVOTLib::CenterAlignment);
		var_Column->PutHeaderAlignment(EXPIVOTLib::CenterAlignment);
	spPivot1->Refresh();
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(5));
	var_Column->PutAlignment(EXPIVOTLib::RightAlignment);
	var_Column->PutHeaderAlignment(EXPIVOTLib::RightAlignment);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->Refresh();

81:
How can I align a column to the right

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(5));
	var_Column->PutAlignment(EXPIVOTLib::RightAlignment);
	var_Column->PutHeaderAlignment(EXPIVOTLib::RightAlignment);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->Refresh();

80:
How can I display the control's content on an single A3 paper size, when using PDF format
/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatConditionalAppearances()->GetItem("positive")->PutBackColor(0x100ff00);
spPivot1->GetFormatConditionalAppearances()->GetItem("negative")->PutBackColor(0x10000ff);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[positive,negative]/12");
spPivot1->ExpandAll();
_variant_t var_CopyTo = spPivot1->GetCopyTo(L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in||single");
OutputDebugStringW( L"Look for C:\\Temp\\Preview.pd file." );
spPivot1->EndUpdate();

79:
How can I display the control's content on an A3 paper size, when using PDF format
/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatConditionalAppearances()->GetItem("positive")->PutBackColor(0x100ff00);
spPivot1->GetFormatConditionalAppearances()->GetItem("negative")->PutBackColor(0x10000ff);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[positive,negative]/12");
spPivot1->ExpandAll();
_variant_t var_CopyTo = spPivot1->GetCopyTo(L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in");
OutputDebugStringW( L"Look for C:\\Temp\\Preview.pd file." );
spPivot1->EndUpdate();

78:
How can I export the control's content to a PDF document (method 1)
/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatConditionalAppearances()->GetItem("positive")->PutBackColor(0x100ff00);
spPivot1->GetFormatConditionalAppearances()->GetItem("negative")->PutBackColor(0x10000ff);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[positive,negative]/12");
spPivot1->ExpandAll();
spPivot1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPrintExt(((EXPIVOTLib::IPivotPtr)(spPivot1)));
	var_Print->CopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spPivot1->EndUpdate();

77:
How can I export the control's content to a PDF document (method 2)
/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatConditionalAppearances()->GetItem("positive")->PutBackColor(0x100ff00);
spPivot1->GetFormatConditionalAppearances()->GetItem("negative")->PutBackColor(0x10000ff);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[positive,negative]/12");
spPivot1->ExpandAll();
_variant_t var_CopyTo = spPivot1->GetCopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spPivot1->EndUpdate();

76:
Does / could the control have a read-only mode by where I could load the data and layout and just use the control to display it and allow the user to scroll around it / print it but not change it
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->PutDisplayFilterList(EXPIVOTLib::exNoItems);
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarReadOnly | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarVisible));
spPivot1->Refresh();

75:
Is it possible to edit the conditional-expression at runtime

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"custom","custom","");
	var_FormatConditionalAppearance->PutBold(VARIANT_TRUE);
	var_FormatConditionalAppearance->PutFontSize(12);
	var_FormatConditionalAppearance->PutExpression(L"value > 2000");
	var_FormatConditionalAppearance->PutContextEditExpression(VARIANT_TRUE);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[custom]/12");
spPivot1->EndUpdate();

74:
How can I highlight values using EBN colors

/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatConditionalAppearances()->GetItem("positive")->PutBackColor(0x100ff00);
spPivot1->GetFormatConditionalAppearances()->GetItem("negative")->PutBackColor(0x10000ff);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[positive,negative]/12");
spPivot1->EndUpdate();

73:
How do I mark not-empty values in the chart

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"nempty","not empty","");
	var_FormatConditionalAppearance->PutExpression(L"len(value) != 0");
	var_FormatConditionalAppearance->PutBackColor(RGB(240,240,240));
spPivot1->PutPivotColumns(L"sum(5)[nempty]/12");
spPivot1->EndUpdate();

72:
How can I highlight negative and positive values in the same chart

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[negative,positive]/12");
spPivot1->EndUpdate();

71:
How can I highlight values that starts with a letter

/*
	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->BeginUpdate();
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"f","starts with f","lower(value) startwith `f`");
	var_FormatConditionalAppearance->PutExpression(L"lower(value) startwith `f`");
	var_FormatConditionalAppearance->PutShadow(RGB(1,0,0));
	var_FormatConditionalAppearance->PutShadowOffset(0);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[f]");
spPivot1->EndUpdate();

70:
How can I mark values greater than a value, 100 for instance

/*
	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->BeginUpdate();
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->Add(L"greater100",">100","value > 100");
	var_FormatConditionalAppearance->PutExpression(L"( dbl(value) != 0 ) ? (value > 100) : 0");
	var_FormatConditionalAppearance->PutForeColor(RGB(255,0,0));
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[greater100,content=numeric]");
spPivot1->EndUpdate();

69:
How can I remove the Conditional context-menu

/*
	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->BeginUpdate();
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowFormatContent | EXPIVOTLib::exPivotBarAllowFormatAppearance | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarSizable | EXPIVOTLib::exPivotBarVisible));
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric]");
spPivot1->EndUpdate();

68:
How do change the way the negative/positive numbers show when using conditional-format

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->GetItem("negative");
	var_FormatConditionalAppearance->PutBackColor(RGB(0,0,0));
	var_FormatConditionalAppearance->PutForeColor(RGB(128,128,128));
	var_FormatConditionalAppearance->PutFontSize(8);
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance1 = spPivot1->GetFormatConditionalAppearances()->GetItem("positive");
	var_FormatConditionalAppearance1->PutBackColor(RGB(0,0,0));
	var_FormatConditionalAppearance1->PutForeColor(RGB(1,0,0));
	var_FormatConditionalAppearance1->PutFontSize(11);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[negative,positive,content=numeric]");
spPivot1->EndUpdate();

67:
How do I highlight the negative values with white color or black

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IFormatConditionalAppearancePtr var_FormatConditionalAppearance = spPivot1->GetFormatConditionalAppearances()->GetItem("negative");
	var_FormatConditionalAppearance->PutBackColor(RGB(1,0,0));
	var_FormatConditionalAppearance->PutForeColor(RGB(255,255,255));
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[negative,content=numeric]");
spPivot1->EndUpdate();

66:
Does your control support conditional-format, so I can highlight certain values

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[negative,content=numeric]");
spPivot1->EndUpdate();

65:
How do I add a computed column/field, like VAT for instance (method 2)

/*
	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->BeginUpdate();
EXPIVOTLib::IAggregatesPtr var_Aggregates = spPivot1->GetAggregates();
	var_Aggregates->Add(L"vat19","sum","VAT 19%","VAT 19%")->PutFormatValue(L"value * 0.19");
	var_Aggregates->Add(L"vat24","sum","VAT 24%","VAT 24%")->PutFormatValue(L"value * 0.24");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric],vat19(5)[bold,content=numeric],vat24(5)[bold,content=numeric]");
spPivot1->EndUpdate();

64:
How do I add a computed column/field, like VAT for instance (method 1)

/*
	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->BeginUpdate();
EXPIVOTLib::IFormatContentPtr var_FormatContent = spPivot1->GetFormatContents()->Add(L"vat19",L"VAT 19%",vtMissing);
	var_FormatContent->PutExpression(L"len(value) ? ((value * 1.19) format '') : ''");
EXPIVOTLib::IFormatContentPtr var_FormatContent1 = spPivot1->GetFormatContents()->Add(L"vat24",L"VAT 24%",vtMissing);
	var_FormatContent1->PutExpression(L"len(value) ? ((value * 1.24) format '') : ''");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[content=numeric],sum(5)[bold,content=vat19],sum(5)[bold,content=vat24]");
spPivot1->EndUpdate();

63:
How can I hide some values for instance negative values

/*
	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->BeginUpdate();
EXPIVOTLib::IFormatContentPtr var_FormatContent = spPivot1->GetFormatContents()->Add(L"hiden",L"hide negative",vtMissing);
	var_FormatContent->PutExpression(L"value < 0 ? `` : value");
EXPIVOTLib::IFormatContentPtr var_FormatContent1 = spPivot1->GetFormatContents()->Add(L"hidep",L"hide positive",vtMissing);
	var_FormatContent1->PutExpression(L"value > 0 ? `` : value");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[bold],sum(5)[content=hiden],sum(5)[content=hidep]");
spPivot1->EndUpdate();

62:
How can I decode the Layout property

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");
spPivot1->PutLayout(L"Columns =1;C0.Width = 64");
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	OutputDebugStringW( var_Print->GetDecode64TextW(spPivot1->GetLayout()) );
spPivot1->EndUpdate();

61:
How can I specify the sorting type, so the column gets sorted as numeric for instance

/*
	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("1,1#11,11#101,101","eor='#' eof=',' hdr=0");
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(0));
	var_Column->PutCaption(L"Numeric");
	var_Column->PutSortType(EXPIVOTLib::SortNumeric);
spPivot1->GetDataColumns()->GetItem(long(1))->PutCaption(L"String (default)");
spPivot1->PutPivotRows(L"0");
spPivot1->Refresh();

60:
How can I disable the control's context menu
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarSizable | EXPIVOTLib::exPivotBarVisible));

59:
How do I get the captions of the columns
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
OutputDebugStringW( _bstr_t(spPivot1->GetDataColumns()->GetCount()) );
OutputDebugStringW( spPivot1->GetDataColumns()->GetItem(long(0))->GetPivotCaption() );
OutputDebugStringW( spPivot1->GetDataColumns()->GetItem(long(0))->GetCaption() );
OutputDebugStringW( spPivot1->GetDataColumns()->GetItem(long(1))->GetPivotCaption() );
OutputDebugStringW( spPivot1->GetDataColumns()->GetItem(long(1))->GetCaption() );

58:
How can I specify the default-format for a specified column, so it always shows as numeric for instance
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem("Freight");
	var_Column->PutDefaultFormatContent(L"numeric");
	var_Column->PutDefaultFormatAppearances(L"bold");
	var_Column->PutSortOrder(EXPIVOTLib::SortAscending);
	var_Column->PutSortType(EXPIVOTLib::SortNumeric);
spPivot1->PutPivotTotalDefaultFormatContent(L"currency");
spPivot1->PutPivotTotalDefaultFormatAppearances(L"strikeout,bold");
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)[bold,content=numeric]");
spPivot1->PutPivotTotals(L"sum[strikeout,bold,content=currency]");
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);
spPivot1->Refresh();

57:
How can I display the percentage column

/*
	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->GetFormatContents()->Add(L"percent",L"value + `%`",vtMissing);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"5[content=percent]");
spPivot1->Refresh();

56:
How do I change the name for months in the drop-down filter window (localization)

/*
	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();
OutputDebugStringW( spPivot1->GetDescription(EXPIVOTLib::exFilterBarDateMonths) );
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDateMonths,L"Ianuarie Februarie Martie Aprilie Mai Iunie Iulie August Septembrie Octombrie Noiembrie Decembrie");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarAll,L"(Toate)");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarBlanks,L"(Gol)");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarNonBlanks,L"(Plin)");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarFilterForCaption,L"Filtreaza:");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDateTodayCaption,L"Azi");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDateWeekDays,L"D L Ma Mi J V S");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarExclude,L"Exclud");
spPivot1->PutDescription(EXPIVOTLib::exColumnsFloatBar,L"Coloane");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarAnd,L"si");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDate,L"Data:");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDateTitle,L"Data");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarDateTo,L"la");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarNot,L"nu");
spPivot1->PutDescription(EXPIVOTLib::exFilterBarOr,L"sau");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetDataColumns()->GetItem("OrderDate")->PutSortType(EXPIVOTLib::SortDate);
spPivot1->PutPivotRows(L"9");
spPivot1->Refresh();

55:
How can I scale and print programmatically the pivot table, to fit on one axis eg FitPageHeight but infinite width etc
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"6");
spPivot1->PutPivotColumns(L"sum(5)/3");
spPivot1->Refresh();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("FitToPage = x 5");
	var_Print->PutPrintExts(((EXPIVOTLib::IPivotPtr)(spPivot1)));
	var_Print->Preview();

54:
How can I scale and print programmatically the pivot table, to fit on one axis eg FitPageWidth but infinite height etc
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"6");
spPivot1->PutPivotColumns(L"sum(5)/3");
spPivot1->Refresh();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("FitToPage = 5 x");
	var_Print->PutPrintExts(((EXPIVOTLib::IPivotPtr)(spPivot1)));
	var_Print->Preview();

53:
How can I get the column from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMovePivot1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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();
	OutputDebugStringW( _bstr_t(spPivot1->GetColumnFromPoint(-1,-1)) );
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->Refresh();

52:
How can I get the value from the cursor
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMovePivot1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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();
	OutputDebugStringW( _bstr_t(spPivot1->GetValueFromPoint(-1,-1)) );
}

EXPIVOTLib::IPivotPtr spPivot1 = GetDlgItem(IDC_PIVOT1)->GetControlUnknown();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->Refresh();

51:
How can I specify a column to display HTML format

/*
	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("Bold <b>1,Bold <b>2#Bold <b>3,Bold <b>4#Bold <b>5,Bold <b>6","eor='#' eof=',' hdr=0");
spPivot1->GetDataColumns()->GetItem(long(0))->PutHTML(VARIANT_TRUE);
spPivot1->GetDataColumns()->GetItem(long(1))->PutHTML(VARIANT_TRUE);
spPivot1->PutPivotRows(L"0");
spPivot1->Refresh();

50:
Does your control supports scrolling by touching the screen

/*
	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();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.0 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Data","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExPivot\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spPivot1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spPivot1->PutAutoDrag(EXPIVOTLib::AutoDragEnum(EXPIVOTLib::exAutoDragScrollOnShortTouch | EXPIVOTLib::exAutoDragScroll));

49:
How can I specify programatically the width of the pivot column ( first column )

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");
spPivot1->PutLayout(L"Columns =1;C0.Width = 64");
spPivot1->EndUpdate();

48:
How can I show the total of each row, when columns are shown as expanded

/*
	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->BeginUpdate();
spPivot1->PutIncludeExpandColumn(EXPIVOTLib::exIncludeExpandColumn);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");
spPivot1->EndUpdate();

47:
How can I prevent grouping by a specified column
/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetDataColumns()->GetItem("Freight")->PutAllowGroupBy(EXPIVOTLib::exGroupByNone);

46:
How can I sort alphabetically the columns to be displayed in the context menu/floating panel

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarContextSortAscending | EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowFormatContent | EXPIVOTLib::exPivotBarAllowFormatAppearance | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarSizable | EXPIVOTLib::exPivotBarVisible));
spPivot1->PutPivotColumnsSortOrder(EXPIVOTLib::exPivotColumnsAscending);
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);

45:
How can I prevent dropping data to the control
/*
	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->PutAllowDrop(VARIANT_FALSE);

44:
Is it possible to allow incremental filtering on drop down filter window too, as I can on the control menus

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutDisplayFilterList(EXPIVOTLib::FilterListEnum(EXPIVOTLib::exHideFilterPattern | EXPIVOTLib::exFilterListDefault));

43:
How can I prevent showing the Filter For field in the drop down filter window

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutDisplayFilterList(EXPIVOTLib::FilterListEnum(EXPIVOTLib::exHideFilterPattern | EXPIVOTLib::exFilterListDefault));

42:
How can I display the numeric columns only when selecting a new aggregate, like SUM

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[bold]");
spPivot1->PutPivotColumns(L"sum(5)/12,count(5)/12");
spPivot1->GetDataColumns()->GetItem("Freight")->PutSortType(EXPIVOTLib::SortNumeric);

41:
How can I add a value column

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12");

40:
I would like to always have the subtotals in the same row of the "father row". Could that be done

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[bold],2");
spPivot1->PutPivotColumns(L"sum(5)/12,count(5)/12");
spPivot1->PutShowViewCompact(EXPIVOTLib::ShowViewCompactEnum(EXPIVOTLib::exViewCompactAggregates | EXPIVOTLib::exViewCompact));
spPivot1->PutPivotTotals(L"/sum,sum(0)");

39:
Is there any way, when I change the filter of the column, it broadcast the filter to the other pivot columns that were duplicated

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,2");
spPivot1->PutShowBranchRows(EXPIVOTLib::exBranchCompact);
spPivot1->PutPivotColumns(_bstr_t("sum(5)/12[filter='gBpNxjNh1MhlBoKNhpOZ0hJVNxpOhlMggKBhMZrMJnMoAgI='],count(5)/12[filter='gBpNxjNh1MhlBoKNhpOZ0hJVNxpOhlMggKBhMZ") +
"rMJnMoAgI=']");
spPivot1->PutShowViewCompact(EXPIVOTLib::ShowViewCompactEnum(EXPIVOTLib::exViewCompactKeepSettings | EXPIVOTLib::exViewCompact));

38:
How can I summarize more fields in the same cell

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,2");
spPivot1->PutShowBranchRows(EXPIVOTLib::exBranchCompact);
spPivot1->PutPivotColumns(L"sum(5)/12,count(5)/12");
spPivot1->PutShowViewCompact(EXPIVOTLib::exViewCompact);

37:
How do I programmatically group by rows, in a compact way, no hierarchy lines

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,2");
spPivot1->PutShowBranchRows(EXPIVOTLib::exBranchCompact);

36:
How do I programmatically group by rows

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,1,2");
spPivot1->PutLinesAtRoot(EXPIVOTLib::exLinesAtRoot);
spPivot1->PutHasLines(EXPIVOTLib::exSolidLine);

35:
How do I programmatically group by columns

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)/12;6");

34:
How can I hide the add new button on the pivot bar

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarHideAddNew | EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowFormatContent | EXPIVOTLib::exPivotBarAllowFormatAppearance | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarSizable | EXPIVOTLib::exPivotBarVisible));

33:
Is it possible to show the data that generated the result, when double clicking the row

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[italic]");
spPivot1->PutPivotColumns(L"count(0)[underline]");
spPivot1->PutPivotTotals(L"count[bold,strikeout]");
spPivot1->PutShowDataOnDblClick(VARIANT_TRUE);
spPivot1->EndUpdate();

32:
Does your control support subscript or superscript, in HTML captions

/*
	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->PutHeaderHeight(22);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetDataColumns()->GetItem("ShipCountry")->PutCaption(L"ShipCountry<font ;7><off 6><sha ;;0>subscript");
spPivot1->GetDataColumns()->GetItem("ShipRegion")->PutCaption(L"ShipRegion<font ;7><off -6><sha ;;0>superscript");
spPivot1->Refresh();

31:
Is it possible to define a different background color for the pivot bar

/*
	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->PutBackground(EXPIVOTLib::exPivotBarBackColor,RGB(240,240,240));

30:
How can I display an icon/image to Content sub-menu

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spPivot1->GetFormatContents()->GetItem("numeric")->PutName(L"<img>1</img> Numeric");
spPivot1->PutPivotRows(L"5[content=numeric]");

29:
How can I change the selection background in the control's context menu

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutBackground(EXPIVOTLib::exSelBackColorFilter,RGB(255,0,0));

28:
How can I display the column as date in a long format

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatContents()->Add(L"longdate",L"longdate(date(value))",vtMissing);
spPivot1->PutPivotRows(L"9[content=longdate]");

27:
Is it possible to display the column in upper-case

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatContents()->Add(L"upper",L"upper(value)",vtMissing);
spPivot1->PutPivotRows(L"0[content=upper]");

26:
How can I programatically bold a column

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[bold]");

25:
How can I display the total with a different foreground color

/*
	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->GetFormatAppearances()->Add(L"fore",vtMissing)->PutForeColor(RGB(255,0,0));
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum[fore,bold]");

24:
How can I display the total with a different background color/ebn

/*
	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->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->GetFormatAppearances()->Add(L"back",vtMissing)->PutBackColor(0x1000000);
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum[back]");

23:
How can I display the total with a solid background color

/*
	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->GetFormatAppearances()->Add(L"back",vtMissing)->PutBackColor(RGB(240,240,240));
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum[back]");

22:
Is it possible to change the "bold" caption in the control's context menu

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatAppearances()->GetItem("bold")->PutName(L"Ingrosat");

21:
Is it possible to show no Exclude field in the filter window

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutDisplayFilterList(EXPIVOTLib::FilterListEnum(EXPIVOTLib::exShowCheckBox | EXPIVOTLib::exSortItemsAsc));

20:
How can I prevent showing the drop down filter button

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutDisplayFilterList(EXPIVOTLib::exNoItems);

19:
How do I get the count of positive values only

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetAggregates()->Add(L"positive","sum",vtMissing,vtMissing)->PutFormatValue(L"value < 0 ? 0 : 1");
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"positive(5)");

18:
How do I get the sum for negative values only

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetAggregates()->Add(L"negative","sum",vtMissing,vtMissing)->PutFormatValue(L"value < 0 ? value : 0");
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"negative(5)");

17:
My data stores the data as strings, is it possible to load the data using Import method

/*
	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("'string 1';'string 2'#'string 3';'string 4'","str=`'` eor='#' eof=';' hdr=0");

16:
Is it possible to load data using different separators

/*
	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");

15:
Is it possible to align a column

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(0));
	var_Column->PutAlignment(EXPIVOTLib::RightAlignment);
	var_Column->PutHeaderAlignment(EXPIVOTLib::RightAlignment);
spPivot1->Refresh();

14:
How can I change by code the column/rows background color

/*
	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->BeginUpdate();
spPivot1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->GetFormatAppearances()->Add(L"aka",vtMissing)->PutBackColor(0x1000000);
spPivot1->PutPivotRows(L"0[aka]");
spPivot1->EndUpdate();

13:
How can I apply by code any appearance to my list

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0[italic]");
spPivot1->PutPivotColumns(L"count(0)[underline]");
spPivot1->PutPivotTotals(L"count[bold,strikeout]");
spPivot1->EndUpdate();

12:
How can I display an icon instead SUM/Total field

/*
	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->BeginUpdate();
spPivot1->Images(_bstr_t("gBJJgBggAAwAAgACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjIgjIBAEijUlk8plUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9oEEwGBwWDwmFw2Hw9+xUsxGNx2Px+LyUnyGVy2VyeZAGNjIJjITjIb0OjjGi0ukAAV" +
"jILzmayWtAGejCvjLh2u3jG23O4ACx1ew11+zEYGsZZsZUe/wkZ4sYZvD4PCy8kjAzjLFjKd5WDjIz6HRvnTwUZGMZX8ZTPb8XU8Hh9cFjALjKVjK5jIv9/w9t78WdjJ" +
"IoyWr7sKjIWu+/a8Og2QAEajLaIxAzlwhB0DwQuzoECjJWw1DiMQ3D0OgAQMKwsuj8xOy0SrzFEWMdFUExbGMCRfC8ZRswMaLsiofJVHiOo+kKRs2lL2Jsh8cyQo6Ag=" +
"=");
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IAggregatePtr var_Aggregate = spPivot1->GetAggregates()->GetItem("sum");
	var_Aggregate->PutName(L"<img>1</img> Sum");
	var_Aggregate->PutCaption(L"<img>1</img>");
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);
spPivot1->PutFormatPivotHeader(L"iaggregate ? (caggregate + (iaggregate != 5 ? ' ' : '') + caption) : caption");
spPivot1->PutFormatPivotTotal(L"caggregate");
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum,count");
spPivot1->EndUpdate();

11:
How can I change the caption to be displayed when dragging an aggregate function

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);
spPivot1->PutFormatPivotHeader(L"(iaggregate ? ('<b>' + upper(caggregate) + '</b> of ' + caption) : caption)");
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum,count");
spPivot1->EndUpdate();

10:
I am using Import method, just wondering if I can rename the columns

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
EXPIVOTLib::IColumnPtr var_Column = spPivot1->GetDataColumns()->GetItem(long(0));
	var_Column->PutCaption(L"New Caption");
	var_Column->PutPivotCaption(L"New Pivot Caption");
spPivot1->Refresh();

9:
Does your control support Fit-To-Page Print and Print Preview

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,1,2");
spPivot1->ExpandAll();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("FitToPage = On");
	var_Print->PutPrintExts(((EXPIVOTLib::IPivotPtr)(spPivot1)));
	var_Print->Preview();

8:
How can I print the control

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0,1,2");
spPivot1->ExpandAll();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPrintExts(((EXPIVOTLib::IPivotPtr)(spPivot1)));
	var_Print->Preview();

7:
How can I hide the pivot bar (hide completly)

/*
	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->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowFormatContent | EXPIVOTLib::exPivotBarAllowFormatAppearance | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarAutoFit | EXPIVOTLib::exPivotBarSizable));

6:
How can I hide the pivot bar (auto-hide)

/*
	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->PutPivotBarVisible(EXPIVOTLib::PivotBarVisibleEnum(EXPIVOTLib::exPivotBarAllowResizeColumns | EXPIVOTLib::exPivotBarAllowUndoRedo | EXPIVOTLib::exPivotBarAutoUpdate | EXPIVOTLib::exPivotBarAllowFormatContent | EXPIVOTLib::exPivotBarAllowFormatAppearance | EXPIVOTLib::exPivotBarAllowValues | EXPIVOTLib::exPivotBarAutoHide | EXPIVOTLib::exPivotBarShowTotals | EXPIVOTLib::exPivotBarSizable | EXPIVOTLib::exPivotBarVisible));

5:
How can I count and get the total of a specified column

/*
	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->BeginUpdate();
spPivot1->Import("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumns(L"sum(5)");
spPivot1->PutPivotTotals(L"sum,count");
spPivot1->EndUpdate();

4:
How can I add show the columns once I grouped a column

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0");
spPivot1->PutPivotColumnsFloatBarVisible(VARIANT_TRUE);

3:
How can I programatically group the columns

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);
spPivot1->PutPivotRows(L"0:D");

2:
Is it possible to load data from a data source

/*
	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();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.0 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Data","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExPivot\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spPivot1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));

1:
How can I load data

/*
	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("C:\\Program Files\\Exontrol\\ExPivot\\Sample\\data.txt",vtMissing);