Skip to content

[Bug]: property color cannot be found and error editing PivotTable #374

@boletus151

Description

@boletus151

Description

When running Azure Resource Inventory (ARI) against multiple subscriptions, using the following code:

try {
    Invoke-ARI `
        -TenantID $TenantId `
        -SubscriptionID $SubId `
        -SkipVMDetails `
        -ReportDir $OutDir `
        -Debug

    Write-Host "OK: Output saved to $OutDir" -ForegroundColor Green
}
catch {
    $msg = $_.Exception.Message
    Write-Host "❌    ERROR: $SubId -> $msg" -ForegroundColor Red
}

ARI sometimes fails with the following error:

The property 'Color' cannot be found on this object.

Image
  • This happens even when -DiagramFullEnvironment is NOT used.
  • The error appears at the end of Excel report generation phase after following debug info is printed:
"Validating if Excel is installed (Extra Customizations)"
"Error interacting with Excel COM object"
  • Furthermore, the Excel is generated but when it is opened appear a window multiple times with the following message:
    "Cannot edit PivotTable on protected sheet"
Image

Conditions / Observations

  • The error occurs only for some subscriptions, not all.
  • The same command works without error for other subscriptions (probably with a lower level of resources).
  • The error is resource-dependent (subscription content / structure), not random.
  • Removing -DiagramFullEnvironment does not always prevent the error.
  • The error happens late in the execution.
  • The Excel report file is still created, without diagrams and opening error warnings the first time the file is opened

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions