Skip to content

Conversation

@emmanueldufour
Copy link
Contributor

@emmanueldufour emmanueldufour commented Dec 17, 2025

Word keeps cached values that need be refreshed after the embedded workbook has been updated. This is just the first step refreshing categories and series labels (tested for bar charts).
see for ex the related issues:
https://stackoverflow.com/questions/74703330/updated-excel-chart-in-word-document-not-getting-reflected-apache-poi
https://stackoverflow.com/questions/54681481/apache-poi-when-editing-chart-data-in-a-word-file-it-returns-to-the-data-defi

TODO ultimately a function should be provided to refresh the entire chart cache
TODO getWorkbookCells and getWorkbookCellVallue should be moved to XSSFWorkbook

Word keeps cached values that need be refreshed after the embedded workbook has been updated. This is just the first step refreshing categories and  series labels (tested for bar charts). TODO ultimately a function should be provided to refresh the entire cache
@pjfanning
Copy link
Member

Can you start with using descriptive names for both your PRs?

@emmanueldufour emmanueldufour changed the title Update XWPFChart.java refresh XWPFChart.java cache from embedded values Dec 18, 2025
@emmanueldufour
Copy link
Contributor Author

Can you start with using descriptive names for both your PRs?

done

@pjfanning
Copy link
Member

It is against ASF licensing policies to use code from stackoverflow.com due to the restrictive licensing that they apply to code on the site. You need to get the people who wrote the code to place the code in the public domain or license it with a more permissive license.
https://www.apache.org/legal/resolved.html#stackoverflow

@emmanueldufour
Copy link
Contributor Author

It is against ASF licensing policies to use code from stackoverflow.com due to the restrictive licensing that they apply to code on the site. You need to get the people who wrote the code to place the code in the public domain or license it with a more permissive license. https://www.apache.org/legal/resolved.html#stackoverflow

I did not use code from stackoverflow. I merely quoted related issues this is supposed to help with.

* Create a new chart in document
*
* @since 4.0.0
* @since POI 4.0.0
Copy link
Member

Choose a reason for hiding this comment

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

don't change these values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes sorry I didnt intend to but Im struggling with GIT, if you could revert it that would help

Copy link
Member

Choose a reason for hiding this comment

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

what can I revert in your PR?

Copy link
Contributor Author

@emmanueldufour emmanueldufour Dec 18, 2025

Choose a reason for hiding this comment

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

since 4.0.0 vs since POI 4.0.0

Copy link
Member

Choose a reason for hiding this comment

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

I wasn't offering to do it. I was asking why I'm expected to do it.

return wb.getSheet( cell.getSheetName()).getRow(cell.getRow()).getCell(cell.getCol()).toString();

}
/**
Copy link
Member

Choose a reason for hiding this comment

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

whitespace between methods - no need for all the whitespace inside the method - please try to make the code follow the existing style in classes

@emmanueldufour emmanueldufour marked this pull request as draft December 18, 2025 10:34
Copy link
Member

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

  • no tests
  • code incorrectly formatted

found an existing function that performs most the the cache refreshing
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