User Interface
User Interface provides functionality for setting and manipulating elements of the sheet screen.
| Function | API | Description | Example |
|---|---|---|---|
|
Sheet Screen Settings
(Zoom In/Out) | Application.ActiveWindow | Property that returns the object that manages the screen settings of the currently active sheet | let window = instance.Application.ActiveWindow; |
| Window.ActiveCell |
Property that returns the range object corresponding to the selected cell in the sheet screen settings
cf) When a range is active, it is set to the top-left cell |
let window = instance.Application.ActiveWindow;
let activeCell = window.ActiveCell; | |
| Window.ActiveChart | Property that returns the active chart object in the sheet screen settings |
let window = instance.Application.ActiveWindow;
let activeChart = window.ActiveChart; | |
| Window.ActiveSheet | Property that returns the active sheet object in the sheet screen settings |
let window = instance.Application.ActiveWindow;
let activeSheet = window.ActiveSheet; | |
| Window.DisplayFormulas | Property that returns or changes whether to display formulas as result values or as strings in the sheet screen settings |
let window = instance.Application.ActiveWindow;
console.log(window.DisplayFormulas); window.DisplayFormulas = true; | |
| Window.DisplayGridLines | Property that returns or changes whether to display grid lines on the sheet screen |
let window = instance.Application.ActiveWindow;
console.log(window.DisplayGridLines); window.DisplayGridLines = false; | |
| Window.DisplayHeadings | Property that returns or changes whether to display row/column headers on the sheet screen |
let window = instance.Application.ActiveWindow;
console.log(window.DisplayHeadings); window.DisplayHeadings = false; | |
| Window.RangeSelection | Property that returns the selected range object in the sheet screen |
let window = instance.Application.ActiveWindow;
let range = window.RangeSelection; | |
| Window.Selection |
Property that returns the selected object in the sheet screen
cf) Objects such as ranges, shapes, charts, etc. |
let window = instance.Application.ActiveWindow;
let selection = window.Selection; switch (selection.ActualType) { case "Range": { break; } default: { break; } } | |
| Window.Zoom | Property that returns or changes the zoom level of the sheet screen |
let window = instance.Application.ActiveWindow;
console.log(window.Zoom); window.Zoom = 150; |