IXlsRange
COM interface ( getting help with interfaces )

 

interface IXlsRange : IDispatch
{

  [id(1), propget]  HRESULT Style([out, retval] IXlsStyle** style);

  [id(2)         ]  HRESULT AddSubRange([in]BSTR cellrange);
  [id(3)         ]  HRESULT AddCellsRange([in]int row1, [in]int col1, [in]int row2, [in]int col2);

  [id(4), propget]  HRESULT Range([out, retval] BSTR* cellrange);
  [id(4), propput]  HRESULT Range([in] BSTR cellrange);

  [id(5), propget]  HRESULT Name([out, retval] BSTR* name);
  [id(5), propput]  HRESULT Name([in] BSTR name);

  [id(6)         ]  HRESULT Apply();

  [id(7), propget]  HRESULT Top([out, retval]int* row);
  [id(8), propget]  HRESULT Left([out, retval]int* col);
  [id(9), propget]  HRESULT Right([out, retval]int* col);
  [id(10),propget]  HRESULT Bottom([out, retval]int* row);

  [id(11)        ]  HRESULT NewConditionalFormatting([out, retval] IXlsConditionalFormatting** cf);

  [id(12),propget]  HRESULT Hidden([out, retval]BOOL* hidden);
  [id(12),propput]  HRESULT Hidden([in]BOOL hidden);

  [id(13)        ]  HRESULT NewOutline([out, retval] IXlsOutline** ot);
  [id(14)        ]  HRESULT NewMergedCells([out, retval] IXlsMergedCells** mc);
  [id(15)        ]  HRESULT Delete();
  [id(16)        ]  HRESULT NewAutoFilter([out, retval] IXlsAutoFilter** af);
  [id(17)        ]  HRESULT Paste([in]int row, [in]int col, [in]enumPasteOption option);
  [id(18)        ]  HRESULT NewSort([out, retval]IXlsSort** sort);
  [id(19)        ]  HRESULT Erase();
  [id(20)        ]  HRESULT Transpose([in]enumPasteOption option, [out, retval] BSTR* cellrange);
  [id(21)        ]  HRESULT AutoFit();
  [id(22)        ]  HRESULT CalculateFormulas();
  [id(23)        ]  HRESULT DeleteFormulas();
  [id(24)        ]  HRESULT AutoFill(int nDepth);
  [id(25),propput]  HRESULT Formula([in]BSTR formula);
  [id(26)        ]  HRESULT CopyToClipboard();
  [id(27)        ]  HRESULT SelectByFormula([in]BSTR formula, [out, retval]IXlsRange** range);
  [id(28)        ]  HRESULT RemoveDuplicates();
  [id(29)        ]  HRESULT PasteAsList([in]int row, [in]int col, [in]enumPasteOption option);
  [id(30),propget]  HRESULT FullRange([out, retval] BSTR* cellrange);
  [id(31)        ]  HRESULT ClearContents();
  [id(32)        ]  HRESULT Label([in]BSTR label);
  [id(33)        ]  HRESULT Number([in]int n);
  [id(34)        ]  HRESULT Float([in]double f);
  [id(35)        ]  HRESULT RichLabel([in]IXlsRichLabel* rl);
  [id(36)        ]  HRESULT ClearFormats();
  [id(37)        ]  HRESULT RemoveDuplicatesUsingList([in]IXlsList* list);
  [id(38)        ]  HRESULT SearchAndReplace([in]BSTR searchWord, [in]BSTR replacementWord, [out, retval]int* nbChanges);
  [id(39)        ]  HRESULT PasteTo([in]IUnknown* worksheet, [in]int row, [in]int col, [in]enumPasteOption option);
  [id(40),propget]  HRESULT IsFormulaCalculated([out, retval]BOOL* bCalculated);
  [id(41)        ]  HRESULT NewTable([out, retval]IXlsTable** table);
  [id(42)        ]  HRESULT CreateNames([in]BOOL bTopHeaders, [in]BOOL bLeftColumn, [in]BOOL bBottomHeaders, [in]BOOL bRightColumn);
  [id(43)        ] HRESULT DeleteComments();
  [id(44)        ] HRESULT DeleteHyperlinks();
  [id(45),propget] HRESULT Local([out, retval]BOOL* bLocal);
  [id(45),propput] HRESULT Local([in]BOOL bLocal);
  [id(46),propget] HRESULT ProtectedRange([out, retval] IXlsProtectedRange** pr);
  [id(47),propget] HRESULT SpecialCells([in]enumSpecialCellsType t, [in]enumSpecialCellsValue v, [out, retval] IXlsRange** r);
  [id(48)        ] HRESULT ShiftCellsLeft();
  [id(49)        ] HRESULT ShiftCellsUp();
  [id(50)        ] HRESULT FillTo([in]IXlsWorksheet* destWorksheet, [in]IXlsRange* destRange, [in]enumPasteOption option);

}

 

