Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <SHGAPI.H>
Link against: sheng.lib
This item is not part of the S60 5th Edition SDK

Class CShgWorkSheet

Interface status: deprecated

class CShgWorkSheet : public CBase, public MShgCellReader;

Description

A spreadsheet engine worksheet.

Derivation

Members

Defined in CShgWorkSheet:

Inherited from CBase:


Construction and destruction


~CShgWorkSheet()

Interface status: deprecated Inherited from: CShgWorkSheet

virtual ~CShgWorkSheet();

Description

Destructor.

[Top]


Member functions


SortL(const TRangeRef &,const CArrayFix< SSortKey > *,TSortOrientation)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError SortL(const TRangeRef &aRangeRef, const CArrayFix< SSortKey > *aArrayOfSortKeys, TSortOrientation aSortOrientation);

Description

Sorts a range of cells.

Parameters

const TRangeRef &aRangeRef

Range of cells to sort

const CArrayFix< CShgWorkSheet::SSortKey > *aArrayOfSortKeys

Array of keys by which to sort. The function applies the first key in the array to the first column/row in the range, the second key to the second column/row, etc.

CShgWorkSheet::TSortOrientation aSortOrientation

Sort orientation (columns or rows)

Return value

TShgError

EShgNoError if successful, otherwise an error code


SearchL(const TDesC &,const CArrayFix< TRangeRef > *,const TCellRef &,TBool,TBool,TSearchOrder,TSearchDirection,TUint32,TBool,TBool)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const TShgCell* SearchL(const TDesC &aTextToFind, const CArrayFix< TRangeRef > *aRangeArrayToSearchIn, const TCellRef &aStartCell, TBool aIncludeStartCell, TBool aSearchCyclically, TSearchOrder aSearchOrder, TSearchDirection aSearchDirection, TUint32 aWhatToSearchThrough, TBool aMatchCase, TBool aFindEntireCellOnly) const;

Description

Searches an array of ranges for some specified text.

Parameters

const TDesC16 &aTextToFind

Text to search for

const CArrayFix< TRangeRef > *aRangeArrayToSearchIn

Array of cell ranges that defines the search area

const TCellRef &aStartCell

Cell at which to start the search

TBool aIncludeStartCell

If true, include aStartCell in the search

TBool aSearchCyclically

If true, wrap around from end of search area to the beginning

CShgWorkSheet::TSearchOrder aSearchOrder

Search by row or column

CShgWorkSheet::TSearchDirection aSearchDirection

Search forwards or backwards

TUint32 aWhatToSearchThrough

Search cells values and/or formulae. This is a bitmask of TSearchThroughWhat values.

TBool aMatchCase

If true, match case

TBool aFindEntireCellOnly

If true, only match with entire cells

Return value

const TShgCell *

If successful, a cell matching the search criteria, else NULL


SearchL(const TDesC &,const TRangeRef &,const TCellRef &,TBool,TBool,TSearchOrder,TSearchDirection,TUint32,TBool,TBool)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const TShgCell* SearchL(const TDesC &aTextToFind, const TRangeRef &aRangeToSearchIn, const TCellRef &aStartCell, TBool aIncludeStartCell, TBool aSearchCyclically, TSearchOrder aSearchOrder, TSearchDirection aSearchDirection, TUint32 aWhatToSearchThrough, TBool aMatchCase, TBool aFindEntireCellOnly) const;

Description

Searches a range for some specified text.

Parameters

const TDesC16 &aTextToFind

Text to search for

const TRangeRef &aRangeToSearchIn

Cell range that defines the search area

const TCellRef &aStartCell

Cell at which to start the search

TBool aIncludeStartCell

If true, include aStartCell in the search

TBool aSearchCyclically

If true, wrap around from end of search area to the beginning

CShgWorkSheet::TSearchOrder aSearchOrder

Search by row or column

CShgWorkSheet::TSearchDirection aSearchDirection

Search forwards or backwards

TUint32 aWhatToSearchThrough

Search cells values and/or formulae. This is a bitmask of TSearchThroughWhat values.

TBool aMatchCase

If true, match case

TBool aFindEntireCellOnly

If true, only match with entire cells

Return value

