Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy_axlsx

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy_axlsx

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

EasyAxlsx

Build Status Dependency Status Code Climate Coverage Status

This is gem lets you generate axlsx object of an any class. Very easy. TODO: Description readme.

Installation

$ gem install easy_axlsx

or in your Gemfile

gem 'easy_axlsx'

Examples

class User
  include EasyAxlsx::ClassConfig
  attr_reader :id, :name, :last_name

  def initialize(args = {})
    @id = args.fetch(:id)
    @name = args.fetch(:name)
    @last_name = args.fetch(:last_name)
  end

  def second_name
  end

  as_easy_axlsx_fields :id, :name, :last_name # this is method names,which will be use as row info
  as_easy_axlsx_widths 1.5, 2.5, 3.5 # this is with column as pt
end

@row_items = (1...3).map { |i| User.new(id: i, name: "Name#{i}", last_name: "Last Name #{i}") } # create your object array

# and after build axlsx object
@axlsx_object = EasyAxlsx::Builder.build @row_items

# after you can save this axlsx object as xlsx file
@axlsx_object.package.serialize('simple.xlsx')

This code generate next xlsx file

Screen 1

FAQs

Package last updated on 11 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc