Code Monkey home page Code Monkey logo

randym / axlsx Goto Github PK

View Code? Open in Web Editor NEW
2.6K 2.6K 697.0 9.62 MB

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.

License: MIT License

Ruby 100.00%

axlsx's Introduction

Hi there 👋

axlsx's People

Contributors

adammathys avatar agardiner avatar donv avatar janhuehne avatar joekain avatar jonathantron avatar josephhalter avatar jurriaan avatar noniq avatar ochko avatar olleolleolle avatar patorash avatar raiis avatar randym avatar ringe avatar sato-s avatar scambra avatar scpike avatar sdeframond avatar sduckett avatar shifakhan avatar sjaq avatar skateinmars avatar straydogstudio avatar tafryn avatar transoceanic2000 avatar waiting-for-dev avatar woto avatar wpeterson avatar zaccari 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  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  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

axlsx's Issues

add_row with "nil"

If I have got a long text in cell "A1" it floats into "B1" if "B1" is empty.

When I add a new row to my spreadsheet with:

sheet.add_row [ 'This is a very long text and should into the right cell', nil, 'xxx' ]

it does not float into the right neighboring cell.

Any ideas?

ENOENT error with xsd files referenced in lib/axlsx/util/constants.rb and repair warning

I'm not sure if this is a bug or if it's just me. I required axlsx in my rails 3 project, and Package::validate method did not work giving me the enoent error saying lib/schema/#{somefile}.xsd was not a file or directory. I went into the gem in .rvm and manually added the absolute dir path to each of these xsd constants. That fixed my error and validate worked.

So I think there is a bug when setting the xsd constants to relative paths.

Also, I'm using Mac excel 2011 and the latest axlsx gem 1.0.15. Everytime I create an xls file, it needs to be repaired. I looked into an earlier bug submission #1 about this. At least for me, the bug is still persisting.

Bug handling an empty row

this in in Worksheet.Col_Style. If a row is completely empty (no cells assigned), then @list = nil in SimpleTypedList. When the col_style routine executes, the statement "cells = r.cells[index]" results in cells being nil. The very next if clause crashes. I think an enclosing "unless cells.nil?" is required around the if clause.

    def col_style(index, style, options={})
      offset = options.delete(:row_offset) || 0
      @rows[(offset..-1)].each do |r| 
        cells = r.cells[index]
        if cells.is_a?(Array)
          cells.each { |c| c.style = style }
        else
          cells.style = style
        end
      end
    end

The logic leading into the above is as follows:

    @col_integer = s.add_style(:format_code=>' #,###,###')   #@col_integer is six
...
    ws.col_style 1,@col_integer  #set col 'b' format

Bug using .merge_cells ws.rows[i].cells

Given the following two statements:

    ws.merge_cells "A1:C1"
    ws.merge_cells ws.rows[i].cells[(1..3)]

Both statement reference the same row of cells. The first statement executes fine, no problems. The second statement raises the following exception if any of the referenced cell values is nil (empty cell).

    NoMethodError: undefined method `r' for nil:NilClass
    C:/Ruby/lib/ruby/gems/1.8/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:68:in `merge_cells'

Have a good one

package.use_shared_strings is very slow

Xlsx generation time changed from few minutes to several hours when I use this:

package.use_shared_strings = true

For my intuition it should make things faster. Isn't it?

Example not working correctly

