0.06
No release in over a year
Parse OOXML files (docx, xlsx, pptx)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

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