Giter Site home page Giter Site logo

ooxml_parser's Introduction

ooxml_parser

ooxml_parser is a Ooxml files (docx, xlsx, pptx) parser written in Ruby.

Installation

  1. Install magic lib, required by ruby-filemagic
    Mac OS:

    brew install libmagic

    Debian-Based Linux:

    sudo apt-get install libmagic-dev

    Centos-Based Linux:

    sudo yum install file-devel
  2. Install gem by command:

    gem install ooxml_parser

Usage

Parse a docx file

require 'ooxml_parser'
docx = OoxmlParser::Parser.parse('spec/document/document_properties/page_count.docx')
p docx.document_properties.pages # 2

Also check the example directory for more examples.

Configuration

Accuracy

Accuracy of digits in fraction part Default is 2 digits in fraction part

OoxmlParser.configure do |config|
  config.accuracy = 3
end

Changes

Renamed SeriesText#string to SeriesText#reference

ooxml_parser's People

Contributors

alinasafonova avatar dependabot-preview[bot] avatar dependabot[bot] avatar onlyoffice-testing-robot avatar shockwavenn avatar vitaliyserov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ooxml_parser's Issues

Drawing position is float

SetPosition.xlsx
xlsx.worksheets.first.drawings.first.position.from.column_offset
Need this to eq OoxmlParser::OoxmlSize.new(72000, :emu)
And also for xlsx.worksheets.first.drawings.first.position.from.row_offset

Font style of cells test is wrong

GetTextPr.docx
In first cell of table i see bold text, but ooxml object is not show it. In show text, but font style is wrong
docx.elements[1].rows.first.cells.first.elements.first.character_style_array[1].font_style.bold

table_width is parsed like a flout

SetStyle.docx
In example file, table_width is eq("percent", 100);.
But parser is return 8.818342151675486 number.
Need to return Ooxml size parser object with 100% value.
docx.elements[1].properties.table_width is a path

First page header is not exist in docx obj

RemoveHeader.docx
In first page header -

"This is page header #1. You will not see it, as it will be removed."

In second header -

"This is page header #2. Only this header can be seen, as the first one has been removed."

But docx.notes objecT (only one) has one element with second headers data.

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.