Example didn't work at all because of the line p.validate.each { |e| puts e.message }
(undefined method `message' for #Hash:0x007f8dfa269118 (NoMethodError))

After removing that line example.rb runs great except when I open the resulting xlsx in excel I get the following error: 'Excel could not open example.xlsx because some content is unreadable'

And produces the following log file:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
      <logFileName>Repair Result to example 05025.xml</logFileName>
      <summary>Errors were detected in file 'Lion:Users:jurriaanpruis:axlsx:example.xlsx'</summary>
      <removedRecords summary="Following is a list of removed records:">
        <removedRecord>Removed Records: View from /xl/worksheets/sheet2.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet3.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet4.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet5.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet6.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet7.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet8.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet9.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet10.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet11.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet12.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet13.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet14.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet15.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet16.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet17.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet18.xml</removedRecord>
        <removedRecord>Removed Records: View from /xl/worksheets/sheet19.xml</removedRecord>
      </removedRecords>
      <repairedRecords summary="Following is a list of repairs:">
        <repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing3.xml (Drawing shape)</repairedRecord>
        <repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing5.xml (Drawing shape)</repairedRecord>
        <repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing6.xml (Drawing shape)</repairedRecord>
      </repairedRecords>
    </recoveryLog>

After repair I also see that the chinese characters are not displayed correctly.

Competing styles: cell vs row vs col

From what I gathered of the code, it appears you are taking care in handling "precedence" of styles. Meaning..styles applied to individual cells would take precedence over styles applied to rows. Cells have their styles and rows have their styles. Given the following:

    ws.rows[0..2].each {|row| row.cells[(0..2)].each {|cell| cell.style = @hdr_style} }
    ws.col_style(0,@wb.styles.add_style(:alignment=>{:horizontal =>:left}))

I expected the style applied at the cell level (first statement) to have precedence over that applied by the second statement (which is at the column level). What had happened was that the second statement replaced the styles set by the first statement. @hdr_style is blue background, bold, centered. All that was lost.

Am I understanding this correctly? Is there a potential problem here? I wish I had more time to dig into this myself, but the project that is relying on your technology is keeping me busy.
Thanks, dvn

Can't format datetime

style = workbook.styles.add_style(:sz=>11,
      :format_code=>"YYYY-MM-DD HH:MM:SS",
      :border=>Axlsx::STYLE_THIN_BORDER )

sheet.add_row(data, :style => style)

Then got something like this in my datetime columns:

40677.7438580363

already initialized constant VERSION

When I include axlsx in my rails 2.3.9 apps Gemfile it show warning at application startup:

 .bundle/ruby/1.8/bundler/gems/axlsx-960269a79271/lib/axlsx/version.rb:3: warning: already initialized constant VERSION

Validation failed with example.rb

Hello,

I'm giving a try to your gem (1.0.18) with Rub enterprise edition (1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [i686-darwin11.3.0], MBARI 0x6770, Ruby Enterprise Edition 2012.02) and ruby 1.9.3 (ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]), but the validations are failing:

>> require 'axlsx.rb'
=> []
>> 
?> p = Axlsx::Package.new
=> #<Axlsx::Package:0x110c7c4a8 @workbook=nil, @app=#<Axlsx::App:0x110c7c3e0>, @core=#<Axlsx::Core:0x110c7c408 @creator="axlsx">>
>> wb = p.workbook
=> #<Axlsx::Workbook:0x110c79690 @worksheets=#<Axlsx::SimpleTypedList:0x110c71da0 @locked_at=nil, @allowed_types=[Axlsx::Worksheet], @list=[], @serialize_as=nil>, @charts=#<Axlsx::SimpleTypedList:0x110c71cb0 @locked_at=nil, @allowed_types=[Axlsx::Chart], @list=[], @serialize_as=nil>, @images=#<Axlsx::SimpleTypedList:0x110c71c38 @locked_at=nil, @allowed_types=[Axlsx::Pic], @list=[], @serialize_as=nil>, @drawings=#<Axlsx::SimpleTypedList:0x110c71d78 @locked_at=nil, @allowed_types=[Axlsx::Drawing], @list=[], @serialize_as=nil>, @styles=#<Axlsx::Styles:0x110c79618 @fonts=#<Axlsx::SimpleTypedList:0x110c78b28 @locked_at=1, @allowed_types=[Axlsx::Font], @list=[#<Axlsx::Font:0x110c78a10 @sz=11, @name="Arial", @family=1>], @serialize_as="fonts">, @cellXfs=#<Axlsx::SimpleTypedList:0x110c744b0 @locked_at=3, @allowed_types=[Axlsx::Xf], @list=[#<Axlsx::Xf:0x110c743c0 @borderId=0, @fillId=0, @numFmtId=0, @fontId=0, @xfId=0>, #<Axlsx::Xf:0x110c738a8 @borderId=1, @fillId=0, @numFmtId=0, @fontId=0, @xfId=0>, #<Axlsx::Xf:0x110c72d40 @borderId=0, @applyNumberFormat=1, @fillId=0, @numFmtId=14, @fontId=0, @xfId=0>], @serialize_as="cellXfs">, @fills=#<Axlsx::SimpleTypedList:0x110c783f8 @locked_at=2, @allowed_types=[Axlsx::Fill], @list=[#<Axlsx::Fill:0x110c782e0 @fill_type=#<Axlsx::PatternFill:0x110c78308 @patternType=:none>>, #<Axlsx::Fill:0x110c77f98 @fill_type=#<Axlsx::PatternFill:0x110c78010 @patternType=:gray125>>], @serialize_as="fills">, @cellStyles=#<Axlsx::SimpleTypedList:0x110c74be0 @locked_at=1, @allowed_types=[Axlsx::CellStyle], @list=[#<Axlsx::CellStyle:0x110c74ac8 @name="Normal", @builtinId=0, @xfId=0>], @serialize_as="cellStyles">, @numFmts=#<Axlsx::SimpleTypedList:0x110c79578 @locked_at=2, @allowed_types=[Axlsx::NumFmt], @list=[#<Axlsx::NumFmt:0x110c794b0 @formatCode="yyyy/mm/dd", @numFmtId=100>, #<Axlsx::NumFmt:0x110c78fb0 @formatCode="yyyy/mm/dd hh:mm:ss", @numFmtId=101>], @serialize_as="numFmts">, @cellStyleXfs=#<Axlsx::SimpleTypedList:0x110c755e0 @locked_at=1, @allowed_types=[Axlsx::Xf], @list=[#<Axlsx::Xf:0x110c754f0 @borderId=0, @fillId=0, @numFmtId=0, @fontId=0>], @serialize_as="cellStyleXfs">, @tableStyles=#<Axlsx::TableStyles:0x110c71dc8 @locked_at=0, @allowed_types=[Axlsx::TableStyle], @list=[], @defaultPivotStyle="PivotStyleLight16", @defaultTableStyle="TableStyleMedium9", @serialize_as=nil>, @dxfs=#<Axlsx::SimpleTypedList:0x110c71f08 @locked_at=0, @allowed_types=[Axlsx::Xf], @list=[], @serialize_as="dxfs">, @borders=#<Axlsx::SimpleTypedList:0x110c77cc8 @locked_at=2, @allowed_types=[Axlsx::Border], @list=[#<Axlsx::Border:0x110c77c50 @prs=#<Axlsx::SimpleTypedList:0x110c77b88 @locked_at=nil, @allowed_types=[Axlsx::BorderPr], @list=[], @serialize_as=nil>>, #<Axlsx::Border:0x110c77a48 @prs=#<Axlsx::SimpleTypedList:0x110c779f8 @locked_at=nil, @allowed_types=[Axlsx::BorderPr], @list=[#<Axlsx::BorderPr:0x110c775e8 @name=:left, @style=:thin, @color=#<Axlsx::Color:0x110c778b8 @rgb="FF000000">>, #<Axlsx::BorderPr:0x110c76d28 @name=:right, @style=:thin, @color=#<Axlsx::Color:0x110c76ff8 @rgb="FF000000">>, #<Axlsx::BorderPr:0x110c76468 @name=:top, @style=:thin, @color=#<Axlsx::Color:0x110c76738 @rgb="FF000000">>, #<Axlsx::BorderPr:0x110c75ba8 @name=:bottom, @style=:thin, @color=#<Axlsx::Color:0x110c75e78 @rgb="FF000000">>], @serialize_as=nil>>], @serialize_as="borders">>>
>> 
?> p.validate.each { |e| puts e.message }
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.relationships+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/vnd.openxmlformats-package.relationships+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.core-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-package.core-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.
Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.
=> [#<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.relationships+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/vnd.openxmlformats-package.relationships+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.core-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-package.core-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�\(\)<>@,;:\\"/\[\]\?=\{\}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*"))))*)'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>]

Maybe I missed something but I can't see it.
Could you please help me?

Thanks

JRuby RMagic undefined_symbol: rb_framce_last_func

@randym

System details:

mazhout:sb/ (master✗) $ uname -a 
Linux mazhout 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

mazhout:sb/ (master✗) $ jruby -v
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK Server VM 1.6.0_20) [linux-i386-java]

mazhout:sb/ (master✗) $ jruby -S gem list rmagick

*** LOCAL GEMS ***

rmagick (2.13.1)
rmagick4j (0.3.7)

Image Magic is installed. but I still have the following error using the console:

>> require 'axlsx'
=> []
>> 
?> p = Axlsx::Package.new
=> #<Axlsx::Package:0x1d5c103 @app=#<Axlsx::App:0xd95e69>, @workbook=nil, @core=#<Axlsx::Core:0xc569fd @creator="axlsx">>
>> wb = p.workbook
=> #<Axlsx::Workbook:0x895972 @charts=#<Axlsx::SimpleTypedList:0x14f840f @locked_at=nil, @list=[], @allowed_types=[Axlsx::Chart], @serialize_as=nil>, @tables=#<Axlsx::SimpleTypedList:0x890a59 @locked_at=nil, @list=[], @allowed_types=[Axlsx::Table], @serialize_as=nil>, @worksheets=#<Axlsx::SimpleTypedList:0x65d075 @locked_at=nil, @list=[], @allowed_types=[Axlsx::Worksheet], @serialize_as=nil>, @images=#<Axlsx::SimpleTypedList:0x1edf119 @locked_at=nil, @list=[], @allowed_types=[Axlsx::Pic], @serialize_as=nil>, @styles=#<Axlsx::Styles:0x1aaa07f @fills=#<Axlsx::SimpleTypedList:0x10f0424 @locked_at=2, @list=[#<Axlsx::Fill:0x1338621 @fill_type=#<Axlsx::PatternFill:0x1ab0c3a @patternType=:none>>, #<Axlsx::Fill:0xafc935 @fill_type=#<Axlsx::PatternFill:0xc2c549 @patternType=:gray125>>], @allowed_types=[Axlsx::Fill], @serialize_as="fills">, @tableStyles=#<Axlsx::TableStyles:0xc12ae3 @locked_at=0, @defaultTableStyle="TableStyleMedium9", @list=[], @serialize_as=nil, @allowed_types=[Axlsx::TableStyle], @defaultPivotStyle="PivotStyleLight16">, @cellStyles=#<Axlsx::SimpleTypedList:0x869739 @locked_at=1, @list=[#<Axlsx::CellStyle:0x14fa707 @builtinId=0, @name="Normal", @xfId=0>], @allowed_types=[Axlsx::CellStyle], @serialize_as="cellStyles">, @cellStyleXfs=#<Axlsx::SimpleTypedList:0x1c88831 @locked_at=1, @list=[#<Axlsx::Xf:0x18b628 @fontId=0, @fillId=0, @numFmtId=0, @borderId=0>], @allowed_types=[Axlsx::Xf], @serialize_as="cellStyleXfs">, @fonts=#<Axlsx::SimpleTypedList:0x1a9dbac @locked_at=1, @list=[#<Axlsx::Font:0x9e31f0 @name="Arial", @family=1, @sz=11>], @allowed_types=[Axlsx::Font], @serialize_as="fonts">, @numFmts=#<Axlsx::SimpleTypedList:0x275a2e @locked_at=2, @list=[#<Axlsx::NumFmt:0x15f0269 @numFmtId=100, @formatCode="yyyy/mm/dd">, #<Axlsx::NumFmt:0x976434 @numFmtId=101, @formatCode="yyyy/mm/dd hh:mm:ss">], @allowed_types=[Axlsx::NumFmt], @serialize_as="numFmts">, @cellXfs=#<Axlsx::SimpleTypedList:0x2fbdd3 @locked_at=3, @list=[#<Axlsx::Xf:0x15a95c3 @fontId=0, @fillId=0, @xfId=0, @numFmtId=0, @borderId=0>, #<Axlsx::Xf:0x1e54ad @fontId=0, @fillId=0, @xfId=0, @numFmtId=0, @borderId=1>, #<Axlsx::Xf:0x1492cfe @fontId=0, @applyNumberFormat=1, @fillId=0, @xfId=0, @numFmtId=14, @borderId=0>], @allowed_types=[Axlsx::Xf], @serialize_as="cellXfs">, @borders=#<Axlsx::SimpleTypedList:0xe489c6 @locked_at=2, @list=[#<Axlsx::Border:0x4e2837 @prs=#<Axlsx::SimpleTypedList:0x1326f8f @locked_at=nil, @list=[], @allowed_types=[Axlsx::BorderPr], @serialize_as=nil>>, #<Axlsx::Border:0x1fa6c48 @prs=#<Axlsx::SimpleTypedList:0x1daed02 @locked_at=nil, @list=[#<Axlsx::BorderPr:0x7fafa4 @style=:thin, @color=#<Axlsx::Color:0xe43d5e @rgb="FF000000">, @name=:left>, #<Axlsx::BorderPr:0x7909a7 @style=:thin, @color=#<Axlsx::Color:0x68e679 @rgb="FF000000">, @name=:right>, #<Axlsx::BorderPr:0xf3360c @style=:thin, @color=#<Axlsx::Color:0x1615685 @rgb="FF000000">, @name=:top>, #<Axlsx::BorderPr:0x1775e79 @style=:thin, @color=#<Axlsx::Color:0x1db9b4f @rgb="FF000000">, @name=:bottom>], @allowed_types=[Axlsx::BorderPr], @serialize_as=nil>>], @allowed_types=[Axlsx::Border], @serialize_as="borders">, @dxfs=#<Axlsx::SimpleTypedList:0x68d91 @locked_at=0, @list=[], @allowed_types=[Axlsx::Xf], @serialize_as="dxfs">>, @use_autowidth=true, @drawings=#<Axlsx::SimpleTypedList:0x73c8a9 @locked_at=nil, @list=[], @allowed_types=[Axlsx::Drawing], @serialize_as=nil>>
>> wb.add_worksheet(:name => "Basic Worksheet") do |sheet|
?>   sheet.add_row ["First Column", "Second", "Third"]
>>   sheet.add_row [1, 2, 3]
>> end
LoadError: load error: RMagick2 -- java.lang.UnsatisfiedLinkError: /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.so: undefined symbol: rb_frame_last_func
from org/jruby/RubyKernel.java:1033:in `require'
from /usr/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:182:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:546:in `new_constants_in'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:182:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:11:in `(root)'
from org/jruby/RubyKernel.java:1033:in `require'
from /usr/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:182:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:546:in `new_constants_in'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/dependencies.rb:182:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:109:in `initialize'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/axlsx-1.1.0/lib/axlsx/workbook/workbook.rb:156:in `add_worksheet'
from (irb):5:in `evaluate'
from org/jruby/RubyKernel.java:1083:in `eval'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1183:in `catch'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1183:in `catch'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:70:in `start'
from /usr/lib/jruby/bin/jirb:13:in `(root)'>> 

Apply multiple styles

A way to apply multiple styles to the same cell. To encourage style reuse and not duplication when there are several orthangonal styles which need to be applied. My example was I wanted a yellow background to highlight rows which were updated since the last report. This is in addition to any other styles that are applied to all the rows.

Also would be ideal if the styling could be in a separate file (maybe a view)? Kind of like css.

How to add a hyperlink to an image?

Hi Randy,

Axlsx is great. Thanks a lot for the 2 great gems.

Is there any way to attach a hyperlink to an image?
It seems like apart from this it has everything I need now for an urgent project.
I managed to add a hyperlink using "=HYPERLINK" and I managed to add an image to the same cell but the hyperlink is next to the image and not on it.
Using excel attaching a hyperlink to an image is possible.

Any ideas here will be very greatly appreciated.

Best,
Elisha Klein

Implement additional row properties

For the following, attribute: skip || investigate || do
collapsed: skip
customFormat: investigate
customHeight: do
hidden: do
ht (height): do
outlineLevel: skip
ph: skip
s (style): do
spans: investigate
thickTop: skip
thickBottom: skip

behaviors acting on Axlsx::Color

Slick Library! Thank you.

The implementation of Color is confusing to me. For example, it feels intuitive for one to code up his/her style colors upfront in a class, such as the following constant, and then use that constant in multiple places.

class AAN_Excel
  COLOR_HEADER_BACKGROUND = Axlsx::Color.new(:rgb=>"FF99CCFF")

Once constructed, the style building would act on the class instance and react according. For example:

def construct_styles(wb)
  wb.styles {|s|
    @hdr_style = s.add_style( :bg_color => COLOR_HEADER_BACKGROUND )
  }

I implemented the above in ./lib/axlsx/stylesheet/styles.rb as:

  fill = if options[:bg_color]
           color = options[:bg_color].class == Axlsx::Color ? options[:bg_color] : Color.new(:rgb=>options[:bg_color])
           pattern = PatternFill.new(:patternType =>:solid, :fgColor=>color)
           fills << Fill.new(pattern)   
         else
           0
         end

It would be nice if Axlsx::Font could be acted on the same way. This would give the programmer the ability do define all the color and font instances as constants, and then use those constants when multiple sheets are being structured.

Or am I off base...missing something I shouldn't?

Thanks for your time and consideration. I would code up suggested changes and submit them, but I do not know how. I've never done that before.

dvn

Add support for PrintOptions and PageSetup

First of all: Thanks for your great work! :)

