Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undetected background-colour (support xslx created outside of fxl) #15

Open
zackteo opened this issue Dec 21, 2020 · 4 comments
Open

Undetected background-colour (support xslx created outside of fxl) #15

zackteo opened this issue Dec 21, 2020 · 4 comments

Comments

@zackteo
Copy link
Collaborator

zackteo commented Dec 21, 2020

;; TODO: background-colour seems to be undetected!

Based on some tests, it seems that the colours in the test/resources/dummy-spreadsheet.xslx are incompatible with .getFillForegroundColor. Colours are however read correctly from files generated with fxl.

This might be a limitation of org.apache.poi.xssf.usermodel? Have to see how dummy-spreadsheet.xslx was created. Proprietary excel issues?

@zackteo
Copy link
Collaborator Author

zackteo commented Dec 21, 2020

"A deprecated indexing scheme for colours that is still required for some records, and for backwards compatibility with OLE2 formats."

https://poi.apache.org/apidocs/dev/org/apache/poi/ss/usermodel/IndexedColors.html

@zackteo zackteo changed the title Undetected background-colour Undetected background-colour (support xslx created outside of fxl) Jan 3, 2021
@zackteo
Copy link
Collaborator Author

zackteo commented Jan 4, 2021

https://poi.apache.org/apidocs/dev/org/apache/poi/xssf/usermodel/XSSFColor.html#setIndexed-int-
Can probably use setRGB and getRGB in the long term

@zackteo
Copy link
Collaborator Author

zackteo commented Jan 6, 2021

(-> cell
    .getCellStyle
    .getFillForegroundXSSFColor
    .getARGBHex
    ;; .getFillForegroundColor
    ;; colours/colours-lookup
)

@zackteo
Copy link
Collaborator Author

zackteo commented Feb 24, 2021

https://poi.apache.org/apidocs/dev/org/apache/poi/ss/usermodel/ExtendedColor.html#getARGBHex--
getARGBHex & setARGBHex

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

No branches or pull requests

1 participant