Comments (8)
図形はどこに保存されてるか?
- 図形
(zip)/xl/drawings/*
from exceljs.
図形のread自体はされてそう。writeがされてない?
https://github.com/exceljs/exceljs/blob/master/lib/xlsx/xform/drawing/drawing-xform.js
read後にどんなobjectで図形が保持されているか、またwrite処理がどんな流れかを追ってみるのが良さそう
from exceljs.
workbook.xlsx.readFile
xlsx/xlsx.js: XLSX#readFile()
xlsx/xform/drawing/drawing-xform → xlsx/xform/base-xform: BaseXform#parseStream()
→ xlsx/xlsx: model.drawings[filename]
xlsx/xlsx.js: XLSX#reconcile() ★これは何? relをごにょごにょ
delete model.drawings
してる
画像だけ?は workbook.worksheets[].model.media の array に入れられるっぽい
imageを扱うようにしたcommitは多分これ(2017年) exceljs@5655ee7
図形やTextboxを扱わない経緯はないのかなぁ
workbook.xlsx.writeFile
画像はどうwriteされている?
xls/xlsx.js: XLSX#writeFile() → write()
addDrawings()
worksheet.drawing が model? である
DrawingXform#prepare(drawing, {}) → TwoCellAnchorXform#prepare() → PicXform#prepare()
DrawingXform#toXml(drawing) → DrawingXform#render()
Note
- XMLのパースには https://github.com/lddubeau/saxes を使っている
- saxes は https://github.com/isaacs/sax-js の fork
- SAX とは the Simple API for XML のことのよう https://www.baeldung.com/java-sax-parser
from exceljs.
OpenXml Doc
Picture
<xdr:twoCellAnchor>
<xdr:from>
<xdr:to> // OneCellAnchorには無いっぽい
<xdr:pic> Picture
<xdr:nvPicPr> NonVisualPictureProperties
<xdr:cNvPr> NonVisualDrawingProperties
<a:hlinkClick> HyperlinkOnClick
<a:extLst> NonVisualDrawingPropertiesExtensionList
<xdr:cNvPicPr> NonVisualPictureDrawingProperties
<a:picLocks> PictureLocks
<xdr:blipFill> BlipFill
<a:blip>
<a:stretch>
<a:fillRect>
<a:tile>
<xdr:spPr> ShapeProperties
...
Textbox, Shape
<xdr:twoCellAnchor>
//from, to
<xdr:sp> Shape
<xdr:nvSpPr> NonVisualShapeProperties
<xdr:cNvPr> NonVisualDrawingProperties
...
<xdr:cNvSpPr> NonVisualShapeDrawingProperties
<a:extLst> NonVisualPicturePropertiesExtensionList
<a:spLocks> ShapeLocks
<xdr:spPr> ShapeProperties
...
<xdr:style> ShapeStyle
<a:effectRef> EffectReference
<a:fillRef> FillReference
<a:fontRef> FontReference
<a:lnRef> LineReference
<xdr:txBody> TextBody
<a:bodyPr> BodyProperties
<a:lstStyle> ListStyle
<a:p> Paragraph
from exceljs.
2022年に最高のPRが上げられてるっぽい
exceljs#2077
from exceljs.
OOXML = Office Open XML Standards
Excel spreadsheets (Common SS = HSSF, XSSF, and SXSSF)
- HSSF = xls
- XSSF = xlsx
例えばShapeの実装はこれっぽい:https://github.com/apache/poi/blob/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFShape.java
from exceljs.
APACHE POI is limited when using large file sizes
from exceljs.
To solve the above problem, I used a C# app using OpenXML and NPOI and it worked well.
from exceljs.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exceljs.