Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Param
anchor
anchor

The postion of the top left corner of the chart in the worksheet.

Exceptions
Exception
IndexOutOfRangeException
IndexOutOfRangeException

An IndexOutOfRangeException will be thrown if sheetIndex is less than 0, or greater than the number of sheets in the workbook.

Exception
ArgumentNullException
ArgumentNullException

An ArgumentNullException will be thrown if chartLocation is ObjectInSheet and anchor is null.

Exception
ArgumentException
ArgumentException

An ArgumentException will be throw if chartLocation is ObjectInSheet and the sheet at sheetIndex is a Chartsheet.

Remarks

If chartLocation is ChartAsSheet, this will create a new Chartsheet at sheetIndex and move the chart to it.

If chartLocation is ObjectInSheet, this will move the chart to the worksheet at sheetIndex, using anchor to define its position within the sheet.

In either case, the chart's formulas (for series data, axis titles, etc) will maintain their original references.

Scrollbar