IXlsStyle
COM interface ( getting help with interfaces )

 

interface IXlsStyle : IDispatch
{
  [id(1), propget] HRESULT Format([out, retval] BSTR* format);
  [id(1), propput] HRESULT Format([in]BSTR format);
  [id(2), propget] HRESULT Alignment([out, retval] IXlsAlignment** alignment);
  [id(3), propget] HRESULT Font([out, retval] IXlsFont** font);
  [id(4), propget] HRESULT Borders([out, retval] IXlsBorders** borders);
  [id(5), propget] HRESULT Pattern([out, retval] IXlsPattern** pattern);

  [id(6)         ] HRESULT Apply();
  [id(7)         ] HRESULT Duplicate([out, retval] IXlsStyle** style);

  [id(8), propput] HRESULT FormatIndex([in]BSTR formatindex);

  [id(9), propget] HRESULT Locked([out, retval] BOOL* locked);
  [id(9), propput] HRESULT Locked([in]BOOL locked);

  [id(10),propget] HRESULT Hidden([out, retval] BOOL* hiddenFormula);
  [id(10),propput] HRESULT Hidden([in]BOOL hiddenFormula);
  [id(11)        ] HRESULT Merge([in] IXlsStyle* style);

}

 

HRESULT Format([in]BSTR format);
sets the number format. See Number formatting for more information. Only makes sense if the cell contains a number.

HRESULT Alignment([out, retval] IXlsAlignment** alignment);
creates an alignment object to work with. See IXlsAlignment for more information.

HRESULT Font([out, retval] IXlsFont** font);
creates a font object to work with. See IXlsFont for more information.

HRESULT Borders([out, retval] IXlsBorders** borders);
creates a border collection object to work with. See IXlsBorders for more information.

HRESULT Pattern([out, retval] IXlsPattern** pattern);
creates a pattern object to work with. See IXlsPattern for more information.

HRESULT Apply()
sets this style as the default formatting style for cells. When applied, all next cells will have that formatting style attached.

HRESULT Duplicate([out, retval] IXlsStyle** style);
creates a copy of the current style. Simplifies how styles can be combined or reused.

HRESULT FormatIndex([in]BSTR formatindex);
sets the format by setting an index. Typically used in automatic code generator scenarios where the format used by a cell is one of the built-in Excel formats.

HRESULT Locked([out, retval] BOOL* locked);
returns whether cells with this style should be locked.

HRESULT Locked([in]BOOL locked);
sets whether cells with this style should be locked.

HRESULT Hidden([out, retval] BOOL* hiddenFormula);
returns whether cells with this style should be hidden (formulas). For this to take effect, the worksheet must be protected.

HRESULT Hidden([in]BOOL hiddenFormula);
sets whether cells with this style should be hidden (formulas). For this to take effect, the worksheet must be protected.

HRESULT Merge([in] IXlsStyle* style);
merges the passed style into the current style by copying the relevant properties.