All Projects β†’ caxlsx β†’ Caxlsx

caxlsx / Caxlsx

Licence: mit
xlsx generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Caxlsx

Dry View
Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
Stars: ✭ 124 (-43.89%)
Mutual labels:  ruby-gem
Ruby Macho
πŸ”© A pure-Ruby library for parsing Mach-O files.
Stars: ✭ 153 (-30.77%)
Mutual labels:  ruby-gem
Discogs
A Ruby wrapper of the Discogs.com API
Stars: ✭ 195 (-11.76%)
Mutual labels:  ruby-gem
Machine Learning With Ruby
Curated list: Resources for machine learning in Ruby
Stars: ✭ 1,693 (+666.06%)
Mutual labels:  ruby-gem
Screen Recorder
A Ruby gem to video record and take screenshots of your desktop or specific application window. Works on Windows, Linux, and macOS.
Stars: ✭ 135 (-38.91%)
Mutual labels:  ruby-gem
Draftsman
Ruby gem that lets you create draft versions of your database records.
Stars: ✭ 159 (-28.05%)
Mutual labels:  ruby-gem
Mailjet Gem
[API v3] Mailjet official Ruby GEM
Stars: ✭ 119 (-46.15%)
Mutual labels:  ruby-gem
Jekyll Minifier
Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
Stars: ✭ 215 (-2.71%)
Mutual labels:  ruby-gem
Necromancer
Conversion from one object type to another with a bit of black magic.
Stars: ✭ 136 (-38.46%)
Mutual labels:  ruby-gem
No Style Please
A (nearly) no-CSS, fast, minimalist Jekyll theme.
Stars: ✭ 192 (-13.12%)
Mutual labels:  ruby-gem
So Simple Theme
A simple Jekyll theme for words and pictures.
Stars: ✭ 1,701 (+669.68%)
Mutual labels:  ruby-gem
Pages Gem
A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
Stars: ✭ 1,670 (+655.66%)
Mutual labels:  ruby-gem
Tty Table
A flexible and intuitive table generator
Stars: ✭ 161 (-27.15%)
Mutual labels:  ruby-gem
Tty Pie
Draw pie charts in your terminal window
Stars: ✭ 125 (-43.44%)
Mutual labels:  ruby-gem
Tty
Toolkit for developing sleek command line apps.
Stars: ✭ 2,329 (+953.85%)
Mutual labels:  ruby-gem
Editorial Jekyll Theme
A Jekyll version of the "Editorial" theme by HTML5 UP.
Stars: ✭ 121 (-45.25%)
Mutual labels:  ruby-gem
Rorvswild
Ruby on Rails app monitoring: performances & exceptions insights for rails developers.
Stars: ✭ 159 (-28.05%)
Mutual labels:  ruby-gem
Filestack Rails
Official Ruby on Rails plugin for Filestack File Picker that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
Stars: ✭ 220 (-0.45%)
Mutual labels:  ruby-gem
Email address
The EmailAddress Gem to work with and validate email addresses.
Stars: ✭ 199 (-9.95%)
Mutual labels:  ruby-gem
Oscailte
Oscailte β€” A powerful light, clean, and responsive Jekyll theme.
Stars: ✭ 178 (-19.46%)
Mutual labels:  ruby-gem

Caxlsx (Community Continued Version)

Build Status Gem Version Total downloads Downloads for 3.0.4 (latest)

Notice: Community Axlsx Organization

To better maintain the Axlsx ecosystem, all related gems have been forked or moved to the following community organization:

http://github.com/caxlsx

Join the Caxlsx Slack channel

Synopsis

Axlsx is an Office Open XML Spreadsheet generator for the Ruby programming language. With Axlsx you can create excel worksheets with charts, images (with links), automated and fixed column widths, customized styles, functions, tables, conditional formatting, print options, comments, merged cells, auto filters, file and stream serialization as well as full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification.

Screen 1

