Skip to main content

ApiWorkbook

Class representing the currently active workbook

Properties​

NameTypeDescription
TableStylesApiTableStylesReturns the collection of table styles of the workbook.

Methods​

The following table lists the available methods.

MethodReturnsDescription
BreakLinkbooleanBreaks the link to the specified workbook: the formulas that refer to it are replaced with their current values, and the link is removed from the workbook.
CalculatebooleanRecalculates the cells that need recalculation (changed, added or volatile) across the workbook. Forces the recalc that is otherwise deferred until a macro finishes, so up-to-date formula results can be read within the same macro.
GetActiveChartApiChart | nullReturns the active chart of the workbook.
GetActiveSheetApiWorksheetReturns the active sheet of the workbook.
GetAllPivotTablesApiPivotTable[]Returns all pivot tables in the workbook.
GetCustomPropertiesApiCustomPropertiesReturns the custom properties of the workbook.
GetDrawingsByNameDrawing[]Returns drawings with the specified names from the workbook.
GetLinkSourcesstring[]Returns the paths of the other workbooks registered as external links of the current workbook, including links no formula uses any longer.
GetNamestringReturns the name of the workbook.
GetSheetsApiWorksheet[]Returns a sheet collection that represents all the sheets in the workbook.
GetThemeApiThemeReturns the theme of the workbook.
RedrawbooleanRedraws the editor screen, making the changes already made by a macro visible without waiting for it to finish. Observable from asynchronous code only. Repaints without recalculating: call ApiWorkbook#Calculate first if formula results must be up to date.
SaveNoneSaves changes to the specified document.