HRESULT Style([out, retval] IXlsStyle** style);
retrieves the style object associated to the range. You can use the style object to define a style to apply across the entire range.

HRESULT AddSubRange([in]BSTR cellrange);
adds another contiguous block of cells to the existing block(s) of cells, combined to make a union. The cellrange format expected is either of the form RxxCx:RyyCy (example : R10C1:R12C13), or of the natural form Ax:Ax (example : A2:B5).

HRESULT AddCellsRange([in]int row1, [in]int col1, [in]int row2, [in]int col2);
adds another contiguous block of cells to the existing block(s) of cells, combined to make a union. The cellrange format expected is defined by its boundaries.

HRESULT Range([out, retval] BSTR* cellrange);
retrieves the full definition of the range. It includes one or more contiguous blocks of cells, separated by semi-colons. The format used is RxxCx:RyyCy.

HRESULT Range([in] BSTR cellrange);
defines the boundaries of the range with a single statement. Blocks of cells are separated by semi-colons. Use this method as an alternative to AddSubRange() and AddCellRange().The cellrange format expected is either of the form RxxCx:RyyCy (example : R10C1:R12C13), or of the natural form Ax:Ax (example : A2:B5).

HRESULT Name([out, retval] BSTR* name)
retrieves the name of the range.

HRESULT Name([in] BSTR name);
sets the name of the range. Special characters are forbidden, including spaces.

HRESULT Apply();
applies the range properties to the current worksheet. Use this to change formatting properties like borders, fonts, background colors, ...

HRESULT Top([out, retval]int* row);
retrieves the top row of the range.

HRESULT Left([out, retval]int* col);
retrieves the left column of the range.

HRESULT Right([out, retval]int* col);
retrieves the rightmost column of the range.

HRESULT Bottom([out, retval]int* row);
retrieves the bottommost row of the range.

HRESULT NewConditionalFormatting([out, retval] IXlsConditionalFormatting** cf);
creates a new conditional formatting object to work with.

HRESULT Hidden([out, retval]BOOL* hidden);
returns whether the range should be hidden. Only applies if the range has a name.

HRESULT Hidden([in]BOOL hidden);
sets whether the range should be hidden. Only applies if the range has a name.

HRESULT NewOutline([out, retval] IXlsOutline** ot);
creates an outline object.

HRESULT NewMergedCells([out, retval] IXlsMergedCells** mc);
creates a merged cells object.

HRESULT Delete();
deletes the range.

HRESULT NewAutoFilter([out, retval] IXlsAutoFilter** af);
creates a new auto filter object.

HRESULT Paste([in]int row, [in]int col, [in]enumPasteOption option);
pastes the cells defined by the range to an area whose top-left corner is passed as parameter.

HRESULT NewSort([out, retval] IXlsSort** sort);
creates a new sorting object.

HRESULT Erase();
erases data, formatting and formulas.

HRESULT Transpose([in]enumPasteOption option, [out, retval] BSTR* cellrange);
transposes the range. The transpose is a transform where the columns of data of the range are replaced by rows of data, and vice versa. The method returns the transposed ranges.