const TShgCell *

If successful, a cell matching the search criteria, else NULL


ShiftCellsL(const TCellRef &,TInt,TInt,TShiftDirection,TShiftRule)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError ShiftCellsL(const TCellRef &aReferenceCell, TInt aShiftAmount, TInt aExtentOfBlockShifted, TShiftDirection aShiftDirection, TShiftRule aShiftRule);

Description

Shifts some specified rows or columns.

The rows/columns to move are specified by an origin cell, plus the number of rows/columns from this point. The movement is specified by an amount and a direction.

!! disable undo until the grid-lay part can be undone too (V1.1?)

Parameters

const TCellRef &aReferenceCell

Origin of cells to move

TInt aShiftAmount

Amount of rows/columns to move the cells

TInt aExtentOfBlockShifted

Number of rows/columns to shift

CShgWorkSheet::TShiftDirection aShiftDirection

Shift direction

CShgWorkSheet::TShiftRule aShiftRule

Flag to decide whether to allow existing cells to be overwritten

Return value

TShgError

EShgNoError if successful, otherwise an error code


ClearL(const TCellRef &,TUint32)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError ClearL(const TCellRef &aCell, TUint32 aWhatToClear=EClearAll);

Description

Clears a cell.

Parameters

const TCellRef &aCell

Cell to clear

TUint32 aWhatToClear

Clear contents and/or additional data flag. This is a bitmask of TClearParameters values.

Return value

TShgError

EShgNoError if successful, otherwise an error code


ClearL(const CArrayFix< TRangeRef > *,TUint32)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError ClearL(const CArrayFix< TRangeRef > *aRangeArray, TUint32 aWhatToClear=EClearAll);

Description

Clears an array of ranges.

Parameters

const CArrayFix< TRangeRef > *aRangeArray

Array of ranges to clear

TUint32 aWhatToClear

Clear contents and/or additional data flag. This is a bitmask of TClearParameters values.

Return value

TShgError

EShgNoError if successful, otherwise an error code


