 |
| 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);
}
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. Only works if the Range object is not made of an union of ranges.
HRESULT Left([out, retval]int* col);
retrieves the left column of the range. Only works if the Range object is not made of an union of ranges.
HRESULT Right([out, retval]int* col);
retrieves the rightmost column of the range. Only works if the Range object is not made of an union of ranges.
HRESULT Bottom([out, retval]int* row);
retrieves the bottommost row of the range. Only works if the Range object is not made of an union of ranges.
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.