Class PivotCacheImpl
Represents a single pivot cache.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.PivotTables
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class PivotCacheImpl : CommonObject, IParentApplication, IDisposable, ICloneParent, IBiffStorage, IPivotCache
Constructors
PivotCacheImpl(IApplication, Object)
Initianlizes a new instance of pivot cache class with the specified application and parent objects.
Declaration
public PivotCacheImpl(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Reference to Application instance. |
System.Object | parent | Reference to the Parent object which will host this object |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If specified application or parent is null. |
PivotCacheImpl(IApplication, Object, IRange)
Initializes new instance of the cache at the specified range in the worksheet.
Declaration
public PivotCacheImpl(IApplication application, object parent, IRange dataRange)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Reference to Application instance. |
System.Object | parent | Reference to the Parent object which will host this object. |
IRange | dataRange | Range object containing cached data. |
PivotCacheImpl(IApplication, Object, BiffReader, IDecryptor, String)
Initializes a new instance of pivot cache class with the specified reader to get pivot cache records from.
Declaration
[CLSCompliant(false)]
public PivotCacheImpl(IApplication application, object parent, BiffReader reader, IDecryptor decryptor, string streamName)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Reference to Application instance. |
System.Object | parent | Reference to the Parent object which will host this object. |
BiffReader | reader | Reader to get pivot cache records from. |
IDecryptor | decryptor | Object used to decrypt encrypted records. |
System.String | streamName |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If at least one of arguments is Null. |
Fields
preservedCacheRelations
Specifies the preserved cache relations of Consolidation source.
Declaration
public RelationCollection preservedCacheRelations
Field Value
Type |
---|
RelationCollection |
Properties
CacheFields
Gets collection of cache fields. Read-only.
Declaration
public PivotCacheFieldsCollection CacheFields { get; }
Property Value
Type |
---|
PivotCacheFieldsCollection |
CalculatedItemIndex
Gets the calculated item index. Read-only.
Declaration
public int CalculatedItemIndex { get; }
Property Value
Type |
---|
System.Int32 |
Consolidation
Gets or sets the stream which preserves the consolidation source of the pivot table.
Declaration
public Stream Consolidation { get; set; }
Property Value
Type |
---|
System.IO.Stream |
CreatedVersion
Gets or sets the the version of the application that created the cache. This attribute is application-dependent.
Declaration
public int CreatedVersion { get; set; }
Property Value
Type |
---|
System.Int32 |
EnableRefresh
Gets or sets a Boolean value indicating whether the user can refresh the cache.
Declaration
public bool EnableRefresh { get; set; }
Property Value
Type |
---|
System.Boolean |
HasNamedRange
True if the pivot cache has named range. False otherwise.
Declaration
public bool HasNamedRange { get; }
Property Value
Type |
---|
System.Boolean |
Index
Gets or sets the cache index.
Declaration
public int Index { get; set; }
Property Value
Type |
---|
System.Int32 |
IsBackgroundQuery
Gets or sets a Boolean value indicating whether the application should query and retrieve records asynchronously from the cache.
Declaration
public bool IsBackgroundQuery { get; set; }
Property Value
Type |
---|
System.Boolean |
IsInvalidData
Gets or sets a Boolean value indicating whether the cache needs to be refreshed.
Declaration
public bool IsInvalidData { get; set; }
Property Value
Type |
---|
System.Boolean |
IsOptimizedCache
Gets or sets a boolean value indicating whether the application will apply optimizations to the cache to reduce memory usage.
Declaration
public bool IsOptimizedCache { get; set; }
Property Value
Type |
---|
System.Boolean |
IsRefreshOnLoad
Gets or sets a Boolean value indicating whether the application will refresh the cache.
Declaration
public bool IsRefreshOnLoad { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSaveData
Gets or sets a Boolean value indicating whether the pivot records are saved with the cache.
Declaration
public bool IsSaveData { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSerializePivotCache
Get or set the indicate whether the pivot cache has serialize or not.
Declaration
public bool IsSerializePivotCache { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSupportSubQuery
True if the cache's data source supports subqueries. False otherwise.
Declaration
public bool IsSupportSubQuery { get; set; }
Property Value
Type |
---|
System.Boolean |
IsUpgradeOnRefresh
True if the cache is scheduled for version upgrade. False otherwise.
Declaration
public bool IsUpgradeOnRefresh { get; set; }
Property Value
Type |
---|
System.Boolean |
MinRefreshableVersion
Gets or sets the earliest version of the application that is required to refresh the cache.
Declaration
public int MinRefreshableVersion { get; set; }
Property Value
Type |
---|
System.Int32 |
NeedDataArray
True if the data array is required by this record. False otherwise.
Declaration
public bool NeedDataArray { get; }
Property Value
Type |
---|
System.Boolean |
RangeName
Gets or sets the name of the pivot cache NamedRange.
Declaration
public string RangeName { get; set; }
Property Value
Type |
---|
System.String |
RecordCode
Gets the code of the biff storage. Read-only.
Declaration
public int RecordCode { get; }
Property Value
Type |
---|
System.Int32 |
RecordCount
Gets the number of records inside this cache.
Declaration
public int RecordCount { get; }
Property Value
Type |
---|
System.Int32 |
RefreshDate
Gets or sets refresh date of the cache.
Declaration
public DateTime RefreshDate { get; set; }
Property Value
Type |
---|
System.DateTime |
RefreshedBy
Gets or sets the user name who last refreshed pivot cache.
Declaration
public string RefreshedBy { get; set; }
Property Value
Type |
---|
System.String |
RefreshedVersion
Gets or sets the version of the application that last refreshed the cache. This attribute depends on whether the application exposes mechanisms via the user interface whereby the end-user can refresh the cache.
Declaration
public int RefreshedVersion { get; set; }
Property Value
Type |
---|
System.Int32 |
SourceRange
Gets or sets the data source for the PivotTable report.
Declaration
public IRange SourceRange { get; set; }
Property Value
Type |
---|
IRange |
SourceType
Gets or sets the pivot table cache source type.
Declaration
public ExcelDataSourceType SourceType { get; set; }
Property Value
Type |
---|
ExcelDataSourceType |
StreamId
Gets the stream id of the pivot cache.
Declaration
[CLSCompliant(false)]
public ushort StreamId { get; set; }
Property Value
Type |
---|
System.UInt16 |
StreamPos
Gets the record position in stream. This is a utility member of class and is used only in the serialization process. Does not influence the data.
Declaration
public long StreamPos { get; set; }
Property Value
Type |
---|
System.Int64 |
SupportAdvancedDrill
True if the the cache's data source supports attribute drilldown. False otherwise.
Declaration
public bool SupportAdvancedDrill { get; set; }
Property Value
Type |
---|
System.Boolean |
TypeCode
Gets the type code of this record in the biff storage. Read-only.
Declaration
public TBIFFRecord TypeCode { get; }
Property Value
Type |
---|
TBIFFRecord |
Methods
AddIndexes(Byte[])
Adds the specified array of pivot cache indexes.
Declaration
public int AddIndexes(byte[] indexes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | indexes |
Returns
Type |
---|
System.Int32 |
Clone(Object)
Creates a new object that is a copy of the current instance.
Declaration
public object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for a copy of this instance. |
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Clone(Object, Dictionary<String, String>)
Creates a new object that is a copy of the current instance with the specified dictionary containing names in the workbook.
Declaration
public object Clone(object parent, Dictionary<string, string> hashNewNames)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for a copy of this instance. |
System.Collections.Generic.Dictionary<System.String, System.String> | hashNewNames | Dictionary containing names in the workbook. |
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
ComparePreservedData(PivotCacheImpl)
Compare preserved data with the specified cache data.
Declaration
public bool ComparePreservedData(PivotCacheImpl cache)
Parameters
Type | Name | Description |
---|---|---|
PivotCacheImpl | cache | Pivot cache object with which the preserved data is compared. |
Returns
Type | Description |
---|---|
System.Boolean | True if the preserved data is equal to the specified cache data. False otherwise. |
FillStream(BinaryWriter, DataProvider, IEncryptor, Int32)
Saves the pivot cache record data to stream.
Declaration
public int FillStream(BinaryWriter writer, DataProvider provider, IEncryptor encryptor, int streamPosition)
Parameters
Type | Name | Description |
---|---|---|
System.IO.BinaryWriter | writer | Writer that will receive record data. |
DataProvider | provider | Object that provides access to the data. |
IEncryptor | encryptor | Object to encrypt data. |
System.Int32 | streamPosition | Position in the output stream. Used to increase performance. |
Returns
Type | Description |
---|---|
System.Int32 | Size of the record. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If writer is NULL. |
System.ApplicationException | If m_iLength of internal record data array is less than zero. |
GetStoreSize(ExcelVersion)
Returns the size of the required storage space. Read-only.
Declaration
public int GetStoreSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | ExcelVersion of this workbook. |
Returns
Type | Description |
---|---|
System.Int32 | Number of bytes indicating the required storage space. |
GetValue(Int32, Int32)
Returns the field value based on the specified field and row indexes.
Declaration
public object GetValue(int fieldIndex, int row)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldIndex | Field index. |
System.Int32 | row | Row index. |
Returns
Type | Description |
---|---|
System.Object | Extracted value. |
PutValue(Int32, Object)
Sets the specified field value at the specified field index.
Declaration
public byte PutValue(int fieldIndex, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldIndex | |
System.Object | value |
Returns
Type |
---|
System.Byte |
Serialize(OffsetArrayList)
Saves pivot cache into OffsetArrayList.
Declaration
[CLSCompliant(false)]
public void Serialize(OffsetArrayList records)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | OffsetArrayList that will get all pivot cache records. |
Serialize(Stream, IEncryptor)
Saves pivot cache into stream using specified encryptor.
Declaration
public void Serialize(Stream stream, IEncryptor encryptor)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to save into. |
IEncryptor | encryptor | Encryptor to use. |
UpdateAfterInsertRemove(WorksheetImpl, Int32, Int32, Boolean, Boolean)
Update pivot cache after row/column insert operation.
Declaration
public void UpdateAfterInsertRemove(WorksheetImpl worksheet, int index, int count, bool isRow, bool isRemove)
Parameters
Type | Name | Description |
---|---|---|
WorksheetImpl | worksheet | |
System.Int32 | index | |
System.Int32 | count | |
System.Boolean | isRow | |
System.Boolean | isRemove |