Skip to main content

Integrated Document

APIDescriptionExample
Application.ActiveWorkbookProperty that returns the currently active integrated document objectlet application = instance.Application;

let workbook = application.ActiveWorkbook;
Workbook.ActiveChartProperty that returns the selected chart object within the active sheet of the workbooklet workbook = instance.Application.ActiveWorkbook;

let activeChart = workbook.ActiveChart;
Workbook.FullNameProperty that returns the full name of the workbook, including the path within the HCell SDK file systemlet workbook = instance.Application.ActiveWorkbook;

console.log(workbook.FullName);
Workbook.NameProperty that returns the name of the workbooklet workbook = instance.Application.ActiveWorkbook;

console.log(workbook.Name);
Workbook.PathProperty that returns the workbook path within the HCell SDK file systemlet workbook = instance.Application.ActiveWorkbook;

console.log(workbook.Path);
Workbook.ActivateFunction that activates the workbooklet workbook = instance.Application.Workbooks.Item(1);

workbook.Activate();
Workbook.CloseFunction that closes the workbooklet workbook = instance.Application.ActiveWorkbook;

workbook.Close();
Workbook.SaveFunction that saves the workbook by overwritinglet workbook = instance.Application.ActiveWorkbook;

workbook.Save();
Workbook.SaveAsFunction that saves the workbook with a different namelet workbook = instance.Application.ActiveWorkbook;

workbook.SaveAs("/hnc/File/Example.xlsx");

Spreadsheet Basic Functions , Engine Global Management , Integrated Document Management , Sheet Management , Sheet , Range , Area , Engine Object Common