Giter Club home page Giter Club logo

Comments (8)

kigh-ota avatar kigh-ota commented on July 26, 2024

図形はどこに保存されてるか?

  • 図形
    • (zip)/xl/drawings/*

from exceljs.

kigh-ota avatar kigh-ota commented on July 26, 2024

図形のread自体はされてそう。writeがされてない?
https://github.com/exceljs/exceljs/blob/master/lib/xlsx/xform/drawing/drawing-xform.js

read後にどんなobjectで図形が保持されているか、またwrite処理がどんな流れかを追ってみるのが良さそう

from exceljs.

kigh-ota avatar kigh-ota commented on July 26, 2024

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

from exceljs.

kigh-ota avatar kigh-ota commented on July 26, 2024

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.

kigh-ota avatar kigh-ota commented on July 26, 2024

2022年に最高のPRが上げられてるっぽい
exceljs#2077

from exceljs.

kigh-ota avatar kigh-ota commented on July 26, 2024

https://github.com/apache/poi

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.

dinhhai96-vn avatar dinhhai96-vn commented on July 26, 2024

APACHE POI is limited when using large file sizes

from exceljs.

dinhhai96-vn avatar dinhhai96-vn commented on July 26, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.