Skip to content

Preserve currency prefixes when converting XLSX files - #2874

Open
Aaditya Shasidhar Kolla (An-A-The) wants to merge 3 commits into
microsoft:mainfrom
An-A-The:fix/xlsx-currency-prefixes
Open

Aaditya Shasidhar Kolla (An-A-The) wants to merge 3 commits into
microsoft:mainfrom
An-A-The:fix/xlsx-currency-prefixes

Conversation

@An-A-The

Copy link
Copy Markdown

Related to #53.

Currently, XLSX conversion loses currency symbols because pandas reads cell values but discards Excel's number-format metadata.

This change uses openpyxl to extract currency prefixes from cell formats and preserves them in the generated Markdown output.

It also handles locale-specific currency formats and duplicate column headers, ensuring that each cell receives the correct currency prefix.

Before / After

image

Scope: This preserves currency prefixes only; it does not reproduce Excel's complete number formatting (such as decimal places and thousands separators).

Tests: Added unit and integration tests covering currency formats, percentages, locale markers, and duplicate column headers.

Test results:

  • XLSX tests: 38/38 passed
  • Vector tests: 247/247 passed
  • Full suite: 1014 passed, 1 unrelated pre-existing failure, 11 skipped.

@An-A-The

Copy link
Copy Markdown
Author

Aaditya Shasidhar Kolla (@An-A-The) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@An-A-The

Copy link
Copy Markdown
Author

Aaditya Shasidhar Kolla (@An-A-The) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

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.

2 participants