Feature List

  1. Author xlsx documents: Caxlsx is made to let you easily and quickly generate professional xlsx based reports that can be validated before serialization.

  2. Generate 3D Pie, Line, Scatter and Bar Charts: With Caxlsx chart generation and management is as easy as a few lines of code. You can build charts based off data in your worksheet or generate charts without any data in your sheet at all. Customize gridlines, label rotation and series colors as well.

  3. Custom Styles: With guaranteed document validity, you can style borders, alignment, fills, fonts, and number formats in a single line of code. Those styles can be applied to an entire row, or a single cell anywhere in your workbook.

  4. Automatic type support: Caxlsx will automatically determine the type of data you are generating. In this release Float, Integer, String, Date, Time and Boolean types are automatically identified and serialized to your spreadsheet.

  5. Automatic and fixed column widths: Caxlsx will automatically determine the appropriate width for your columns based on the content in the worksheet, or use any value you specify for the really funky stuff.

  6. Support for automatically formatted 1904 and 1900 epochs configurable in the workbook.

  7. Add jpg, gif and png images to worksheets with hyperlinks

  8. Reference cells in your worksheet with "A1" and "A1:D4" style references or from the workbook using "Sheet1!A3:B4" style references

  9. Cell level style overrides for default and customized style objects

  10. Support for formulas, merging, row and column outlining as well as cell level input data validation.

  11. Auto filtering tables with worksheet.auto_filter as well as support for Tables

  12. Export using shared strings or inline strings so we can inter-op with iWork Numbers (sans charts for now).

  13. Output to file or StringIO

  14. Support for page margins and print options

  15. Support for password and non password based sheet protection.

  16. First stage interoperability support for GoogleDocs, LibreOffice, and Numbers

  17. Support for defined names, which gives you repeated header rows for printing.

  18. Data labels for charts as well as series color customization.

  19. Support for sheet headers and footers

  20. Pivot Tables

  21. Page Breaks

Install

gem 'caxlsx'

Usage

Here's a teaser that kicks about 2% of what the gem can do.

Axlsx::Package.new do |p|
  p.workbook.add_worksheet(:name => "Pie Chart") do |sheet|
    sheet.add_row ["Simple Pie Chart"]
    %w(first second third).each { |label| sheet.add_row [label, rand(24)+1] }
    sheet.add_chart(Axlsx::Pie3DChart, :start_at => [0,5], :end_at => [10, 20], :title => "example 3: Pie Chart") do |chart|
      chart.add_series :data => sheet["B2:B4"], :labels => sheet["A2:A4"],  :colors => ['FF0000', '00FF00', '0000FF']
    end
  end
  p.serialize('simple.xlsx')
end

Please see the examples folder for further information on what you can do with this gem Chances are that it has already been implemented. If it hasn't, let's take a look at adding it in.

Documentation

Detailed documentation is available at:

https://www.rubydoc.info/gems/caxlsx/

Additional documentation is listed below:

⚠ Please do not create issues for questions regarding the usage of axlsx / caxlsx. Look through this README, the examples, and the FAQ, and also check questions tagged axlsx on Stack Overflow.

Feel free to add your question (including an answer!) to the FAQ if you think it is of general interest.

Plugins, Integrations, and Extensions

Currently the following additional gems are available:

  • acts_as_caxlsx
    • Provides simple ActiveRecord integration
  • caxlsx_rails
    • Provides a .axlsx renderer to Rails so you can move all your spreadsheet code from your controller into view files.
  • activeadmin-caxlsx
    • An Active Admin plugin that includes DSL to create downloadable reports.
  • axlsx_styler
    • Allows you to build clean and maintainable styles for your axlsx spreadsheets. Build your spreadsheeet with data and then apply styles later.

Known Software Interoperability Issues

As axslx implements the Office Open XML (ECMA-376 spec) much of the functionality is interoperable with other spreadsheet software. Below is a listing of some known issues.

  1. Libre Office

    • You must specify colors for your series. see examples/chart_colors.rb for an example.
    • You must use data in your sheet for charts. You cannot use hard coded values.
    • Chart axis and gridlines do not render. I have a feeling this is related to themes, which axlsx does not implement at this time.
  2. Google Docs

    • Images are known to not work with google docs
    • border colors do not work
  3. Apple Numbers

    • charts do not render
    • you must set 'use_shared_strings' to true. This is most conveniently done just before rendering by calling Package.use_shared_strings = true prior to serialization.
p = Axlsx::Package.new
p.workbook.add_worksheet(:name => "Basic Worksheet") do |sheet|
  sheet.add_row ["First Column", "Second", "Third"]
  sheet.add_row [1, 2, 3]
end
p.use_shared_strings = true
p.serialize('simple.xlsx')

Known Bugs

There’s a list of known bugs. (If you want to contribute to caxlsx, this is a good place to start!)

Contributing

See CONTRIBUTING.md

Credits

Originally created by Randy Morgan - @randym

Forked in 2019, to enable the community to maintain the Axlsx ecosystem - http://github.com/caxlsx

Open source software is a community effort. None of this could have been done without the help of our Contributors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].