CellWasChangedByLastEditOperation(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TBool CellWasChangedByLastEditOperation(const TCellRef &aCellRef) const;

Description

Tests if a specified cell was changed by the last edit operation.

Parameters

const TCellRef &aCellRef

Cell to test

Return value

TBool

True if cell was changed, else false


UpdateAdditionalDataL(const TCellRef &,const CShgCellAdditionalData *)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError UpdateAdditionalDataL(const TCellRef &aCell, const CShgCellAdditionalData *aData);

Description

Updates additional data (formatting information) for a specified cell.

Parameters

const TCellRef &aCell

Cell to update

const CShgCellAdditionalData *aData

New additional data

Return value

TShgError

EShgNoError if successful, otherwise an error code


UpdateAdditionalDataL(const CArrayFix< TRangeRef > *,const CShgCellAdditionalData *)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError UpdateAdditionalDataL(const CArrayFix< TRangeRef > *aRangeArray, const CShgCellAdditionalData *aData);

Description

Updates additional data for a specified array of ranges.

Parameters

const CArrayFix< TRangeRef > *aRangeArray

Array of ranges to update

const CShgCellAdditionalData *aData

New additional data

Return value

TShgError

EShgNoError if successful, otherwise an error code


EffectiveParaFormatRead(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const CParaFormatLayer* EffectiveParaFormatRead(const TCellRef &aCell) const;

Description

Gets the paragraph layer formatting that applies to a specified cell.

Parameters

const TCellRef &aCell

Cell to query

Return value

const CParaFormatLayer *

Cell's paragraph layer formatting


EffectiveParaFormat(const TCellRef &,const TShgCell *)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const CParaFormatLayer* EffectiveParaFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;

Description

Gets the paragraph layer formatting that applies to a cell, specified by reference or by object.

Parameters

const TCellRef &aCell

Cell to query if aShgCell is NULL

const TShgCell *aShgCell

Cell to query. This can be NULL.

Return value

const CParaFormatLayer *

Cell's paragraph layer formatting


EffectiveCharFormatRead(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const CCharFormatLayer* EffectiveCharFormatRead(const TCellRef &aCell) const;

Description

Gets the character layer formatting that applies to a specified cell.

Parameters

const TCellRef &aCell

Cell to query

Return value

const CCharFormatLayer *

Cell's character layer formatting


EffectiveCharFormat(const TCellRef &,const TShgCell *)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const CCharFormatLayer* EffectiveCharFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;

Description

Gets the character layer formatting that applies to a cell, specified by reference or by object.

Parameters

const TCellRef &aCell

Cell to query if aShgCell is NULL

const TShgCell *aShgCell

Cell to query. This can be NULL.

Return value

const CCharFormatLayer *

Cell's character layer formatting


EffectiveNumberFormatRead(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgNumberFormat EffectiveNumberFormatRead(const TCellRef &aCell) const;

Description

Gets the number format for a specified cell.

Parameters

const TCellRef &aCell

Cell to query

Return value

TShgNumberFormat

Cell's number format


EffectiveNumberFormat(const TCellRef &,const TShgCell *)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgNumberFormat EffectiveNumberFormat(const TCellRef &aCell, const TShgCell *aShgCell) const;

Description

Gets the number format for a cell, specified by reference or by object.

Parameters

const TCellRef &aCell

Cell to query if aShgCell is NULL

const TShgCell *aShgCell

Cell to query. This can be NULL.

Return value

TShgNumberFormat

Cell's number format


ProtectL(const TCellRef &,TBool)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError ProtectL(const TCellRef &aCell, TBool aProtected);

Description

Sets a specified cell to be protected.

Parameters

const TCellRef &aCell

Cell to set

TBool aProtected

True to set the cell to protected, false to set it to unprotected

Return value

TShgError

EShgNoError if successful, otherwise an error code


ProtectL(const CArrayFix< TRangeRef > *,TBool)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError ProtectL(const CArrayFix< TRangeRef > *aRangeArray, TBool aProtected);

Description

Protects a specified array of ranges.

Parameters

const CArrayFix< TRangeRef > *aRangeArray

Ranges to set

TBool aProtected

True to set the ranges to protected, false to set them to unprotected

Return value

TShgError

EShgNoError if successful, otherwise an error code


IsCellProtected(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TBool IsCellProtected(const TCellRef &aCell) const;

Description

Tests if a specified cell is protected.

Parameters

const TCellRef &aCell

Cell to query.

Return value

TBool

True if the cell is protected, otherwise false.


IsAnyCellInRangeProtected(const TRangeRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TBool IsAnyCellInRangeProtected(const TRangeRef &aRange) const;

Description

Tests if any cell in a specified range is protected.

Parameters

const TRangeRef &aRange

Range to query

Return value

TBool

True if any cell is protected, otherwise false


Lock(TBool)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C void Lock(TBool aLocked);

Description

Locks/unlocks the worksheet.

Parameters

TBool aLocked

True to lock the worksheet, false to unlock


IsLocked()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TBool IsLocked() const;

Description

Tests if the worksheet is locked.

Return value

TBool

True if the worksheet is locked, false if unlocked


SetShowZeros(TBool)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C void SetShowZeros(TBool aShowZeros);

Description

Sets whether zero values should be displayed.

Parameters

TBool aShowZeros

True if zero values should be displayed


ShowZeros()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TBool ShowZeros() const;

Description

Gets whether zero values should be displayed.

Return value

TBool

True if zero values should be displayed


GridTable()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C MGridTable* GridTable() const;

Description

Gets the worksheet as a Grid API table.

Return value

MGridTable *

Grid API table


SheetEngine()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C CSheetEngine* SheetEngine() const;

Description

Gets the spreadsheet engine used by the worksheet.

Return value

CSheetEngine *

Spreadsheet engine


ReadShgCell(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgCell* ReadShgCell(const TCellRef &aCellRef) const;

Description

Gets a specified cell.

Parameters

const TCellRef &aCellRef

Cell reference

Return value

TShgCell *

The cell identified by aCellRef


ReadFormulaCellTextL(const TShgCell &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TPtrC ReadFormulaCellTextL(const TShgCell &aCell) const;

Description

Gets the formula text for a specified cell.

The function panics if the cell does not contain a formula.

Parameters

const TShgCell &aCell

Cell to query

Return value

TPtrC16

Formula text


SetCellL(const TCellRef &,const TDesC &)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError SetCellL(const TCellRef &aCellRef, const TDesC &aText);

Description

Sets cell contents.

Parameters

const TCellRef &aCellRef

Cell to set

const TDesC16 &aText

New cell contents

Return value

TShgError

EShgNoError if successful, otherwise an error code


AddCellInsideEditOperationL(const TShgCell &)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError AddCellInsideEditOperationL(const TShgCell &aCell);

Description

Adds a cell to a worksheet, assuming an edit operation is in progress.

It assumes that CSheetEngine::StartEditOperation() and CSheetEngine::EndEditOperationL(TShgError) are called around this.

Parameters

const TShgCell &aCell

Cell to add

Return value

TShgError

EShgNoError if successful, otherwise an error code


DeleteCellInsideEditOperationL(const TCellRef &)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError DeleteCellInsideEditOperationL(const TCellRef &aCellRef);

Description

Deletes a cell from a worksheet, assuming an edit operation is in progress.

Parameters

const TCellRef &aCellRef

Cell to delete

Return value

TShgError

EShgNoError if successful, otherwise an error code


SetNameL(const TDesC &)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C void SetNameL(const TDesC &aName);

Description

Sets the worksheet name.

Parameters

const TDesC16 &aName

Worksheet name


Name()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const TPtrC Name() const;

Description

Gets the worksheet name.

Return value

const TPtrC16

Worksheet name


WorkSheetNo()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TInt WorkSheetNo() const;

Description

Gets the worksheet number.

Return value

TInt

Worksheet number


BottomRight()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TCellRef BottomRight() const;

Description

Gets the cell at the bottom right of the worksheet.

Return value

TCellRef

Cell at the bottom right of the worksheet


GridLay()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C CGridLay* GridLay() const;

Description

Gets the worksheet as a Grid API layer object.

Return value

CGridLay *

Grid layer object


DefaultAdditionalData()const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C const CShgCellAdditionalData* DefaultAdditionalData() const;

Description

Gets default additional data for the worksheet.

Return value

const CShgCellAdditionalData *

Default additional data


PasteL(TRangeRef &,const TRangeRef &,const CStreamStore &,const CStreamDictionary &,TBool,TUint32,TPasteAction)

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C TShgError PasteL(TRangeRef &aBounds, const TRangeRef &aDestination, const CStreamStore &aStore, const CStreamDictionary &aDictionary, TBool aSkipBlanks=EFalse, TUint32 aWhatToPaste=EPasteAll, TPasteAction aPasteAction=EPasteActionOverwrite);

Description

Paste data from the clipboard into the worksheet.

The data can be plain text or spreadsheet engine cells.

Parameters

TRangeRef &aBounds

On return, range affected by the paste operation

const TRangeRef &aDestination

Destination range

const CStreamStore &aStore

Store from which to read data

const CStreamDictionary &aDictionary

Dictionary from which to read stream IDs

TBool aSkipBlanks

If true, do not paste blank cells

TUint32 aWhatToPaste

Flag to control which of values/formulae/additional data are pasted. This is a bitmask of TPasteWhat flags.

CShgWorkSheet::TPasteAction aPasteAction

Flag to control whether pasting overwrites or manipulates existing data

Return value

TShgError

EShgNoError if successful, otherwise an error code


CopyL(CStreamStore &,CStreamDictionary &,const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C void CopyL(CStreamStore &aStore, CStreamDictionary &aDictionary, const TCellRef &aCell) const;

Description

Copies a cell to the clipboard.

Parameters

CStreamStore &aStore

Store to write to

CStreamDictionary &aDictionary

Stream dictionary to write to

const TCellRef &aCell

Cell to copy


CopyL(CStreamStore &,CStreamDictionary &,const CArrayFix< TRangeRef > *)const

Interface status: deprecated Inherited from: CShgWorkSheet

IMPORT_C void CopyL(CStreamStore &aStore, CStreamDictionary &aDictionary, const CArrayFix< TRangeRef > *aRangeArray) const;

Description

Copies an array of ranges to the clipboard.

Parameters

CStreamStore &aStore

Store to write to

CStreamDictionary &aDictionary

Stream dictionary to write to

const CArrayFix< TRangeRef > *aRangeArray

Ranges to copy


MShgReadCell(const TCellRef &)const

Interface status: deprecated Inherited from: CShgWorkSheet

virtual TShgCell* MShgReadCell(const TCellRef &aCellRef) const;

Description

Gets a specified cell.

Parameters

const TCellRef &aCellRef

Cell reference

Return value

TShgCell *

The cell identified by aCellRef

[Top]


Member structures


Struct SSortKey

Interface status: deprecated

struct SSortKey;

Description

Defines keys for sorting operations.

Members

Defined in CShgWorkSheet::SSortKey:

Member enumerations


Enum TDirection

Interface status: deprecated Inherited from: CShgWorkSheet::SSortKey

TDirection

Description

Sort order.

EDirectionAscending

Ascending sort order.

EDirectionDescending

Descending sort order.

Member data


iCellRefDimensionPerpendicularToSort

Interface status: deprecated Inherited from: CShgWorkSheet::SSortKey

TInt iCellRefDimensionPerpendicularToSort;

Description

Number of row or column, depending on which is perpendicular to the sort.


iDirection

Interface status: deprecated Inherited from: CShgWorkSheet::SSortKey

TDirection iDirection;

Description

Sort order.


iCaseSensitive

Interface status: deprecated Inherited from: CShgWorkSheet::SSortKey

TBool iCaseSensitive;

Description

If true, sorting is case-sensitive

[Top]


Member enumerations


Enum TSearchOrder

Interface status: deprecated Inherited from: CShgWorkSheet

TSearchOrder

Description

Search order.

ESearchOrderByRow

Search by rows.

ESearchOrderByColumn

Search by columns.


Enum TSearchDirection

Interface status: deprecated Inherited from: CShgWorkSheet

TSearchDirection

Description

Search direction.

ESearchDirectionForwards

Search forwards.

ESearchDirectionBackwards

Search backwards.


Enum TSearchThroughWhat

Interface status: deprecated Inherited from: CShgWorkSheet

TSearchThroughWhat

Description

Search content flags.

ESearchThroughFormulae

Search formulae only.

ESearchThroughValues

Search values only.

ESearchThroughAll

Search formulae and values.


Enum TShiftDirection

Interface status: deprecated Inherited from: CShgWorkSheet

TShiftDirection

Description

Cell shift operation directions.

EShiftVertically

Shift vertically.

EShiftHorizontally

Shift horizontally.


Enum TShiftRule

Interface status: deprecated Inherited from: CShgWorkSheet

TShiftRule

Description

Cell shift operation rules.

EDeleteCellsInRangeObliterated

Allow existing cells to be overwritten.

EDisallowCellsInRangeObliterated

Do not allow existing cells to be overwritten.


Enum TClearParameters

Interface status: deprecated Inherited from: CShgWorkSheet

TClearParameters

Description

Cell clear operation flags.

EClearContents

Clear cell contents.

EClearAdditionalData

Clear cell additional data.

EClearAll

Clear cell contents and additional data.


Enum TPasteWhat

Interface status: deprecated Inherited from: CShgWorkSheet

TPasteWhat

Description

Cell paste operation content flags.

EPasteFormula

Paste formula only.

EPasteValue

Paste value only.

EPasteAdditionalData

Paste additional data only.

EPasteAll

Paste all.


Enum TPasteAction

Interface status: deprecated Inherited from: CShgWorkSheet

TPasteAction

Description

Cell paste action flags.

EPasteActionOverwrite

Overwrite existing data.

EPasteActionAdd

Result is the addition of the copied values to the existing values.

EPasteActionSubtract

Result is the subtraction of the copied values from the existing values.

EPasteActionMultiply

Result is the multiplication of the copied values by the existing values.

EPasteActionDivide

Result is the division of the existing values by the copied values.


Enum TSortOrientation

Interface status: deprecated Inherited from: CShgWorkSheet

TSortOrientation

Description

Sort orientation flags.

ESortOrientationTopToBottom

Sort vertically.

ESortOrientationLeftToRight

Sort horizontally.