Giter VIP home page Giter VIP logo

Comments (5)

jurriaan avatar jurriaan commented on July 17, 2024

The file that crashes when using autofilter (I clicked on sort descending on the 'Rvm' column):
http://dump.jurriaanpruis.nl/114276076901.xlsx

File was created using this code:

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

p = Axlsx::Package.new
wb = p.workbook

##Tables

wb.add_worksheet(:name => "Table") do |sheet|
  sheet.add_row ["Build Matrix"]
  sheet.add_row ["Build", "Duration", "Finished", "Rvm"]
  sheet.add_row ["19.1", "1 min 32 sec", "about 10 hours ago", "1.8.7"]
  sheet.add_row ["19.2", "1 min 28 sec", "about 10 hours ago", "1.9.2"]
  sheet.add_row ["19.3", "1 min 35 sec", "about 10 hours ago", "1.9.3"]
  sheet.auto_filter = "A2:D5"
end

#p.validate.each { |e| puts e.message }
p.serialize("example.xlsx")

from axlsx.

randym avatar randym commented on July 17, 2024

that is just insane.... for the record 2008 eats it with a smile, sorts it happily and does not puke an error.

from axlsx.

jurriaan avatar jurriaan commented on July 17, 2024

Found the solution, if I add

<definedNames>
  <definedName name="_xlnm._FilterDatabase" localSheetId="0" hidden="1">Table!$A$2:$D$5</definedName>
</definedNames>

to workbook.xml it works perfectly

see: https://issues.apache.org/bugzilla/show_bug.cgi?id=50315

from axlsx.

randym avatar randym commented on July 17, 2024

@jurriaan You are amazing!

from axlsx.

randym avatar randym commented on July 17, 2024

@jurriaan do you have a patch for this you can submit a pull request for?

from axlsx.

Related Issues (20)

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.