Skip to content

Support integers as cell values from Sheets API#46

Merged
olejnjak merged 2 commits intomainfrom
copilot/support-integers-as-cell-values
Mar 11, 2026
Merged

Support integers as cell values from Sheets API#46
olejnjak merged 2 commits intomainfrom
copilot/support-integers-as-cell-values

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The Sheets API returns numeric cell values as JSON integers, not strings. ValueRange decoded values as [[String]], causing decoding to fail silently for any cell containing a number.

Changes

  • ValueRange.swift — Added a custom init(from:) with a private AnyCellValue helper that decodes each cell as StringIntDouble, converting numbers to their string representation
// JSON from Sheets API: {"values":[["key","en"],["count",42]]}
// Previously: decoding failure
// Now: ValueRange.values == [["key", "en"], ["count", "42"]]
  • ACKLocalizationTests.swift — Added tests covering integer cells, double cells, mixed rows, and end-to-end flow through transformValues
Original prompt

This section details on the original issue you should resolve

<issue_title>Support integers as cell values</issue_title>
<issue_description>Currently if sheet cell contains a number, Sheets API returns it as an integer, we should support it and convert it to string in a stringsfile.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: olejnjak <3148214+olejnjak@users.noreply.github.com>
Copilot AI changed the title [WIP] Support integers as cell values in Sheets API Support integers as cell values from Sheets API Mar 11, 2026
@github-actions
Copy link

@copilot your pull request is missing a changelog!

@olejnjak olejnjak marked this pull request as ready for review March 11, 2026 14:17
@olejnjak olejnjak merged commit 7649087 into main Mar 11, 2026
3 checks passed
@olejnjak olejnjak deleted the copilot/support-integers-as-cell-values branch March 11, 2026 14:24
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.

Support integers as cell values

2 participants