-
Notifications
You must be signed in to change notification settings - Fork 44
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
[IMP] xlsx: add support for data bars in CF #4983
Conversation
if (!dataBarElement) return undefined; | ||
return { | ||
color: this.extractColor(dataBarElement.querySelector("color"), theme, "ffffff"), | ||
// TODO ATM, we only support color for dataBar, not the minimum and maximum fill percentage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ruleAttributes = commonCfAttributes(cf); | ||
ruleAttributes.push(["type", "dataBar"]); | ||
|
||
// TODO ATM we do not support min and max values, so to have the same result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tchou tchou
|
||
// TODO ATM we do not support min and max values, so to have the same result | ||
// in Excel, we export with min=0 and max=100 | ||
return escapeXml/*xml*/ ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data bars seem to be exported as gradient fill in excel rather than solid fill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not see in the ecma the place I should adapt it.
Export from excel with a solid and a gradient:
<cfRule type="dataBar" priority="3">
<dataBar>
<cfvo type="min"/>
<cfvo type="max"/>
<color rgb="FF638EC6"/>
</dataBar>
</cfRule>
<cfRule type="dataBar" priority="1">
<dataBar>
<cfvo type="min"/>
<cfvo type="max"/>
<color rgb="FF638EC6"/>
</dataBar>
</cfRule>
Don't see any difference 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it looks like Excel do not use the OpenXML databars, but its own custom databar type.
TBD if we want to stay standard, or if we want to match excel
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/88c5ca0a-3a34-4fad-8c91-fdb4550d3fe1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what version of excel where you using btw ? This is the result I get using Excel 365 desktop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used excel online.
TBD if we want to stay standard, or if we want to match excel
Don't know, IMO we should stay standard but I don't have a strong opinion on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds annoying without much gains TBH. I vote to ignore this.
(I also have the x14:dataBar
in excel online tho 😅 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's re-ready :D
This commit adds the support for import/export of data bars rules. Task: 4179806
e6edd83
to
ccca2d8
Compare
@robodoo r+ |
This commit adds the support for import/export of data bars rules. closes #4983 Task: 4179806 Signed-off-by: Rémi Rahir (rar) <[email protected]>
This commit adds the support for import/export of data bars rules.
Task: 4179806
Description:
description of this task, what is implemented and why it is implemented that way.
Task: TASK_ID
review checklist