Skip to content

excel workbook set

zmworm edited this page Apr 29, 2026 · 28 revisions

Excel: Workbook - Set

Set workbook-level properties such as calculation settings, protection, and metadata.

Path: /

Properties

Property Accepted Values Description
title text Document title
author / creator text Author name
subject text Subject
keywords text Keywords
description text Description
category text Category

Workbook Properties

Property Accepted Values Description
workbook.date1904 true/false Use 1904 date system
workbook.codeName text VBA code name
workbook.filterPrivacy true/false Filter personal info on save
workbook.showObjects all, placeholders, none Object display mode
workbook.backupFile true/false Create backup on save
workbook.dateCompatibility true/false Date compatibility mode
activeTab integer (0-based) or sheet name Active tab on open
firstSheet integer (0-based) or sheet name Leftmost visible tab on open

Calculation Properties

Property Accepted Values Description
calc.mode auto, manual, autoExceptTables Calculation mode
calc.iterate true/false Enable iterative calculation
calc.iterateCount integer Max iterations
calc.iterateDelta number Max change threshold
calc.fullPrecision true/false Full precision calculation
calc.fullCalcOnLoad true/false Force full recalc on open
calc.refMode A1, R1C1 Reference mode

Workbook Protection

Property Accepted Values Description
workbook.protection true/false/none Enable/disable workbook protection
workbook.lockStructure true/false Lock workbook structure
workbook.password text Workbook password (legacy 16-bit hash). Get exposes presence as workbook.password=set (never echoes the actual hash). Set to empty to clear.

Theme (all formats)

Property Accepted Values Description
theme.color.<slot> hex color Theme color (dk1, lt1, dk2, lt2, accent1-6, hlink, folHlink)
theme.font.major.latin font name Major (heading) Latin font
theme.font.minor.latin font name Minor (body) Latin font

Extended Properties (all formats)

Property Accepted Values Description
extended.template text Template name
extended.manager text Manager
extended.company text Company

Examples

# Set calculation mode to manual
officecli set data.xlsx / --prop calc.mode=manual

# Enable iterative calculation
officecli set data.xlsx / --prop calc.iterate=true --prop calc.iterateCount=100

# Protect workbook structure
officecli set data.xlsx / --prop workbook.protection=true

# Set theme heading font
officecli set data.xlsx / --prop theme.font.major.latin=Arial

Based on OfficeCLI v1.0.64

Clone this wiki locally