Modify an Existing Style

Using Microsoft Excel

To update a style in Microsoft Excel 97-2003:

  1. On the Format menu, click Style.
  2. Select the style you want to modify from the Style name list.
  3. Click Modify.
  4. Select the style options that you want using the tabs in the Format Cells dialog.
  5. Click OK.
  6. Under Style includes, specify the style features you want.
  7. Click OK to save the style and apply it to the selected range.

Using Aspose.Cells

The following examples demonstrate how to use Style.Update method.

Creating and Modifying a Style

This example creates a Style object, applies it to a range of cells and modifies the Style object. The modifications are automatically applied to the cell and the range the style was applied to.

Modifying an Existing Style

This example uses a simple template Excel file in which a style called Percent has already been applied to a range. The example:

  1. gets the style,
  2. creates a style object and
  3. modifies the style formatting.

The modifications are automatically applied to the range the style was applied to.