Keep cell number formats when plotting chart data from a sheet range#1189
Open
kamilkrzywanski wants to merge 1 commit into
Open
Keep cell number formats when plotting chart data from a sheet range#1189kamilkrzywanski wants to merge 1 commit into
kamilkrzywanski wants to merge 1 commit into
Conversation
fromNumericCellRange left formatCode null, so plot() cleared the chart numCache format and data labels linked to source showed unformatted values. Read formats from the cells and write them into the cache. Fixes apache#1007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When chart data is built with
fromNumericCellRangeand thenplot()is called, the series format code in the chartnumCachewas left empty (and any existing format was cleared). PowerPoint then shows unformatted data labels if they are linked to source, until the embedded workbook is opened in Excel and the cache is refreshed.This change reads number formats from the cells, uses the first non-blank numeric cell as the series format, and writes a per-point format when it differs.
setFormatCode(...)still overrides the series format. Includes a regression test.Fixes #1007