mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #473] Feature Request: Support inserting Office MathML (Mathematical Formula) in Excel files #367
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#367
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 @wangjinyin7136 on GitHub (Mar 7, 2025).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/473
Originally assigned to: @jmcnamara on GitHub.
Hi, thanks for this great library!
Background
Currently, libxlsxwriter doesn't support inserting mathematical formulas (like Office MathML or LaTeX-style math expressions) into Excel files. This is a useful feature when generating scientific or technical reports directly from code.
Expected feature
Add an API to allow embedding Office MathML into Excel files, possibly in cells, textboxes, or shapes. This can enable rendering complex formulas such as:
a² + b² = c²
Why it matters
This is very useful for scientific, engineering, educational applications, and automatic report generation tools. Other Office files (like Word or PowerPoint) can handle MathML, so Excel supporting it would make sense for compatibility.
Potential Approaches
drawing.xmlorsheet.xml.Would love to hear your thoughts on this.
Thank you!
@jmcnamara commented on GitHub (Mar 22, 2025):
Thanks for the suggestion and apologies for taking time to get back to you.
Unfortunately supporting MathML in libxlsxwriter (or the other language variants) isn't feasible due to the effort required.
It is possible to use Rich Strings to create simple equations with subscripts and superscripts (like your example) but not anything that has divisors. See for example: https://libxlsxwriter.github.io/rich_strings_8c-example.html
Closing as won't/can't fix.