API Reference
Cmdlet
Set-OfficeExcelExecutionPolicy
Configures OfficeIMO Excel execution and validation behavior for a workbook.
Remarks
Configures OfficeIMO Excel execution and validation behavior for a workbook.
Examples
Force sequential execution for a workbook.
PS>
$workbook | Set-OfficeExcelExecutionPolicy -Mode Sequential
Disables automatic parallel execution decisions for subsequent OfficeIMO operations.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-OfficeExcelExecutionPolicy [-Diagnostics] [-DisableAutoFitImmediateSave] [-MaxDegreeOfParallelism <Nullable`1>] [-Mode <Automatic|Sequential|Parallel>] [-ParallelThreshold <Nullable`1>] [-PassThru] [-WorksheetValidation <Disabled|DiagnosticsOnly|DebugOnly|Always>] [<CommonParameters>]#Parameter set:
ContextParameters
- Diagnostics SwitchParameter
- Request diagnostics-aware validation without wiring verbose callbacks.
- DisableAutoFitImmediateSave SwitchParameter
- Do not save worksheet parts immediately after AutoFit width/height mutations.
- MaxDegreeOfParallelism Nullable`1
- Optional cap for parallel compute phases.
- Mode String
- Execution mode for large operations.
- Possible values:
Automatic,Sequential,Parallel - ParallelThreshold Nullable`1
- Global item threshold above which Automatic mode switches to Parallel.
- PassThru SwitchParameter
- Emit the workbook after updating the policy.
- WorksheetValidation String
- Worksheet validation mode for write operations.
- Possible values:
Disabled,DiagnosticsOnly,DebugOnly,Always
Outputs
OfficeIMO.Excel.ExcelDocument
Set-OfficeExcelExecutionPolicy [-Diagnostics] [-DisableAutoFitImmediateSave] -Document <ExcelDocument> [-MaxDegreeOfParallelism <Nullable`1>] [-Mode <Automatic|Sequential|Parallel>] [-ParallelThreshold <Nullable`1>] [-PassThru] [-WorksheetValidation <Disabled|DiagnosticsOnly|DebugOnly|Always>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Diagnostics SwitchParameter
- Request diagnostics-aware validation without wiring verbose callbacks.
- DisableAutoFitImmediateSave SwitchParameter
- Do not save worksheet parts immediately after AutoFit width/height mutations.
- Document ExcelDocument
- Workbook whose execution policy should be updated.
- MaxDegreeOfParallelism Nullable`1
- Optional cap for parallel compute phases.
- Mode String
- Execution mode for large operations.
- Possible values:
Automatic,Sequential,Parallel - ParallelThreshold Nullable`1
- Global item threshold above which Automatic mode switches to Parallel.
- PassThru SwitchParameter
- Emit the workbook after updating the policy.
- WorksheetValidation String
- Worksheet validation mode for write operations.
- Possible values:
Disabled,DiagnosticsOnly,DebugOnly,Always
Outputs
OfficeIMO.Excel.ExcelDocument