mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #424] Implement the $book->set_custom_color() function from the Perl library in the C library #332
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#332
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GavinMGlynn on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/424
Originally assigned to: @jmcnamara on GitHub.
Feature Request
Hi
I work for a company that has made extensive use of the original Perl library. They actually wrote their own C wrapper around the Perl library to give them XLSX generation capabilities in C. Now, I am thinking to "cut out the middle man" and just use your C library directly. The only wrinkle is quite a bit of our existing code relied upon the
$book->set_custom_color()functionality.In pretty much every case, a spreadsheet is being generated for a customer, which they will eventually forward back to my company. The set
$book->set_custom_color()functionality is used to set the customers color palette in the spreadsheet and then is referred to it in each format.Thanks
Gavin Glynn :)
PS: I am happy to help make the change, if needed.
@jmcnamara commented on GitHub (Dec 20, 2023):
I'll have a look at it soon.
@jmcnamara commented on GitHub (Apr 4, 2024):
I finally got around to looking at this feature request and unfortunately it isn't feasible in the C version of the library.
A long time time ago, I implemented the
set_custom_color()method in Excel::Writer::XLSX version to account for similar functionality in the my older XLS writing Spreadsheet::WriteExcel library. It was necessary in the older version because Excel had a limited color palette of ~ 64 colors and that was the only way to change them.However in the XLSX format Excel supported 16 million RGB colors so that form of custom color functionality was no longer required. As a result I didn't port it to any of the subsequent Python, C or Rust libraries. And at this point in time it doesn't make sense to retrofit it. Sorry about that.
As a workaround you could possibly use named variables for each color you need and modify the RGB value based on the customer.
Closing as won't fix