HRESULT AutoFit();
autofits the text in the range, in both directions.

HRESULT CalculateFormulas();
calculates all formulas in the range.

HRESULT DeleteFormulas();
deletes the formulas in the range.

HRESULT AutoFill(int nDepth);
automatically fills the range with numbers, strings and formulas matching the sequence defined by the pattern whose depth (height or weight) is passed in parameter. Default value is : 1.

HRESULT Formula([in]BSTR formula);
sets formulas for the whole range. This mechanism makes it possible to write array formulas.

HRESULT CopyToClipboard();
copies data and formatting to the clipboard.

HRESULT SelectByFormula([in]BSTR formula, [out, retval]IXlsRange** range);
creates a range object from cells matching the formula passed in parameter.

HRESULT RemoveDuplicates();
removes duplicate values.

HRESULT PasteAsList([in]int row, [in]int col, [in]enumPasteOption option);
pastes, as a list, the cells defined by the range to an area whose top-left corner is passed as parameter.

HRESULT FullRange([out, retval] BSTR* cellrange);
retrieves the full definition of the range including worksheet names.

HRESULT ClearContents();
erases data and formulas, leaves formatting intact.

HRESULT Label([in]BSTR label);
puts a label in all cells of the range.

HRESULT Number([in]int n);
puts an integer number in all cells of the range.

HRESULT Float([in]double f);
puts a floating point number in all cells of the range.

HRESULT RichLabel([in]IXlsRichLabel* rl);
puts a richly formatted label in all cells of the range.

HRESULT ClearFormats();
erases formatting, leaves data and formulas intact.

HRESULT RemoveDuplicatesUsingList([in]IXlsList* list);
removes duplicate values, using the passed list to ease the value matching.

HRESULT SearchAndReplace([in]BSTR searchWord, [in]BSTR replacementWord, [out, retval]int* nbChanges);
searches and replaces 'searchWord' by 'replacementWord' and returns how many changes have been applied. Disabled in trial mode.

HRESULT PasteTo([in]IUnknown* worksheet, [in]int row, [in]int col, [in]enumPasteOption option);
pastes the cells defined by the range to an area whose top-left corner and worksheet is passed as parameter.

HRESULT IsFormulaCalculated([out, retval]BOOL* bCalculated);
returns whether the formulas in the range are calculated. Applies to cells storing formulas. When it returns FALSE, a call to CalculateFormulas() is necessary before actually getting cell values.

HRESULT NewTable([out, retval]IXlsTable** table);
returns a new table object.

HRESULT CreateNames([in]BOOL bTopHeaders, [in]BOOL bLeftColumn, [in]BOOL bBottomHeaders, [in]BOOL bRightColumn);
creates named ranges for all implicit headers in the current range. If bTopHeaders and bLefColumn are passed as TRUE, it will create named ranges for all columns, and for all rows in that range.

HRESULT DeleteComments();
deletes all comments in the range.

HRESULT DeleteHyperlinks();
deletes all hyperlinks in the range.

HRESULT Local([out, retval]BOOL* bLocal);
returns whether the range should be local to this worksheet. Only applies if the range has a name.

HRESULT Local([in]BOOL bLocal);
sets whether the range should be local to this worksheet. Only applies if the range has a name.

HRESULT ProtectedRange([out, retval] IXlsProtectedRange** pr);
retrieves the protected range object associated to the range.

HRESULT SpecialCells([in]enumSpecialCellsType t, [in]enumSpecialCellsValue v, [out, retval] IXlsRange** r);
returns a range of special cells. The enumSpecialCellsValue parameter is ignored except for constants and formulas types.

HRESULT ShiftCellsLeft();
deletes the content in the range and shifts cells to the left.

HRESULT ShiftCellsUp();
deletes the content in the range and shifts cells up.

HRESULT FillTo([in]IXlsWorksheet* destWorksheet, [in]IXlsRange* destRange, [in]enumPasteOption option);
pastes and fills the cells defined by the range to a destination range, replicating the input area left to right and top to bottom so it fills the destination range entirely.