Skip to content

Conversation

@alison-mk
Copy link
Contributor

No description provided.

context.application.calculate(Excel.CalculationType.recalculate);
await context.sync();
});
Excel.CardLayoutSection:type:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm worried this snippet is so large, it'll be hard to find the relevant section. Is all this context necessary, or it is an artifact of the way the snippet mapping works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I updated the PR and mapped CardLayoutSection to a different, shorter snippet. I also mapped EntityPropertyType and EntityViewLayouts (others in this PR) to the shorter snippet.

Copy link
Collaborator

@AlexJerabek AlexJerabek left a comment

Choose a reason for hiding this comment

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

Thanks @alison-mk! I think these are good snippets to use. My one thought is that it's not clear where the interface is used in some of these samples. We often make the type explicit (e.g. const entity: Excel.EntityCellValue = ...) so that people understand how the code sample links to the reference page, without needing to understand the object model (e.g. the DV sample requires you know rankingRange.dataValidation.errorAlert is of type DataValidationErrorAlert). Consider adding explicit typing or comments to clear this up.

https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-entity-attribution.yaml


function makeProductEntity(productID: number, productName: string, product?:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is the actual CardLayoutSection in this sample? It's not obvious (to me) from skimming the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great feedback! I added the explicit types as inline comments. Please take a look and let me know what you think.

@alison-mk alison-mk requested a review from AlexJerabek October 2, 2025 00:26
Copy link
Collaborator

@AlexJerabek AlexJerabek left a comment

Choose a reason for hiding this comment

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

Looks good!

@alison-mk alison-mk merged commit 6e50798 into main Oct 2, 2025
1 check passed
@alison-mk alison-mk deleted the alison-mk-map-snippets branch October 2, 2025 19:29
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.

3 participants