All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

WorkbookColorPalette.CopyFrom(WorkbookColorPalette) Method

Copies colors from the specified palette to the current palette.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll

Declaration

void CopyFrom(
    WorkbookColorPalette other
)

Parameters

Name Type Description
other WorkbookColorPalette

A workbook palette that contains colors to copy.

Exceptions

Type Description
ArgumentException

Occurs if other parameter is null (Nothing in Visual Basic).

Remarks

The following code example demonstrates how to copy a color palette from one workbook to another:

using DevExpress.Spreadsheet;
// ...
using (Workbook sourceWorkbook = new Workbook())
using (Workbook targetWorkbook = new Workbook())
{
    targetWorkbook.LoadDocument("Book1.xlsx");
    sourceWorkbook.LoadDocument("Book2.xlsx");
    targetWorkbook.ColorPalette.CopyFrom(sourceWorkbook.ColorPalette);
}
See Also