Sha256: 54161ce9ddd72590b370d7b56f7790c4d16289e7a501279021431df48086ce8a

Contents?: true

Size: 1.31 KB

Versions: 3

Compression:

Stored size: 1.31 KB

Contents

#include <ruby.h>
#include <xlsxwriter.h>
#include "chart.h"
#include "format.h"
#include "rich_string.h"
#include "workbook.h"
#include "workbook_properties.h"
#include "worksheet.h"

VALUE mXlsxWriter;
VALUE rbLibVersion;
VALUE eXlsxWriterError;

/*  Document-module: XlsxWriter
 *
 *  XlsxWriter is a ruby interface to libxlsxwriter.
 *
 *  It provides a couple of useful shorthands (like being able to pass cells and
 *  ranges as both numbers, cell strings and range strings.
 *
 *  It also has column authowidth functionality partially taken from Axlsx gem
 *  enabled by default.
 *
 *  Simple example of using the XlsxWriter to generate an xlsx file containing
 *  'Hello' string in the first rows of column 'A':
 *
 *     XlsxWriter::Workbook.open('/tmp/text.xlsx') do |wb|
 *       ws.add_worksheet do |ws|
 *         10.times { |i| ws.add_row ['Hello!'] }
 *       end
 *     end
 */
void Init_xlsxwriter() {
  mXlsxWriter = rb_define_module("XlsxWriter");
  rbLibVersion = rb_str_new_cstr(lxw_version());
  rb_define_const(mXlsxWriter, "LIBRARY_VERSION", rbLibVersion);
  eXlsxWriterError = rb_const_get(mXlsxWriter, rb_intern("Error"));

  init_xlsxwriter_workbook();
  init_xlsxwriter_workbook_properties();
  init_xlsxwriter_format();
  init_xlsxwriter_worksheet();
  init_xlsxwriter_chart();
  init_xlsxwriter_rich_string();
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xlsxwriter-0.2.1.pre ext/xlsxwriter/xlsxwriter.c
xlsxwriter-0.2.0 ext/xlsxwriter/xlsxwriter.c
xlsxwriter-0.2.0.pre.2 ext/xlsxwriter/xlsxwriter.c