Skip to content

Expose Excel image placement options#131

Open
PrzemyslawKlys wants to merge 1 commit into
mainfrom
excel-picture-placement-surface
Open

Expose Excel image placement options#131
PrzemyslawKlys wants to merge 1 commit into
mainfrom
excel-picture-placement-surface

Conversation

@PrzemyslawKlys

Copy link
Copy Markdown
Member

Summary

  • expose Excel image range anchoring, scaling, rotation, and metadata parameters in Add-OfficeExcelImage and Add-OfficeExcelImageFromUrl
  • add friendly -Cell/-Width/-Height aliases and validation around mutually exclusive sizing modes
  • add a focused Excel picture example and Pester coverage for range anchor XML and image metadata

Validation

  • dotnet build Sources\PSWriteOffice\PSWriteOffice.csproj -c Debug -p:OfficeIMORoot=C:\Support\GitHub\OfficeIMO-excel-picture-placement
  • dotnet build Sources\PSWriteOffice\PSWriteOffice.csproj -c Release -p:OfficeIMORoot=C:\Support\GitHub\OfficeIMO-excel-picture-placement
  • $env:PSWRITEOFFICE_USE_DEVELOPMENT_BINARIES='true'; Invoke-Pester -Path .\Tests\ExcelDsl.Tests.ps1 -FullName 'supports scaled and range-anchored worksheet images' -Output Detailed

Dependency

Depends on EvotecIT/OfficeIMO#1993 for the new OfficeIMO.Excel image placement APIs. Package-mode CI may need a new OfficeIMO.Excel package before this PR can go green without project references.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10a21a32ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


/// <summary>How a range-anchored image behaves when cells move or resize.</summary>
[Parameter]
public ExcelImagePlacement Placement { get; set; } = ExcelImagePlacement.MoveAndSize;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update OfficeIMO.Excel package for placement APIs

In a normal package-based build (UseOfficeIMOProjectReferences is false unless a full sibling OfficeIMO checkout exists), PSWriteOffice.csproj still pins OfficeIMO.Excel 0.6.47, but this change now references ExcelImagePlacement and the new image placement overloads that are not available from that package. A clean CI/release checkout without the local OfficeIMO PR branch will fail to compile before tests run; please bump the package dependency or otherwise gate these APIs in the same change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant