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 PasteAsList([in]int row, [in]int col, [in]enumPasteOption option);
  [id(29),propget] HRESULT FullRange([out, retval] BSTR* cellrange);
  [id(30)        ] HRESULT RemoveDuplicates();

}

 

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.

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 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 RemoveDuplicates();
removes duplicate values.