I'd like to implement (partial) support for PrintOptions and PageSetup elements.

Personally I find the distinction between PrintOptions, PageSetup and PageMargins a bit strange (paper size is set in PageSetup, but margins are not …).

Should I stick closely to the ECMA spec and implement PrintOptions and PageSetup as distinct properties of Worksheet (Worksheet#print_options, Worksheet#page_setup), or would it be better to build kind of a high level interface (e.g. Worksheet#print_settings) that allows setting of page margins, paper size, centering etc. in one place?

date1904 being ignored by MS Excel

xl/worksheet.xml

In original generated xlsx(line breaks added and sheet names are changed):

<?xml version="1.0" encoding="UTF-8"?>
<workbook xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<workbookPr date1904="false"/>
<bookViews>
<workbookView activeTab="0"/>
</bookViews>
<sheets>
<sheet r:id="rId1" sheetId="1"   name="Sheet 1"/>
<sheet r:id="rId2" sheetId="2"   name="Sheet 2"/>
<sheet r:id="rId3" sheetId="3"   name="Sheet 3"/>
<sheet r:id="rId4" sheetId="4"   name="Sheet 4"/>
<sheet r:id="rId5" sheetId="5"   name="Sheet 5"/>
<sheet r:id="rId6" sheetId="6"   name="Sheet 6"/>
<sheet r:id="rId7" sheetId="7"   name="Sheet 7"/>
<sheet r:id="rId8" sheetId="8"   name="Sheet 8"/>
<sheet r:id="rId9" sheetId="9"   name="Sheet 9"/>
<sheet r:id="rId10" sheetId="10" name="Sheet 10"/>
<sheet r:id="rId11" sheetId="11" name="Sheet 11"/>
<sheet r:id="rId12" sheetId="12" name="Sheet 12"/>
<sheet r:id="rId13" sheetId="13" name="Sheet 13"/>
<sheet r:id="rId14" sheetId="14" name="Sheet 14"/>
<sheet r:id="rId15" sheetId="15" name="Sheet 15"/>
<sheet r:id="rId16" sheetId="16" name="Sheet 16"/>
<sheet r:id="rId17" sheetId="17" name="Sheet 17"/>
<sheet r:id="rId18" sheetId="18" name="Sheet 18"/>
<sheet r:id="rId19" sheetId="19" name="Sheet 19"/>
</sheets>
</workbook>

After openining in MS Excel and saving:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<fileVersion appName="xl" lastEdited="4" lowestEdited="4" rupBuild="4506"/>
<workbookPr defaultThemeVersion="124226"/>
<bookViews>
<workbookView xWindow="570" yWindow="510" windowWidth="18015" windowHeight="10125"/>
</bookViews>
<sheets>
<sheet name="Sheet 1" sheetId="1" r:id="rId1"/>
<sheet name="Sheet 2" sheetId="2" r:id="rId2"/>
<sheet name="Sheet 3" sheetId="3" r:id="rId3"/>
<sheet name="Sheet 4" sheetId="4" r:id="rId4"/>
<sheet name="Sheet 5" sheetId="5" r:id="rId5"/>
<sheet name="Sheet 6" sheetId="6" r:id="rId6"/>
<sheet name="Sheet 7" sheetId="7" r:id="rId7"/>
<sheet name="Sheet 8" sheetId="8" r:id="rId8"/>
<sheet name="Sheet 9" sheetId="9" r:id="rId9"/>
<sheet name="Sheet 10" sheetId="10" r:id="rId10"/>
<sheet name="Sheet 11" sheetId="11" r:id="rId11"/>
<sheet name="Sheet 12" sheetId="12" r:id="rId12"/>
<sheet name="Sheet 13" sheetId="13" r:id="rId13"/>
<sheet name="Sheet 14" sheetId="14" r:id="rId14"/>
<sheet name="Sheet 15" sheetId="15" r:id="rId15"/>
<sheet name="Sheet 16" sheetId="16" r:id="rId16"/>
<sheet name="Sheet 17" sheetId="17" r:id="rId17"/>
<sheet name="Sheet 18" sheetId="18" r:id="rId18"/>
<sheet name="Sheet 19" sheetId="19" r:id="rId19"/>
</sheets>
<calcPr calcId="114210"/>
</workbook>

As you can see there is no date1904 now.

MS Office user said:

Date and times are fine when I do Ctrl+C and Ctrl+V.
But when I copy and paste using right click menu, it still shows strange date.

Is it expected behavior of MS Excel?

Merging/formatting cells past end of row

Given the following:

    ws.add_row [nil,nil,nil,nil,nil,nil,nil,'Carrier Route Discount',nil]
    ws.add_row [nil,nil,nil,nil,nil,nil,nil,'Additional Book Cost',nil]
    ws.add_row [[@prj.client,'#'+@prj.proj,@prj.deptrun].join('.') + Time.now.strftime(" %Y/%m/%d %H:%M")]
    ...
    (0..2).each {|i| ws.merge_cells ws.rows[i].cells[0..4] }

When the merge_cells executes, it merges columns A..E just fine for the first two rows. However, it fails to do so for the final row. Columns B..E do not merge because those rows do not contain populated cell instances for those columns. This affects styles, as well.

Something needs to be documented about this. It took a while to figure out.

The only solution to this, which I dread even saying, is that the system would need to keep a perfect square of columns populated. If a row is created that has more cells than previous, then the previous ones would need to be filled.

Another possible solution would be to have functions that are sensitive to columns to fill them in. If the function says columns 3..7 when only five cells exist in the row, then the remaining two fields would be created by the function, filling in the need.

While I don't admire either approach, I think the system needs to intelligently respond to the missing cells. Systems are going to use this product to generated stuff on the fly. Reports and stuff will come out looking funny.

Auto-height

Axlsx has support for autowidth, but what do you think about auto height?, for columns containing multiple rows of text.

Can the line chart y axis use a logarithmic scale?

Hello Randy,
This looks very interesting. I would like to display the line charts using a logarithmic Y axis scale. Can that be done? If you show me how, I am willing to give it a shot. My Excel knowledge is minimal though.
Thanks.
Bharat

Axlsx doesn't escape strings properly

If i run the following code on axlsx master, excel gives an error. looking at the source, the ampersand isn't escaped properly

require 'axlsx'
package = Axlsx::Package.new
wb = package.workbook
wb.date1904 = false
sheet = package.workbook.add_worksheet(:name => "test")

sheet.add_row ['a','b',"&crash"]
package.serialize 'test.xlsx'

unable to input text "001"

I've been trying to input string "001" into a cell but axlsx converts "001" into "1".
setting column format to text doesn't seem to work.
How can I add values like "001" or "0003"?

Repair warnings from Excel

When creating a spreadsheet with this gem, I get a repair warning from Excel for Mac 2011, Version 14.1.3 (110805),
the same that you get when you have a corrupted xlsx document. Here is the repair log from Excel:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">

  <logFileName>Repair Result to example1 00854.xml</logFileName>
  <summary>Errors were detected in file 'Macintosh
  HD:Users:tim:src:axlsx:example1.xlsx'</summary>
  <additionalInfo>
    <info>Excel completed file level validation and repair. Some
    parts of this workbook may have been repaired or
    discarded.</info>
  </additionalInfo>
  <repairedRecords summary="Following is a list of repairs:">
    <repairedRecord>Repaired Records: Cell information from
    /xl/worksheets/sheet1.xml</repairedRecord>
  </repairedRecords>
</recoveryLog>

The repaired document appears to have all the correct data, though.

Here is a diff of the two sheet1.xml files pre and post repair follows:

1,2c1,15
< <?xml version="1.0" encoding="UTF-8"?>
< <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">

---
> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
> <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
> xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
> xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
> mc:Ignorable="x14ac"
> xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
> 
>   <dimension ref="A1:C2" />
>   <sheetViews>
>     <sheetView tabSelected="1" workbookViewId="0">
>       <selection activeCell="D7" sqref="D7" />
>     </sheetView>
>   </sheetViews>
>   <sheetFormatPr baseColWidth="10" defaultRowHeight="15"
>   x14ac:dyDescent="0" />
4,6c17,19
<     <col min="1" max="1" width="4.25" customWidth="true"/>
<     <col min="2" max="2" width="10.25" customWidth="true"/>
<     <col min="3" max="3" width="25.25" customWidth="true"/>

---
>     <col min="1" max="1" width="4.28515625" customWidth="1" />
>     <col min="2" max="2" width="10.28515625" customWidth="1" />
>     <col min="3" max="3" width="25.28515625" customWidth="1" />
9,32c22,30
<     <row r="1">
<       <c r="A1" s="0">
<         <is>
<           <r>
<             <rPr/>
<             <t>First</t>
<           </r>
<         </is>
<       </c>
<       <c r="B1" s="0">
<         <is>
<           <r>
<             <rPr/>
<             <t>Second</t>
<           </r>
<         </is>
<       </c>
<       <c r="C1" s="0">
<         <is>
<           <r>
<             <rPr/>
<             <t>Third</t>
<           </r>
<         </is>

---
>     <row r="1" spans="1:3" ht="13">
>       <c r="A1" t="s">
>         <v>0</v>
>       </c>
>       <c r="B1" t="s">
>         <v>1</v>
>       </c>
>       <c r="C1" t="s">
>         <v>2</v>
35,36c33,34
<     <row r="2">
<       <c r="A2" s="0">

---
>     <row r="2" spans="1:3" ht="13">
>       <c r="A2">
39c37
<       <c r="B2" s="0">

---
>       <c r="B2">
42,43c40,41
<       <c r="C2" s="2">
<         <v>40881.18424629247</v>

---
>       <c r="C2" s="1">
>         <v>40881.184246292469</v>
46a45,53
>   <pageMargins left="0.75" right="0.75" top="1" bottom="1"
>   header="0.5" footer="0.5" />
>   <extLst>
>     <ext uri="{64002731-A6B0-56B0-2670-7721B7C09600}"
>     xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main">
> 
>       <mx:PLV Mode="0" OnePage="0" WScale="0" />
>     </ext>
>   </extLst>

Files example1/xl/workbook.xml and example1-repaired/xl/workbook.xml differ significantly:

1,6c1,23
< <?xml version="1.0" encoding="UTF-8"?>
< <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
< <workbookPr date1904="false"/>
< <sheets>
< <sheet name="Sheet1" sheetId="1" r:id="rId1"/>
< </sheets>

---
> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
> <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
> xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
> 
>   <fileVersion appName="xl" lastEdited="5" lowestEdited="5"
>   rupBuild="21405" />
>   <workbookPr autoCompressPictures="0" />
>   <bookViews>
>     <workbookView xWindow="0" yWindow="440" windowWidth="25600"
>     windowHeight="15620" tabRatio="500" />
>   </bookViews>
>   <sheets>
>     <sheet name="Sheet1" sheetId="1" r:id="rId1" />
>   </sheets>
>   <calcPr calcId="0" concurrentCalc="0" />
>   <fileRecoveryPr repairLoad="1" />
>   <extLst>
>     <ext uri="{7523E5D3-25F3-A5E0-1632-64F254C22452}"
>     xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main">
> 
>       <mx:ArchID Flags="2" />
>     </ext>
>   </extLst>

Additionally, Excel adds a few files:

Only in example1-repaired/docProps: core0.xml
Only in example1-repaired/xl: sharedStrings.xml
Only in example1-repaired/xl: theme

Any ideas on what's up and how we can get rid of the warning?

I'm on OS X Lion, with the default libxml (not libxml2 via homebrew) and in a gemset using the gems outlined in the axlsx gem's Gemfile. I also am using ruby-1.9.3-p0 but encountered the same issues under ree-1.8.7-2011.03

Here are the files I tested:

Cannot get windows gem to install on windows

I'm really looking forward to using your library, but I cannot get it to install. Your assistance is very much appreciated.

I have rmagick installed as evidenced by:

D:\Ruby\Projects\AAN\lib\bin>gem list rm
*** LOCAL GEMS ***
rmagick (2.12.0 mswin32)

But when attempt to install your gem, I get this blasted message.

D:\Ruby\Projects\AAN\lib\bin>gem install axlsx
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing axlsx:
        ERROR: Failed to build gem native extension.

        c:/ruby/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/ruby/bin/ruby


Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

ImageMagic is in the path, as evidenced here.

D:\Ruby\Projects\AAN\lib\bin>path
PATH=c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\pw\adm;c:\pw\pst;C:\PW\firstprep;c:\pw\ls;c:
\pw\ls\system;C:\Program Files\Common Files;C:\Program Files\Common Files\CMS Direct;C:\Program Files\Common Files\First
logic;C:\Program Files\Common Files\Business Objects\License Manager;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Progr
am Files\Common Files\Group1\Runtime;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\devkit\bin;C:\devkit\mingw\m
ingw32\bin;C:\Program Files\ImageMagick-6.5.6-Q8;;C:\PW\rapid;

Serializing stream

How to serialize a stream? For example I want to serialize everything into StringIO object. ZipOutputStream have second parameter in initialize method for that kind of things. We can do something like:

def serialize(output, confirm_valid=false)
  # ...
  Zip::ZipOutputStream.send(output.is_a?(String) ? :open : :write_buffer) # and so on..

So it will be possible to use Package.new.serialize(StringIO.new(""))

More or less duplicate of #3

Implement Conditional Formatting for worksheet

18.3.1.10 cfRule (Conditional Formatting Rule)

<conditionalFormatting sqref="E3:E9">
  <cfRule type="cellIs" dxfId="0" priority="1" operator="greaterThan">
  <formula>0.5</formula> </cfRule>
</conditionalFormatting>

author is not available

p = Axlsx::Package.new(:author => 'Randy')

How can read an author name ? It seems there is no other way than

p.instance_variable_get('@core').creator

Would ne nice to have 'author' available on Package or Workbook or both.

Axlsx performance

Just did a quick benchmark to see how well axlsx performs..
Plain csv is 40 times faster than standard axlsx.. I think there's room for improvement ;)
Streaming is also faster than Package#serialize?

Results:

                           user     system      total        real
axlsx_noautowidth          7.730000   0.110000   7.840000 (  8.188405)
axlsx                      12.640000   0.260000  12.900000 ( 13.422525)
axlsx_shared               38.700000   0.300000  39.000000 ( 39.085976)
axlsx_stream               11.380000   0.180000  11.560000 ( 11.591120)
csv                        0.270000   0.020000   0.290000 (  0.336972)

Code:

#!/usr/bin/env ruby -s
# -*- coding: utf-8 -*-
$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'axlsx'
require 'csv'

require 'benchmark'
row = []
input = (32..126).to_a.pack('U*').chars.to_a
20.times { row << input.shuffle.join}
times = 1000
Benchmark.bm(100) do |x|
  x.report('axlsx_noautowidth') {
    p = Axlsx::Package.new
    wb = p.workbook

    #A Simple Workbook

    wb.add_worksheet do |sheet|
      times.times do 
        sheet << row
      end
    end
    p.use_autowidth = false
    p.serialize("example.xlsx")
  }
  x.report('axlsx') {
    p = Axlsx::Package.new
    wb = p.workbook

    #A Simple Workbook

    wb.add_worksheet do |sheet|
      times.times do 
        sheet << row
      end
    end
    p.serialize("example.xlsx")
  }

  x.report('axlsx_shared') {
    p = Axlsx::Package.new
    wb = p.workbook

    #A Simple Workbook

    wb.add_worksheet do |sheet|
      times.times do 
        sheet << row
      end
    end
    p.use_shared_strings = true
    p.serialize("example.xlsx")
  }

  x.report('axlsx_stream') {
    p = Axlsx::Package.new
    wb = p.workbook

    #A Simple Workbook

    wb.add_worksheet do |sheet|
      times.times do
        sheet << row
      end
    end

    s = p.to_stream()
    File.open('example_streamed.xlsx', 'w') { |f| f.write(s.read) }
  }
  x.report('csv') {
    CSV.open("example.csv", "wb") do |csv|
      times.times do 
        csv << row
      end
    end
  }
end

Example/tests uses installed version

The example uses the installed gem instead of the version in the current directory, I think it's better to use the version from the axlsx directory. Much easier for development :)

Test failures on master

  1. Failure:
    test_valid_document(TestContentType) [/Volumes/Macintosh HD/Data/scratch/axlsx/test/content_type/tc_content_type.rb:17]:
    [Content Types].xml Invalid["Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.relationships+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/vnd.openxmlformats-package.relationships+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.core-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-package.core-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'."].
    <12> expected but was
    <0>.

  2. Failure:
    test_to_xml(TestDefault) [/Volumes/Macintosh HD/Data/scratch/axlsx/test/content_type/tc_default.rb:35]:
    [Content Types].xml Invalid["Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'."].
    <2> expected but was
    <0>.

  3. Failure:
    test_to_xml(TestOverride) [/Volumes/Macintosh HD/Data/scratch/axlsx/test/content_type/tc_override.rb:35]:
    Override content type caused invalid content_type doc["Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}\u007F()<>@,;:\"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}\u007F"\n\r]]|(\s+))|(\[\p{IsBasicLatin}]))")))))'.", "Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'."].
    <2> expected but was
    <0>.

  4. Failure:
    test_validation(TestPackage) [/Volumes/Macintosh HD/Data/scratch/axlsx/test/tc_package.rb:46]:
    [#<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.relationships+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/vnd.openxmlformats-package.relationships+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': [facet 'pattern'] The value 'application/xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Default', attribute 'ContentType': 'application/xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.extended-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-package.core-properties+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-package.core-properties+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.drawing+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.drawing+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': [facet 'pattern'] The value 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml' is not accepted by the pattern '(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))((\s+);(\s+)(((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}�()<>@,;:"/[]?={}\s\t]])+)|("(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}�"\n\r]]|(\s+))|([\p{IsBasicLatin}]))")))))'.>, #<Nokogiri::XML::SyntaxError: Element '{http://schemas.openxmlformats.org/package/2006/content-types}Override', attribute 'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml' is not a valid value of the atomic type '{http://schemas.openxmlformats.org/package/2006/content-types}ST_ContentType'.>].
    <18> expected but was
    <0>.

308 tests, 932 assertions, 4 failures, 0 errors, 0 skips

Test run options: --seed 40506
rake aborted!
Command failed with status (1): [/Users/mike/.rvm/rubies/ruby-1.9.2-p290/bi...]

Phoenix-2 ruby-1.9.2-p290@axlsx ~/scratch/axlsx (master) $ gem list

*** LOCAL GEMS ***

activesupport (3.0.2)
i18n (0.6.0)
nokogiri (1.5.0)
rake (0.9.2, 0.8.7)
rmagick (2.13.1)
rubyzip (0.9.5)

NAMESPACE_ERR on XSD validataion on JRUBY

Java::OrgW3cDom::DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.

=> {"warnings"=>[], "nokogiri"=>"1.5.0", "ruby"=>{"version"=>"1.8.7", "platform"=>"java", "description"=>"jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]", "engine"=>"jruby", "jruby"=>"1.6.6"}}

Initial investigation leads me to think that core.rb#to_xml is at least one of the culprits!

Adding Background Fill on Cell Range

The examples show how to change color on a range:

sheet["A1:A5"].each { |c| c.color = "fcd5b5"}

But looking at the code it's unclear how to set a background fill in this way. Is this supported?

Nokogiri 1.5.1 breaks css selectors

Specs will fail with Nokogiri 1.5.1

  1. Error:
    test_drawings_and_charts_need_content_types(TestContentType):
    Nokogiri::XML::XPath::SyntaxError: Invalid expression: //xmlns:Types//xmlns:Override[@xmlns:@ContentType = 'application/vnd.openxmlformats-officedocument.drawing+xml']
    /Users/randym/.rvm/gems/ruby-1.9.3-p0@axlsx/gems/nokogiri-1.5.1/lib/nokogiri/xml/node.rb:159:in evaluate' /Users/randym/.rvm/gems/ruby-1.9.3-p0@axlsx/gems/nokogiri-1.5.1/lib/nokogiri/xml/node.rb:159:inblock in xpath'
    /Users/randym/.rvm/gems/ruby-1.9.3-p0@axlsx/gems/nokogiri-1.5.1/lib/nokogiri/xml/node.rb:150:in map' /Users/randym/.rvm/gems/ruby-1.9.3-p0@axlsx/gems/nokogiri-1.5.1/lib/nokogiri/xml/node.rb:150:inxpath'
    /Users/randym/.rvm/gems/ruby-1.9.3-p0@axlsx/gems/nokogiri-1.5.1/lib/nokogiri/xml/node.rb:214:in css' /Users/randym/Work/axlsx/test/content_type/tc_content_type.rb:74:intest_drawings_and_charts_need_content_types'

Guessing it is from the new namespaces css selectors.

Does not effect the gem, but 3 specs relying on .css now go boom

Serializing to any output

Here is how I'm going to use it:

p = Axlsx::Package.new

# Do a lot of fun with worksheets
#....
#....

# Time to persist but not in filesystem, maybe db?
begin
  tmpfile = Tempfile.new("temporary.xlsx")
  p.serialize tmpfile.path
  save(File.read(tmpfile.path)
ensure
  File.unlink(tmpfile.path)
end

Last begin ... ensure ... end block is a big messy. It would be nice it was able to write something like:

save(p.serialize)

Thanks

excel 2011 repairs

As reported by phongsi in issue #21

Splitting this off so I can manage it separately.

Also, I'm using Mac excel 2011 and the latest axlsx gem 1.0.15. Everytime I create an xls file, it needs to be repaired. I looked into an earlier bug submission #1 about this. At least for me, the bug is still persisting.

Numbers formatting

I was able to follow the code and the Class NumFmt and apply it to format the numbers in my spreadsheet. If I want to display numbers to more than 2 places after the decimal point (in my case 3), what is the best way of doing that?
Bharat

Need to ask questions - Create Google Group around axlsx?

Hello Randy,
I think this is a wonderful Gem fulfilling a practical requirement. I need to ask some basic questions and hate to open up an issue for it. I can do it if that does not bother you. But these questions are not centered around "issues" with the Gem itself but rather how to use it for solving our problems. Here is an example for a real question that I have:

Your blog post, the example.rb file and Readme file all use a Tempfile to create a temporary file object for streaming to user's browswer. I am using Heroku for my production environment which forbids writing of files to the server. I need a generic way to get around it for "axlsx". I do the following for writing a "CSV" file:

require 'csv'
csv_string  = CSV.generate do |csv|
  ... write to the csv_string using block variable csv
end

# send it to the browser
file_name = @type_well.name.gsub(/\s+/,'_') + ".csv"
send_data csv_string,
        :type => 'text/csv; charset=iso-8859-1; header=present',
        :disposition => "attachment; filename=#{file_name}"

Here, the @type_well is an instance variable with a name column (property).

Can something similar be done for streaming the file to user's browser WITHOUT writing a Tempfile since Heroku does not allow it?

Thanks.

Bharat

Is there a mechanism for specifying individual column widths

    (0..9).each{|col| col == 0 ? # set col width to 7 : # set col width to 13 }

That is basically what I want to do. The first five rows are headings, and include some cell mergers for title information. That title information is wide, so it screws up the column width calculation(s). The first three rows may only have three columns of data, where the remainder of the report has ten columns of data.

I would like to come back and force the column widths so the excel worksheet looks more natural, form-like. I haven't been able to find a mechanism for assigning the width values.

dvn

Can't figure out the issue exactly.

Hi,
I am not sure of the issue I am about to describe, but maybe as someone who knows the gem better this might make sense. Using version 1.0.15

When I create a single-worksheet workbook the file will open fine in excel and open-office (but with problems in Numbers). If I try to parse the file that was made with RubyXL it will blow up trying to open "sheet2.xml", even though the workbook.xml file appears to be valid:

<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<workbookPr date1904="false"/>
<sheets>
<sheet name="Sheet1" sheetId="1" r:id="rId1"/>
</sheets>
</workbook>

If I open the file in excel and re-save it both the RubyXL issue goes away and Numbers can open the file correctly. Since excel adds a bunch of other junk it is difficult to determine what change to the files is what fixes things.

This seems very odd since RubyXL tries to use the xml in workbook.xml properly (https://github.com/gilt/rubyXL/blob/master/lib/rubyXL/parser.rb#L384).

Anyway, not really an issue per-say, I will continue to investigate, but if you have any suggestions or direction about addressing this let me know.

Regards,
Erick Schmitt

Segmentation fault in rails app

Axlsx gem works fine inside irb session, but when I try to use it inside a rails app it reports segmentation fault.
I tried ruby-1.9.3-p0 but it does not help.

here is error messages

/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:311: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]

-- control frame ----------
c:0102 p:---- s:0529 b:0529 l:000528 d:000528 CFUNC :get_type_metrics
c:0101 p:0014 s:0525 b:0525 l:000510 d:000524 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:311
c:0100 p:---- s:0521 b:0521 l:000520 d:000520 FINISH
c:0099 p:---- s:0519 b:0519 l:000514 d:000518 IFUNC
c:0098 p:---- s:0517 b:0517 l:000516 d:000516 CFUNC :each
c:0097 p:---- s:0515 b:0515 l:000514 d:000514 CFUNC :reduce
c:0096 p:0048 s:0511 b:0511 l:000510 d:000510 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:310
c:0095 p:0039 s:0504 b:0498 l:0017b0 d:000497 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:244
c:0094 p:---- s:0493 b:0493 l:000492 d:000492 FINISH
c:0093 p:---- s:0491 b:0491 l:000486 d:000490 IFUNC
c:0092 p:---- s:0489 b:0489 l:000488 d:000488 CFUNC :each
c:0091 p:---- s:0487 b:0487 l:000486 d:000486 CFUNC :each_with_index
c:0090 p:0011 s:0484 b:0484 l:0017b0 d:000483 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:242
c:0089 p:---- s:0482 b:0482 l:000481 d:000481 FINISH
c:0088 p:---- s:0480 b:0480 l:000479 d:000479 CFUNC :call
c:0087 p:0106 s:0476 b:0476 l:000475 d:000475 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373
c:0086 p:0089 s:0470 b:0470 l:002548 d:002548 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:357
c:0085 p:---- s:0463 b:0463 l:000462 d:000462 FINISH
c:0084 p:0024 s:0461 b:0461 l:0017b0 d:001db8 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:241
c:0083 p:---- s:0459 b:0459 l:000458 d:000458 FINISH
c:0082 p:---- s:0457 b:0457 l:000456 d:000456 CFUNC :call
c:0081 p:0106 s:0453 b:0453 l:000452 d:000452 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373
c:0080 p:0089 s:0447 b:0447 l:001b88 d:001b88 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:357
c:0079 p:---- s:0440 b:0440 l:000439 d:000439 FINISH
c:0078 p:0031 s:0438 b:0438 l:0017b0 d:001f80 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:238
c:0077 p:0225 s:0435 b:0435 l:000434 d:000434 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:293
c:0076 p:---- s:0428 b:0428 l:000427 d:000427 FINISH
c:0075 p:---- s:0426 b:0426 l:000425 d:000425 CFUNC :new
c:0074 p:0032 s:0422 b:0422 l:0017b0 d:0017b0 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:237
c:0073 p:0084 s:0418 b:0414 l:0023b8 d:000413 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:142
c:0072 p:---- s:0411 b:0411 l:000410 d:000410 FINISH
c:0071 p:---- s:0409 b:0409 l:000408 d:000408 CFUNC :each
c:0070 p:0076 s:0406 b:0406 l:000405 d:000405 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/util/simple_typed_list.rb:138
c:0069 p:---- s:0400 b:0400 l:000399 d:000399 FINISH
c:0068 p:0350 s:0398 b:0398 l:0023b8 d:0023b8 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:140
c:0067 p:0045 s:0395 b:0395 l:000394 d:000394 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:72
c:0066 p:0065 s:0389 b:0389 l:000388 d:000388 METHOD /Users/bayja/RoR_Projects/axl/app/controllers/posts_controller.rb:18
c:0065 p:0014 s:0385 b:0385 l:000384 d:000384 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/implicit_render.rb:4
c:0064 p:0015 s:0379 b:0379 l:000378 d:000378 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:167
c:0063 p:0041 s:0374 b:0374 l:000373 d:000373 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rendering.rb:10
c:0062 p:0010 s:0370 b:0370 l:000f20 d:000369 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/callbacks.rb:18
c:0061 p:0066 s:0368 b:0368 l:000367 d:000367 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:416
c:0060 p:0113 s:0362 b:0362 l:000361 d:000361 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:386
c:0059 p:0024 s:0353 b:0353 l:000352 d:000352 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81
c:0058 p:0020 s:0347 b:0347 l:000f20 d:000f20 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/callbacks.rb:17
c:0057 p:0012 s:0343 b:0343 l:000342 d:000342 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rescue.rb:17
c:0056 p:0010 s:0338 b:0338 l:000319 d:000337 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/instrumentation.rb:30
c:0055 p:0017 s:0334 b:0334 l:000324 d:000333 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53
c:0054 p:0032 s:0332 b:0332 l:000331 d:000331 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications/instrumenter.rb:21
c:0053 p:0036 s:0325 b:0325 l:000324 d:000324 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53
c:0052 p:0152 s:0320 b:0320 l:000319 d:000319 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/instrumentation.rb:29
c:0051 p:0143 s:0315 b:0315 l:000314 d:000314 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/params_wrapper.rb:201
c:0050 p:0032 s:0309 b:0309 l:000308 d:000308 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/controller_runtime.rb:18
c:0049 p:0093 s:0304 b:0304 l:000303 d:000303 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:121
c:0048 p:0084 s:0298 b:0298 l:000297 d:000297 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/rendering.rb:45
c:0047 p:0048 s:0293 b:0293 l:000292 d:000292 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal.rb:193
c:0046 p:0086 s:0288 b:0288 l:000287 d:000287 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rack_delegation.rb:14
c:0045 p:0030 s:0282 b:0282 l:0010c8 d:000281 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal.rb:236
c:0044 p:---- s:0279 b:0279 l:000278 d:000278 FINISH
c:0043 p:---- s:0277 b:0277 l:000276 d:000276 CFUNC :call
c:0042 p:0022 s:0273 b:0273 l:000272 d:000272 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:65
c:0041 p:0094 s:0267 b:0267 l:000266 d:000266 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:29
c:0040 p:0127 s:0261 b:0261 l:000232 d:000260 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152
c:0039 p:0014 s:0254 b:0254 l:000238 d:000253 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96
c:0038 p:0287 s:0249 b:0249 l:000248 d:000248 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:75
c:0037 p:0198 s:0239 b:0239 l:000238 d:000238 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95
c:0036 p:0092 s:0233 b:0233 l:000232 d:000232 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141
c:0035 p:0025 s:0227 b:0227 l:000226 d:000226 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:532
c:0034 p:0015 s:0223 b:0223 l:000222 d:000222 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/best_standards_support.rb:17
c:0033 p:0015 s:0216 b:0216 l:000215 d:000215 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/etag.rb:23
c:0032 p:0068 s:0208 b:0208 l:000207 d:000207 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/conditionalget.rb:25
c:0031 p:0093 s:0201 b:0201 l:000200 d:000200 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/head.rb:14
c:0030 p:0046 s:0194 b:0194 l:000193 d:000193 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/params_parser.rb:21
c:0029 p:0054 s:0189 b:0189 l:000188 d:000188 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/flash.rb:247
c:0028 p:0031 s:0181 b:0181 l:000180 d:000180 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/session/abstract/id.rb:195
c:0027 p:0013 s:0173 b:0173 l:000172 d:000172 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/session/abstract/id.rb:190
c:0026 p:0020 s:0169 b:0169 l:000168 d:000168 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/cookies.rb:331
c:0025 p:0064 s:0161 b:0161 l:000160 d:000160 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/query_cache.rb:64
c:0024 p:0029 s:0152 b:0152 l:000151 d:000151 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.r
c:0023 p:0014 s:0144 b:0144 l:001fc0 d:000143 BLOCK /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/callbacks.rb:29
c:0022 p:0155 s:0142 b:0142 l:000141 d:000141 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:392
c:0021 p:0024 s:0132 b:0132 l:000131 d:000131 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81
c:0020 p:0013 s:0126 b:0126 l:001fc0 d:001fc0 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/callbacks.rb:28
c:0019 p:0027 s:0122 b:0122 l:000121 d:000121 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/reloader.rb:68
c:0018 p:0015 s:0117 b:0117 l:000116 d:000116 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/sendfile.rb:101
c:0017 p:0049 s:0107 b:0107 l:000106 d:000106 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/remote_ip.rb:48
c:0016 p:0017 s:0103 b:0103 l:000102 d:000102 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/show_exceptions.rb:47
c:0015 p:0027 s:0095 b:0095 l:000094 d:000094 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/rack/logger.rb:13
c:0014 p:0155 s:0091 b:0091 l:000090 d:000090 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/methodoverride.rb:24
c:0013 p:0032 s:0085 b:0085 l:000084 d:000084 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/runtime.rb:17
c:0012 p:0057 s:0076 b:0076 l:000075 d:000075 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/cache/strategy/local_cache.rb:72
c:0011 p:0068 s:0072 b:0072 l:000071 d:000071 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/lock.rb:15
c:0010 p:0124 s:0066 b:0066 l:000065 d:000065 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/static.rb:53
c:0009 p:0032 s:0060 b:0060 l:000059 d:000059 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/engine.rb:456
c:0008 p:0015 s:0056 b:0056 l:000055 d:000055 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/content_length.rb:14
c:0007 p:0015 s:0047 b:0047 l:000046 d:000046 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/rack/log_tailer.rb:14
c:0006 p:0356 s:0042 b:0042 l:000041 d:000041 METHOD /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/handler/webrick.rb:59
c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0126 s:0009 b:0009 l:001a88 d:000008 BLOCK /Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information ----------------------------------------
/Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in block in start_thread' /Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:inrun'
/Users/bayja/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in service' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/handler/webrick.rb:59:inservice'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/rack/log_tailer.rb:14:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/content_length.rb:14:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/engine.rb:456:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/static.rb:53:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/lock.rb:15:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/cache/strategy/local_cache.rb:72:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/runtime.rb:17:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/methodoverride.rb:24:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/rack/logger.rb:13:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/show_exceptions.rb:47:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/remote_ip.rb:48:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/sendfile.rb:101:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/reloader.rb:68:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/callbacks.rb:28:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81:in run_callbacks' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:392:in_run_call_callbacks'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/callbacks.rb:29:in block in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:477:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/query_cache.rb:64:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/cookies.rb:331:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/session/abstract/id.rb:190:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/session/abstract/id.rb:195:incontext'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/flash.rb:247:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/params_parser.rb:21:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/head.rb:14:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/conditionalget.rb:25:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.6/lib/rack/etag.rb:23:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:532:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141:incall'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95:in recognize' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:75:inoptimized_each'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96:in block in recognize' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152:inblock in call'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:29:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:65:indispatch'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:65:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal.rb:236:inblock in action'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rack_delegation.rb:14:in dispatch' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal.rb:193:indispatch'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/rendering.rb:45:in process' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:121:inprocess'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/controller_runtime.rb:18:in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/params_wrapper.rb:201:inprocess_action'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/instrumentation.rb:29:in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53:ininstrument'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications/instrumenter.rb:21:in instrument' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/notifications.rb:53:inblock in instrument'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/instrumentation.rb:30:in block in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rescue.rb:17:inprocess_action'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/callbacks.rb:17:in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81:inrun_callbacks'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:386:in _run_process_action_callbacks' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:416:in_run__20670671366324159__process_action__1264903202614530096__callbacks'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/callbacks.rb:18:in block in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/rendering.rb:10:inprocess_action'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/abstract_controller/base.rb:167:in process_action' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_controller/metal/implicit_render.rb:4:insend_action'
/Users/bayja/RoR_Projects/axl/app/controllers/posts_controller.rb:18:in index' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:72:inserialize'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:140:in parts' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/util/simple_typed_list.rb:138:inmethod_missing'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/util/simple_typed_list.rb:138:in each' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/package.rb:142:inblock in parts'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:237:in to_xml' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:237:innew'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:293:in initialize' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:238:inblock in to_xml'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:357:in method_missing' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373:ininsert'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:241:inblock (2 levels) in to_xml'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:357:in method_missing' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373:ininsert'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb:373:in call' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:242:inblock (3 levels) in to_xml'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:242:in each_with_index' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:242:ineach'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:244:in block (4 levels) in to_xml' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:310:inauto_width'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:310:in reduce' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:310:ineach'
/Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:311:in block in auto_width' /Users/bayja/.rvm/gems/ruby-1.9.2-p290/gems/axlsx-1.0.14/lib/axlsx/workbook/worksheet/worksheet.rb:311:inget_type_metrics'

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6

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.