RecoverWorkbookFromChartCache

ISpreadsheetOptions.RecoverWorkbookFromChartCache property

If data source for the chart is an external workbook and it’s not available, it will be recovered from the chart cache.

public bool RecoverWorkbookFromChartCache { get; set; }

Exceptions

exceptioncondition
InvalidOperationExceptionThrown when external workbook in unavailable and RecoverWorkbookFromChartCache property value is false.

Examples

Example:

[C#]
LoadOptions loadOptions = new LoadOptions
{
    SpreadsheetOptions = new SpreadsheetOptions
    {
        RecoverWorkbookFromChartCache = true
    }
};

using (Presentation pres = new Presentation("Presentation.pptx", loadOptions))
{
    IChart chart = pres.Slides[0].Shapes[0] as IChart;
    IChartDataWorkbook recoveredWorkbook = chart.ChartData.ChartDataWorkbook;
}

See Also