Code Monkey home page Code Monkey logo

fast_excel's Introduction

Ultra Fast Excel Writer for Ruby

require 'fast_excel'

workbook = FastExcel.open("hello_world.xlsx", constant_memory: true)
workbook.default_format.set(
  font_size: 0, # user's default
  font_family: "Arial"
)

worksheet = workbook.add_worksheet("Example Report")

bold = workbook.bold_format
worksheet.set_column(0, 0, FastExcel::DEF_COL_WIDTH, bold)

price = workbook.number_format("#,##0.00")
worksheet.set_column(1, 1, 20, price)

date_format = workbook.number_format("[$-409]m/d/yy h:mm AM/PM;@")
worksheet.set_column(2, 2, 20, date_format)

worksheet.append_row(["message", "price", "date"], bold)

for i in 1..1000
  worksheet.append_row(["Hello", (rand * 10_000_000).round(2), Time.now])
end

worksheet.append_row(["Sum", FastExcel::Formula.new("SUM(B2:B1001)")], bold)

workbook.close

See more examples

This repository and gem contain sources of libxlsxwriter

Install

# Gemfile
gem 'fast_excel'

Or

gem install fast_excel

Create Document

workbook = FastExcel.open # creates tmp file
# ...
send_data(workbook.read_string, filename: "table.xlsx") # read tmp file and delete it

Also can use workbook.remove_tmp_folder to delete tmp file manually

Constant memory mode: saves each row to disk, good for really big files but can not change previous lines that already saved

workbook = FastExcel.open(constant_memory: true)

Save to file

workbook = FastExcel.open("my_dinner.xlsx")

Write Data

FastExcel will automatically detect data type and one of write_number or write_datetime or write_formula or write_string or write_url

workbook = FastExcel.open
worksheet = workbook.add_worksheet

# write specific type value value
worksheet.write_number(row = 0, col = 5, 1_234_567, format = nil)

# write value with type detection
worksheet.write_value(row = 0, col = 5, 1_234_567, format = nil)

# write row of values. format argument can be format object or array of format objects
worksheet.write_row(row = 1, ["strong", 123_456, Time.now], format = nil)

# write row to the bottom
worksheet.append_row(["strong", 123_456, Time.now], )

# shortcut for append_row()
worksheet << ["strong", 123_456, Time.now]

Saving dates: excel store dates as number of days since 1st January 1900, and FastExcel will make it for you.

To make saving of dates slightly faster can use FastExcel.date_num helper:

date_format = workbook.number_format("[$-409]m/d/yy hh:mm;@")
worksheet.write_number(0, 0, FastExcel.date_num(Time.now, Time.zone.utc_offset), date_format)

Formulas: special type of value in excel

worksheet << [1, 2, 3, 4]
worksheet << [FastExcel::Formula.new("SUM(A1:D1)")] # A2 will be shown as 10

URL: Link to website or something else

url_format = workbook.add_format(underline: :underline_single, font_color: :blue) # format is optional
worksheet.append_row([
  FastExcel::URL.new("https://github.com/Paxa/fast_excel"),
  FastExcel::URL.new("postgres://localhost")
], url_format)
# or
worksheet.write_url(0, 2, "https://github.com/Paxa/fast_excel", url_format)

Data Formatting

format = workbook.add_format(
  bold: true,
  italic: true,
  font_outline: true,
  font_shadow: true,
  text_wrap: true,
  font_strikeout: true,
  shrink: true,
  text_justlast: true,
  font_size: 13, # default is 11, use 0 for user's default
  font_name: "Arial", # default is Calibri, also accessible via font_family
  font_color: :orange, # can use RGB hex as "#FF0000" or 0x00FF00 or color name as symbol or string
  font_script: :font_subscript,
  rotation: 10,
  underline: :underline_single, # or :underline_double or :underline_single_accounting or :underline_double_accounting
  indent: 1,
  # border styles
  border: :border_thin,
  left: :medium,
  top: :dashed,
  right: :double,
  bottom: :hair,
  bottom_color: :alice_blue,
  top_color: "#11ABCD",
  # Align
  align: {h: :align_center, v: :align_vertical_center},
  num_format: "#,##0.00"
)

Shortcuts:

workbook.bold_format # bold text
workbook.number_format("[$-409]m/d/yy h:mm AM/PM;@") # format for date

Set Column Width

worksheet.set_column(start_col, end_col, width = nil, format = nil)
# or
worksheet.set_column_width(col, width = 60)
# or
worksheet.set_columns_width(start_col, end_col, width = 60)

Set Row Height

worksheet.set_row(row_num = 0, height = 30, format = nil)

Column Auto Width

Column authwidth only works for string values, because numbers may have custom formatting

Enabling column auto widths will slow down writing string values for about 15-25%

require 'fast_excel'

workbook = FastExcel.open(constant_memory: true)

worksheet = workbook.add_worksheet
worksheet.auto_width = true

worksheet.append_row(["some text", "some longer text for example"])

content = workbook.read_string
File.open('./some_file.xlsx', 'wb') {|f| f.write(content) }

fast_excel_auto_width

API

This gem is FFI binding for libxlsxwriter C library with some syntax sugar. All original functions is avaliable, for example:

Libxlsxwriter.worksheet_activate(worksheet) # => will call void worksheet_activate(lxw_worksheet *worksheet)
# or shorter:
worksheet.activate

Full libxlsxwriter documentation: http://libxlsxwriter.github.io/

Generated rdoc: rubydoc.info/github/Paxa/fast_excel

Benchmarks

1000 rows:

Comparison:
           FastExcel:       31.7 i/s
               Axlsx:        8.0 i/s - 3.98x  slower
          write_xlsx:        6.9 i/s - 4.62x  slower

20000 rows:

Comparison:
           FastExcel:        1.4 i/s
               Axlsx:        0.4 i/s - 3.46x  slower
          write_xlsx:        0.1 i/s - 17.04x  slower

Max memory usage, generating 100k rows:

FastExcel   - 20 MB
Axlsx       - 60 MB
write_xlsx - 100 MB

fast_excel's People

Contributors

alexwayfer avatar datbth avatar dlozano avatar duffyjp avatar gui avatar kevinschiffmann avatar madejejej avatar mange avatar michalpawlicki avatar paxa avatar preetpals avatar rogercampos avatar ruehsn avatar sly7-7 avatar steffansluis avatar tak1n avatar tmgemedia 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

fast_excel's Issues

Ruby 3.0 support

Is their plans to release a Ruby 3.0.0 supported version of them gem?

When I try installed 0.3.0, it says

fast_excel-0.3.0 requires ruby version ~> 2.0, which is incompatible with the current version, ruby 3.0.0p0

Supporting rich strings

Do you have any plans to expose worksheet_write_rich_string? If not, do you have a rough idea of how much work it would be to add that support?

Thanks for your work on this gem!

Can you add automated column width?

Hey!

I like your code to generate excel reports with high amount of rows.
But can you make please the automated column width feature? :-)

It would be a great feature.

Thanks!

Add a url but setting the anchor's text

Hi,

We can add add urls like this:

worksheet.append_row([
  FastExcel::URL.new("https://github.com/Paxa/fast_excel"),
  FastExcel::URL.new("postgres://localhost")
], url_format)

But how can we add a url to the excel file and set the text that will be the anchor to the url? Essentially I want to show a title, and when the user clicks the title it goes to a url.

Something like this would be useful:

FastExcel::URL.new("Super link", "https://github.com/Paxa/fast_excel"),

How can I do this?

Don't crash process on error

[WARNING]: workbook_add_worksheet(): worksheet name 'Something' has error: Worksheet name is already in use.
/Users/pavel/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fast_excel-9ba40c87ed9f/lib/fast_excel/binding/worksheet.rb:324: [BUG] Segmentation fault at 0x00000000000098
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/CrashReporter                                         
     * /Library/Logs/CrashReporter                                          
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0083 p:---- s:0598 e:000597 CFUNC  :worksheet_set_column
c:0082 p:0023 s:0589 e:000588 METHOD /Users/pavel/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fast_excel-9ba40c87ed9f/lib/fast_excel/binding/worksheet.rb
c:0081 p:0021 s:0581 e:000580 METHOD /Users/pavel/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fast_excel-9ba40c87ed9f/lib/fast_excel.rb:427
c:0080 p:0015 s:0573 e:000572 METHOD /Users/pavel/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fast_excel-9ba40c87ed9f/lib/fast_excel.rb:431
c:0079 p:0154 s:0567 e:000566 BLOCK  /Users/pavel/Work/mrt/app/services/new_recon_report_service.rb:156 [FINISH]
c:0078 p:---- s:0559 e:000558 IFUNC 
c:0077 p:---- s:0556 e:000555 CFUNC  :each
c:0076 p:---- s:0553 e:000552 CFUNC  :each_with_index

New release?

Hi, I was wondering if a new release is planned, since stuff like FastExcel::URL is mentioned in the documentation but it's not present in the 0.2.6 release.

Not obvious - or possible - how to make columns fit contents

I did see this in the libxsltwriter FAQ though:

https://libxlsxwriter.github.io/faq.html

Unfortunately, there is no way to specify "AutoFit" for a column in the Excel file format. This feature is only available at runtime from within Excel. It is possible to simulate "AutoFit" by tracking the width of the data in the column as your write it.

It looks like axlsx does this:

    # This is still not perfect...
    #  - scaling is not linear as font sizes increst
    #  - different fonts have different mdw and char widths
    def autowidth
      return if is_formula? || value == nil
      mdw = 1.78 #This is the widest width of 0..9 in arial@10px)
      font_scale = (font_size/10.0).to_f
      ((value.to_s.count(Worksheet.thin_chars) * mdw + 5) / mdw * 256) / 256.0 * font_scale
    end

uninitialized constant FastExcel::WorkbookExt::Set

Whenever I try to run the first command in your example I get this error.
uninitialized constant FastExcel::WorkbookExt::Set

This is the variable assignment i am attempting
workbook = FastExcel.open("hello_world_ffi.xlsx", constant_memory: true)

NameError: uninitialized constant FastExcel::WorkbookExt::Set from /home/alb/.rvm/gems/ruby-2.3.5/gems/fast_excel-0.2.5/lib/fast_excel.rb:326:in initialize'
from /home/alb/.rvm/gems/ruby-2.3.5/gems/fast_excel-0.2.5/lib/fast_excel.rb:35:in new' from /home/alb/.rvm/gems/ruby-2.3.5/gems/fast_excel-0.2.5/lib/fast_excel.rb:35:in open'
from (irb):33
from /usr/share/rvm/rubies/ruby-2.3.5/bin/irb:11:in <main>'

Make it possible to add column

This is very promising solution to Axlsx, if it would only have the possibility to add columns in the middle of file generation process.
We have this process of generating large Excel files, which also need to dynamically add columns, if certain data appears.

How could that be possible to achieve that result?

Add selecting box

Hi there!

Very usefull gem and i would start by thank you for your great job!

I'm looking for generate some selecting box with severals options of value by the user, i didn't see command for that and i'm asking if this is possible, and if is not, maybe you have planned to do this ?

Thank you for your attention :)

workbook_validate_worksheet_name renamed to workbook_validate_sheet_name

WorkbookWrappers#validate_worksheet_name is broken because the function in libxlsxwriter was changed from workbook_validate_worksheet_name to workbook_validate_sheet_name

libxslxwriter header:

lxw_error workbook_validate_sheet_name(lxw_workbook *workbook,

binding:

attach_function :workbook_validate_worksheet_name, :workbook_validate_worksheet_name, [Workbook, :string], :error

def validate_worksheet_name(sheetname)
Libxlsxwriter.workbook_validate_worksheet_name(self, sheetname)
end

Exceeding maximum number of URLs

I have hit the limit of maximum number of URLs. From lib/fast_excel/binding.rb

MAX_NUMBER_URLS = 65530

It looks like this is a libxlswriter limitation. Is there a workaround to this?

Could not open library 'C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/libxlsxwriter/lib/libxlsxwriter.so'

Hi,I am using windows OS, I have installed the gem and started running your given example, but I am getting the following error

C:\Ruby26\bin\ruby.exe C:/A/RubyAutomation/AppData/Example.rb
Traceback (most recent call last):
        2: from C:/A/RubyAutomation/AppData/Example.rb:2:in `<main>'
        1: from C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- fast_excel (LoadError)
        10: from C:/A/RubyAutomation/AppData/Example.rb:2:in `<main>'
         9: from C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
         8: from C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
         7: from C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
         6: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/lib/fast_excel.rb:1:in `<top (required)>'
         5: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/lib/fast_excel.rb:1:in `require_relative'
         4: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/lib/fast_excel/binding.rb:5:in `<top (required)>'
         3: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/lib/fast_excel/binding.rb:14:in `<module:Libxlsxwriter>'
         2: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/ffi-1.12.2-x86-mingw32/lib/ffi/library.rb:99:in `ffi_lib'
         1: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/ffi-1.12.2-x86-mingw32/lib/ffi/library.rb:99:in `map'
 (LoadError)b/ruby/gems/2.6.0/gems/ffi-1.12.2-x86-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'C:/Ruby26/lib/ruby/gems/2.6.0/gems/fast_excel-0.2.6/libxlsxwriter/lib/libxlsxwriter.so': The specified module could not be found.

Fix for `library not found for -lgcc_s.10.4` on MacOS Mojave Xcode 10

When I did a gem install fast_excel on macOS Mojave and Xcode 10, I was getting the error:

ld: library not found for -lgcc_s.10.4

After a bit of digging, I found this fix which allowed the install to proceed as expected:

$ cd /usr/local/lib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib

I think this might be fixed by updating to a more recent Libxlsxwriter. It seems to be related to macOS deprecating something, and the latest Libxlsxwriter seems to account for this in their build scripts updated for Xcode 10.

FYI in case someone else hits this and/or it can be corrected...

Could auto width coexist with set width

I think it would be nice if auto width could coexist with fixed width.

I use auto width most of the time, but sometimes a single column content can make a mess if it's too large. I would like to set width of some columns, and still have autowidth for the rest of them.

In my project, i did this as a monkey patch, but i could make a PR if you think this could me useful.

def initialize(struct)
  @fixed_witdh_columns = []
  @is_open = true
  @col_formats = {}
  @last_row_number = -1
  super(struct)
end

def set_column_width(col, width)
  @fixed_witdh_columns << col
  set_column(col, col, width, @col_formats[col])
end

def close
  return unless auto_width?

  @column_widths.each do |num, width|
    next if @fixed_witdh_columns.include?(num)

    set_column_width(num, width + 0.2)
  end
end

[qiestopm] benchmark against caxlsx

The README file has an impress 4x speed bump pver axlsx. I switched last year to spreadsheet_architect which is a wrapper for caxlsx. What does your benchmarks show against caxlsx?

I'm asking because I have some files that are taking over 30 minutes to render with 5 sheets and less than 100K total rows. fast_excel looks like a potential drop in replacement.

Dewayne
o-*

Revise NULL pointers that are returned intentionally?

See Note number 1 of #83.

There are cases where Libxlsxwriter returns a NULL pointer intentionally (rather than because of a memory error).
In those cases, I think FastExcel should return nil instead of a Struct of null pointer, especially because further usage on the Struct is likely to yield segmentation fault error and crashes the whole process (rather than just a Ruby RuntimeError when using nil values improperly).

For example:

  • WorkbookWrappers#get_worksheet_by_name when worksheet is not found
  • WorkbookWrappers#default_format when there are no formats?
  • WorksheetWrappers#find_row when row is not found?

undefined method `constant_memory?' for nil:NilClass

I have this issue when trying to find existing worksheet and then write to it:

NoMethodError:
   undefined method `constant_memory?' for nil:NilClass
 # /Users/gradus/.rvm/gems/ruby-2.3.1/bundler/gems/fast_excel-07292bd3b116/lib/fast_excel.rb:403:in `write_value'
 # /Users/gradus/.rvm/gems/ruby-2.3.1/bundler/gems/fast_excel-07292bd3b116/lib/fast_excel.rb:397:in `block in write_row'

Code to repeat:

workbook = FastExcel.open(destination, constant_memory: true)
worksheet = workbook.get_worksheet_by_name('Report 1')
worksheet.write_row(0, ['1'])

Could you release a new version?

Hey!

It's been a long time since the last release (20 Jun) and there were a few pull requests that improved the performance. We'd really appreciate it if you released a new version since we'd love to include fast_excel in one of our gem's dependencies .

Header / Footer Options - pointer argument is not a valid pointer

Trying to set a footer / header margin causes the following error ":pointer argument is not a valid pointer".

Below is some of the inputs I have tried, I'm not sure if this is a bug or am I doing something wrong?

options = Libxlsxwriter::HeaderFooterOptions
worksheet.set_header_opt('&L&A&CPage &P of &N', options)
worksheet.set_footer_opt('&L&A&CPage` &P of &N', {margin: 0.2} )
worksheet.set_footer_opt('&L&A&CPage` &P of &N', {0.2} )
worksheet.set_footer_opt('&L&A&CPage` &P of &N', 0.2 )

Using set_header / set_footer works fine.

set(:bg_color: 0xff0000) does not work

This does not work:
header_format.set(bg_color: 0xff0000)
It neither sets the color, nor fails with an error.
Naturally, this works ok, but it's convenient to set a lot of things at once:
header_format.set_bg_color(0xff0000)

Fails to install in ruby:3.0.3-bullseye Docker image

If I run the following command:

docker run --rm -it docker.io/library/ruby:3.0.3-bullseye gem install fast_excel

I get the following error as the installer attempts to compile libxlsxwriter/third_party/minizip.

Fetching fast_excel-0.4.0.gem
Fetching ffi-1.15.4.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.15.4
Building native extensions. This could take a while...
ERROR:  Error installing fast_excel:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/fast_excel-0.4.0
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r ./siteconf20220103-1-kw768g.rb extconf.rb

current directory: /usr/local/bundle/gems/fast_excel-0.4.0
make DESTDIR\= clean
make[1]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/src'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/src'
# @make clean -C test/unit
# @make clean -C test/functional/src
# @make clean -C examples
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/tmpfileplus'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/tmpfileplus'
make[1]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'

current directory: /usr/local/bundle/gems/fast_excel-0.4.0
make DESTDIR\=
# @echo "Compiling ext/text_width ..."
# rake compile
Compiling libxlsxwriter ...
make[1]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
In file included from ioapi.h:46,
                 from ioapi.c:29:
/usr/include/zlib.h:98:5: error: unknown type name โ€˜alloc_funcโ€™
   98 |     alloc_func zalloc;  /* used to allocate the internal state */
      |     ^~~~~~~~~~
/usr/include/zlib.h:99:5: error: unknown type name โ€˜free_funcโ€™
   99 |     free_func  zfree;   /* used to free the internal state */
      |     ^~~~~~~~~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:135:51: note: in expansion of macro โ€˜OFโ€™
  135 | typedef voidpf   (ZCALLBACK *open_file_func)      OF((voidpf opaque, const char* filename, int mode));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:136:51: note: in expansion of macro โ€˜OFโ€™
  136 | typedef uLong    (ZCALLBACK *read_file_func)      OF((voidpf opaque, voidpf stream, void* buf, uLong size));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:137:51: note: in expansion of macro โ€˜OFโ€™
  137 | typedef uLong    (ZCALLBACK *write_file_func)     OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:138:51: note: in expansion of macro โ€˜OFโ€™
  138 | typedef int      (ZCALLBACK *close_file_func)     OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:139:51: note: in expansion of macro โ€˜OFโ€™
  139 | typedef int      (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:141:51: note: in expansion of macro โ€˜OFโ€™
  141 | typedef long     (ZCALLBACK *tell_file_func)      OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:142:51: note: in expansion of macro โ€˜OFโ€™
  142 | typedef long     (ZCALLBACK *seek_file_func)      OF((voidpf opaque, voidpf stream, uLong offset, int origin));
      |                                                   ^~
In file included from ioapi.c:29:
ioapi.h:148:5: error: unknown type name โ€˜open_file_funcโ€™
  148 |     open_file_func      zopen_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:149:5: error: unknown type name โ€˜read_file_funcโ€™
  149 |     read_file_func      zread_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:150:5: error: unknown type name โ€˜write_file_funcโ€™
  150 |     write_file_func     zwrite_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:151:5: error: unknown type name โ€˜tell_file_funcโ€™
  151 |     tell_file_func      ztell_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:152:5: error: unknown type name โ€˜seek_file_funcโ€™
  152 |     seek_file_func      zseek_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:153:5: error: unknown type name โ€˜close_file_funcโ€™
  153 |     close_file_func     zclose_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:154:5: error: unknown type name โ€˜testerror_file_funcโ€™
  154 |     testerror_file_func zerror_file;
      |     ^~~~~~~~~~~~~~~~~~~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:158:51: note: in expansion of macro โ€˜OFโ€™
  158 | typedef ZPOS64_T (ZCALLBACK *tell64_file_func)    OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:159:51: note: in expansion of macro โ€˜OFโ€™
  159 | typedef long     (ZCALLBACK *seek64_file_func)    OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
      |                                                   ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:160:51: note: in expansion of macro โ€˜OFโ€™
  160 | typedef voidpf   (ZCALLBACK *open64_file_func)    OF((voidpf opaque, const void* filename, int mode));
      |                                                   ^~
In file included from ioapi.c:29:
ioapi.h:164:5: error: unknown type name โ€˜open64_file_funcโ€™
  164 |     open64_file_func    zopen64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:165:5: error: unknown type name โ€˜read_file_funcโ€™
  165 |     read_file_func      zread_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:166:5: error: unknown type name โ€˜write_file_funcโ€™
  166 |     write_file_func     zwrite_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:167:5: error: unknown type name โ€˜tell64_file_funcโ€™
  167 |     tell64_file_func    ztell64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:168:5: error: unknown type name โ€˜seek64_file_funcโ€™
  168 |     seek64_file_func    zseek64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:169:5: error: unknown type name โ€˜close_file_funcโ€™
  169 |     close_file_func     zclose_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:170:5: error: unknown type name โ€˜testerror_file_funcโ€™
  170 |     testerror_file_func zerror_file;
      |     ^~~~~~~~~~~~~~~~~~~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:174:28: note: in expansion of macro โ€˜OFโ€™
  174 | void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
      |                            ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:175:26: note: in expansion of macro โ€˜OFโ€™
  175 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
      |                          ^~
In file included from ioapi.c:29:
ioapi.h:181:5: error: unknown type name โ€˜open_file_funcโ€™
  181 |     open_file_func      zopen32_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:182:5: error: unknown type name โ€˜tell_file_funcโ€™
  182 |     tell_file_func      ztell32_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:183:5: error: unknown type name โ€˜seek_file_funcโ€™
  183 |     seek_file_func      zseek32_file;
      |     ^~~~~~~~~~~~~~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:194:21: note: in expansion of macro โ€˜OFโ€™
  194 | voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
      |                     ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:195:22: note: in expansion of macro โ€˜OFโ€™
  195 | long    call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
      |                      ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.h:196:23: note: in expansion of macro โ€˜OFโ€™
  196 | ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
      |                       ^~
ioapi.c: In function โ€˜call_zopen64โ€™:
ioapi.c:33:46: warning: comparison between pointer and integer
   33 |     if (pfilefunc->zfile_func64.zopen64_file != NULL)
      |                                              ^~
ioapi.c:34:17: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   34 |         return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:37:17: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   37 |         return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function โ€˜call_zseek64โ€™:
ioapi.c:43:46: warning: comparison between pointer and integer
   43 |     if (pfilefunc->zfile_func64.zseek64_file != NULL)
      |                                              ^~
ioapi.c:44:17: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   44 |         return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:51:21: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   51 |             return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function โ€˜call_ztell64โ€™:
ioapi.c:57:46: warning: comparison between pointer and integer
   57 |     if (pfilefunc->zfile_func64.zseek64_file != NULL)
      |                                              ^~
ioapi.c:58:17: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   58 |         return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:61:29: error: invalid type argument of unary โ€˜*โ€™ (have โ€˜intโ€™)
   61 |         uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function โ€˜fill_zlib_filefunc64_32_def_from_filefunc32โ€™:
ioapi.c:71:48: warning: assignment to โ€˜intโ€™ from โ€˜void *โ€™ makes integer from pointer without a cast [-Wint-conversion]
   71 |     p_filefunc64_32->zfile_func64.zopen64_file = NULL;
      |                                                ^
ioapi.c:76:48: warning: assignment to โ€˜intโ€™ from โ€˜void *โ€™ makes integer from pointer without a cast [-Wint-conversion]
   76 |     p_filefunc64_32->zfile_func64.ztell64_file = NULL;
      |                                                ^
ioapi.c:77:48: warning: assignment to โ€˜intโ€™ from โ€˜void *โ€™ makes integer from pointer without a cast [-Wint-conversion]
   77 |     p_filefunc64_32->zfile_func64.zseek64_file = NULL;
      |                                                ^
ioapi.c: At top level:
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:87:42: note: in expansion of macro โ€˜OFโ€™
   87 | static voidpf  ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
      |                                          ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:88:42: note: in expansion of macro โ€˜OFโ€™
   88 | static uLong   ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
      |                                          ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:89:43: note: in expansion of macro โ€˜OFโ€™
   89 | static uLong   ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
      |                                           ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:90:45: note: in expansion of macro โ€˜OFโ€™
   90 | static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
      |                                             ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:91:44: note: in expansion of macro โ€˜OFโ€™
   91 | static long    ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
      |                                            ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:92:43: note: in expansion of macro โ€˜OFโ€™
   92 | static int     ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
      |                                           ^~
<command-line>: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜__attribute__โ€™ before โ€˜_Z_OFโ€™
ioapi.c:93:43: note: in expansion of macro โ€˜OFโ€™
   93 | static int     ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
      |                                           ^~
ioapi.c: In function โ€˜fill_fopen_filefuncโ€™:
ioapi.c:237:36: warning: assignment to โ€˜intโ€™ from โ€˜void * (*)(void *, const char *, int)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  237 |     pzlib_filefunc_def->zopen_file = fopen_file_func;
      |                                    ^
ioapi.c:238:36: warning: assignment to โ€˜intโ€™ from โ€˜uLong (*)(void *, void *, void *, uLong)โ€™ {aka โ€˜long unsigned int (*)(void *, void *, void *, long unsigned int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  238 |     pzlib_filefunc_def->zread_file = fread_file_func;
      |                                    ^
ioapi.c:239:37: warning: assignment to โ€˜intโ€™ from โ€˜uLong (*)(void *, void *, const void *, uLong)โ€™ {aka โ€˜long unsigned int (*)(void *, void *, const void *, long unsigned int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  239 |     pzlib_filefunc_def->zwrite_file = fwrite_file_func;
      |                                     ^
ioapi.c:240:36: warning: assignment to โ€˜intโ€™ from โ€˜long int (*)(void *, void *)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  240 |     pzlib_filefunc_def->ztell_file = ftell_file_func;
      |                                    ^
ioapi.c:241:36: warning: assignment to โ€˜intโ€™ from โ€˜long int (*)(void *, void *, uLong,  int)โ€™ {aka โ€˜long int (*)(void *, void *, long unsigned int,  int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  241 |     pzlib_filefunc_def->zseek_file = fseek_file_func;
      |                                    ^
ioapi.c:242:37: warning: assignment to โ€˜intโ€™ from โ€˜int (*)(void *, void *)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  242 |     pzlib_filefunc_def->zclose_file = fclose_file_func;
      |                                     ^
ioapi.c:243:37: warning: assignment to โ€˜intโ€™ from โ€˜int (*)(void *, void *)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  243 |     pzlib_filefunc_def->zerror_file = ferror_file_func;
      |                                     ^
ioapi.c: In function โ€˜fill_fopen64_filefuncโ€™:
ioapi.c:249:38: warning: assignment to โ€˜intโ€™ from โ€˜void * (*)(void *, const void *, int)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  249 |     pzlib_filefunc_def->zopen64_file = fopen64_file_func;
      |                                      ^
ioapi.c:250:36: warning: assignment to โ€˜intโ€™ from โ€˜uLong (*)(void *, void *, void *, uLong)โ€™ {aka โ€˜long unsigned int (*)(void *, void *, void *, long unsigned int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  250 |     pzlib_filefunc_def->zread_file = fread_file_func;
      |                                    ^
ioapi.c:251:37: warning: assignment to โ€˜intโ€™ from โ€˜uLong (*)(void *, void *, const void *, uLong)โ€™ {aka โ€˜long unsigned int (*)(void *, void *, const void *, long unsigned int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  251 |     pzlib_filefunc_def->zwrite_file = fwrite_file_func;
      |                                     ^
ioapi.c:252:38: warning: assignment to โ€˜intโ€™ from โ€˜ZPOS64_T (*)(void *, void *)โ€™ {aka โ€˜long long unsigned int (*)(void *, void *)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  252 |     pzlib_filefunc_def->ztell64_file = ftell64_file_func;
      |                                      ^
ioapi.c:253:38: warning: assignment to โ€˜intโ€™ from โ€˜long int (*)(void *, void *, ZPOS64_T,  int)โ€™ {aka โ€˜long int (*)(void *, void *, long long unsigned int,  int)โ€™} makes integer from pointer without a cast [-Wint-conversion]
  253 |     pzlib_filefunc_def->zseek64_file = fseek64_file_func;
      |                                      ^
ioapi.c:254:37: warning: assignment to โ€˜intโ€™ from โ€˜int (*)(void *, void *)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  254 |     pzlib_filefunc_def->zclose_file = fclose_file_func;
      |                                     ^
ioapi.c:255:37: warning: assignment to โ€˜intโ€™ from โ€˜int (*)(void *, void *)โ€™ makes integer from pointer without a cast [-Wint-conversion]
  255 |     pzlib_filefunc_def->zerror_file = ferror_file_func;
      |                                     ^
make[2]: *** [Makefile:43: ioapi.o] Error 1
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[1]: *** [Makefile:23: all] Error 2
make[1]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make: *** [Makefile:16: all] Error 2

make failed, exit code 2

If I use the same container to build the latest version of libxlsxwriter, it builds fine, so maybe this is an outdated dependency?

docker run -it -v $PWD:/src -v /run/docker.sock:/run/docker.sock docker.io/library/ruby:3.0.3-bullseye /bin/bash
root@3ae5a9c9eb2f:/# git clone https://github.com/jmcnamara/libxlsxwriter.git
Cloning into 'libxlsxwriter'...
remote: Enumerating objects: 15525, done.
remote: Counting objects: 100% (2247/2247), done.
remote: Compressing objects: 100% (597/597), done.
remote: Total 15525 (delta 1707), reused 2136 (delta 1642), pack-reused 13278
Receiving objects: 100% (15525/15525), 24.14 MiB | 8.02 MiB/s, done.
Resolving deltas: 100% (12213/12213), done.
root@3ae5a9c9eb2f:/# cd libxlsxwriter/
root@3ae5a9c9eb2f:/libxlsxwriter# make
make[1]: Entering directory '/libxlsxwriter/third_party/minizip'
make[1]: Leaving directory '/libxlsxwriter/third_party/minizip'
make[1]: Entering directory '/libxlsxwriter/third_party/tmpfileplus'
make[1]: Leaving directory '/libxlsxwriter/third_party/tmpfileplus'
make[1]: Entering directory '/libxlsxwriter/third_party/md5'
make[1]: Leaving directory '/libxlsxwriter/third_party/md5'
make[1]: Entering directory '/libxlsxwriter/src'
make[1]: Leaving directory '/libxlsxwriter/src'

Column formats not working on Excel

Hello.
When using sheet.set_column to add formats, it works perfectly on LibreOffice, but when opening on Excel, those columns are set to numbers. Changed to set formats on the sheet.append_row(values, format_array) and it worked even though it was the same format.
Code used on set_column (Works on LibreOffice but not on Excel), styles are set on col tag in the file's xml

workbook = FastExcel.open(path, constant_memory: true)
date_format = workbook.number_format("d/m/yyyy;@")
sheet = workbook.add_worksheet
sheet.auto_width = true
sheet.append_row(header)
values_array.each do |array_of_values|
   sheet.append_row(array_of_values)
end
sheet.set_column(6, 6, 15, date_format)
sheet.set_column(19, 19, 15, date_format)

Code used when passing array of formats (Works on both LibreOffice and Excel), styles are set on the cell tag in the file's xml

workbook = FastExcel.open(path, constant_memory: true)
date_format = workbook.number_format("d/m/yyyy;@")
sheet = workbook.add_worksheet
sheet.auto_width = true
sheet.append_row(header)
values_array.each do |array_of_values|
   sheet.append_row(array_of_values, [].fill(nil, 0..5)+[date_format]+[].fill(nil, 0..11)+[date_format])
end

Did i do anything wrong or its an Excel problem?

How does fast_excel behave when an app error occurs?

What happens to the memory allocated for an object when the option: constant_memory: true or false is set ? The file is not actually stored on disk If the file path is specified in initialize? With constant_memory true - meaning it is stored in RAM? In theory, stored data in an object (data table) should be cleared when an application error occurs.

def sample(file_path, collection)
  workbook = FastExcel.open(file_path, constant_memory: true)
  sheet = workbook.add_worksheet(self.class::MODEL_NAME)
  collection.each do |object|
      sheet.append_row(object)
  end

  raise StandartError
ensure
  #What does happens to the memory of the fast _excel object
end

[question] converting cents to dollars

Is there a way to centralize converting of cell values e.g
price_format allows a string formatting, however is there a way to convert a cents value to dollars at the presentation level?

undefined method `enable_filters!'

Hi,
if I run the file examples/example_filters.rb (with require('fast_excel') instead of require_relative '../lib/fast_excel' I receive this error:

undefined method enable_filters! for #<Libxlsxwriter::Worksheet:0x00007fa4c695a750> (NoMethodError)

undefined method `bold_format`

When trying to bold a row, I followed what is in the README.md and did:

bold = workbook.bold_format
worksheet.append_row(["message", "price", "date"], bold)

But I got the following error message:

ActionView::Template::Error (undefined method `bold_format' for #<Libxlsxwriter::Workbook:0x00007fc8d5882548>
Did you mean?  bold_cell_format):

When using bold_cell_format, it works perfectly fine.

I had a look in the code base to see if it was a typo but it appears you are aliasing bold_format to bold_cell_format here:

alias_method :bold_format, :bold_cell_format

So I'm not sure why it's not working. I'm on the latest version, 0.2.6. I wonder if making this alias instead of alias_method would make a difference.

Let me know what you think.

Segmentation fault for Apple M1 macOS 12.5.1

Hi! I got the error probably after installing XCode 14.0.1. There was no problem before.

rails   | /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fast_excel-0.2.6/lib/fast_excel/binding/worksheet.rb:324: [BUG] Segmentation fault at 0x0000000000000058
rails   | ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [arm64-darwin21]
rails   | 
rails   | -- Crash Report log information --------------------------------------------
rails   |    See Crash Report log file under the one of following:                    
rails   |      * ~/Library/Logs/DiagnosticReports                                     
rails   |      * /Library/Logs/DiagnosticReports                                      
rails   |    for more details.                                                        
rails   | Don't forget to include the above Crash Report log file in bug reports.     
rails   | 
rails   | -- Control frame information -----------------------------------------------
rails   | c:0096 p:---- s:0659 e:000658 CFUNC  :worksheet_set_column
rails   | c:0095 p:0020 s:0650 e:000649 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fast_excel-0.2.6/lib/fast_excel/binding/worksheet.rb:324
rails   | c:0094 p:0031 s:0642 e:000641 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fast_excel-0.2.6/lib/fast_excel.rb:495
rails   | c:0093 p:0047 s:0634 e:000633 BLOCK  /Users/work/projects/some_project/app/services/reports/worksheets/templates/fast_base.rb:26 [FINISH]
rails   | c:0092 p:---- s:0629 e:000628 IFUNC 
rails   | c:0091 p:---- s:0626 e:000625 CFUNC  :each
rails   | c:0090 p:---- s:0623 e:000622 CFUNC  :each_with_index
rails   | c:0089 p:0006 s:0619 e:000618 METHOD /Users/work/projects/some_project/app/services/reports/worksheets/templates/fast_base.rb:24
rails   | c:0088 p:0017 s:0613 e:000612 METHOD /Users/work/projects/some_project/app/services/reports/worksheets/templates/fast_base.rb:9
rails   | c:0087 p:0014 s:0605 e:000604 BLOCK  /Users/work/projects/some_project/app/lib/reports/fast_base.rb:57 [FINISH]
rails   | c:0086 p:---- s:0600 e:000599 CFUNC  :each
rails   | c:0085 p:0031 s:0596 e:000595 METHOD /Users/work/projects/some_project/app/lib/reports/fast_base.rb:57
rails   | c:0084 p:0003 s:0591 e:000590 METHOD /Users/work/projects/some_project/app/lib/reports/fast_base.rb:66
rails   | c:0083 p:0029 s:0587 e:000585 METHOD /Users/work/projects/some_project/app/controllers/crm/pools_controller.rb:88
rails   | c:0082 p:0010 s:0581 e:000580 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/basic_implicit_render.r
rails   | c:0081 p:0009 s:0575 e:000574 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/abstract_controller/base.rb:194
rails   | c:0080 p:0024 s:0569 e:000568 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/rendering.rb:30
rails   | c:0079 p:0009 s:0564 e:000563 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/abstract_controller/callbacks.rb:42
rails   | c:0078 p:0048 s:0561 e:000559 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:109
rails   | c:0077 p:0021 s:0551 e:000550 METHOD /Users/work/projects/some_project/app/controllers/application_controller.rb:74
rails   | c:0076 p:0127 s:0547 e:000546 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118
rails   | c:0075 p:0021 s:0538 e:000537 METHOD /Users/work/projects/some_project/app/controllers/application_controller.rb:81
rails   | c:0074 p:0127 s:0534 e:000533 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118
rails   | c:0073 p:0036 s:0525 e:000524 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/react-rails-2.5.0/lib/react/rails/controller_lifecycle.rb:31
rails   | c:0072 p:0127 s:0520 e:000519 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118
rails   | c:0071 p:0124 s:0511 E:001ec8 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:136
rails   | c:0070 p:0006 s:0502 E:002648 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/abstract_controller/callbacks.rb:41
rails   | c:0069 p:0008 s:0497 e:000496 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/rescue.rb:22
rails   | c:0068 p:0009 s:0491 e:000490 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:34
rails   | c:0067 p:0010 s:0486 e:000485 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168
rails   | c:0066 p:0017 s:0483 e:000482 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb
rails   | c:0065 p:0023 s:0475 e:000474 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168
rails   | c:0064 p:0095 s:0469 e:000468 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:32
rails   | c:0063 p:0078 s:0463 e:000462 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal/params_wrapper.rb:256
rails   | c:0062 p:0026 s:0455 e:000454 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-5.2.3/lib/active_record/railties/controller_runtime.rb:
rails   | c:0061 p:0077 s:0449 e:000448 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/abstract_controller/base.rb:134
rails   | c:0060 p:0062 s:0442 e:000441 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionview-5.2.3/lib/action_view/rendering.rb:32
rails   | c:0059 p:0017 s:0436 e:000435 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal.rb:191
rails   | c:0058 p:0034 s:0429 e:000428 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_controller/metal.rb:252
rails   | c:0057 p:0010 s:0422 e:000421 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:52
rails   | c:0056 p:0036 s:0414 e:000413 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:34
rails   | c:0055 p:0007 s:0406 e:000405 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:18
rails   | c:0054 p:0026 s:0401 e:000400 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:48
rails   | c:0053 p:0111 s:0396 e:000395 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/journey/router.rb:52 [FINISH]
rails   | c:0052 p:---- s:0384 e:000383 CFUNC  :each
rails   | c:0051 p:0008 s:0380 e:000379 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/journey/router.rb:35
rails   | c:0050 p:0042 s:0375 e:000374 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:840
rails   | c:0049 p:0015 s:0369 e:000368 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/config.rb:17
rails   | c:0048 p:0072 s:0364 e:000363 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/remotipart-1.4.2/lib/remotipart/middleware.rb:32
rails   | c:0047 p:0035 s:0357 e:000356 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/tempfile_reaper.rb:15
rails   | c:0046 p:0007 s:0348 e:000347 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/etag.rb:25
rails   | c:0045 p:0048 s:0337 e:000336 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/conditional_get.rb:25
rails   | c:0044 p:0007 s:0328 e:000327 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/head.rb:12
rails   | c:0043 p:0026 s:0320 e:000319 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/http/content_security_policy.rb
rails   | c:0042 p:0026 s:0308 e:000307 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/session/abstract/id.rb:259
rails   | c:0041 p:0005 s:0297 e:000296 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/session/abstract/id.rb:253
rails   | c:0040 p:0026 s:0292 e:000291 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/cookies.rb:670
rails   | c:0039 p:0065 s:0282 e:000281 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:559
rails   | c:0038 p:0008 s:0276 e:000275 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/callbacks.rb:28
rails   | c:0037 p:0024 s:0273 e:000272 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:98
rails   | c:0036 p:0009 s:0264 e:000263 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/callbacks.rb:26
rails   | c:0035 p:0014 s:0257 e:000256 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/executor.rb:14
rails   | c:0034 p:0022 s:0249 e:000248 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/rollbar.rb:25
rails   | c:0033 p:0027 s:0243 e:000242 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rollbar-3.3.0/lib/rollbar.rb:145
rails   | c:0032 p:0045 s:0235 e:000234 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/rollbar.rb:22
rails   | c:0031 p:0026 s:0229 e:000228 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:
rails   | c:0030 p:0005 s:0218 e:000217 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rollbar-3.3.0/lib/rollbar/middleware/rails/show_exceptions.rb:22
rails   | c:0029 p:0026 s:0211 e:000210 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/show_exceptions.rb:3
rails   | c:0028 p:0041 s:0204 E:001f80 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-5.2.3/lib/rails/rack/logger.rb:38
rails   | c:0027 p:0008 s:0194 e:000193 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-5.2.3/lib/rails/rack/logger.rb:26
rails   | c:0026 p:0004 s:0191 e:000190 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71
rails   | c:0025 p:0012 s:0188 e:000187 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:28
rails   | c:0024 p:0010 s:0182 e:000181 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71
rails   | c:0023 p:0039 s:0177 e:000176 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-5.2.3/lib/rails/rack/logger.rb:26
rails   | c:0022 p:0038 s:0171 e:000170 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13
rails   | c:0021 p:0052 s:0166 e:000165 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/remote_ip.rb:81
rails   | c:0020 p:0019 s:0160 e:000159 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/request_store-1.4.1/lib/request_store/middleware.rb:19
rails   | c:0019 p:0038 s:0153 e:000152 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/request_id.rb:27
rails   | c:0018 p:0092 s:0147 e:000146 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/method_override.rb:22
rails   | c:0017 p:0020 s:0141 e:000140 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/runtime.rb:22
rails   | c:0016 p:0033 s:0131 e:000130 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-5.2.3/lib/active_support/cache/strategy/local_cache_mi
rails   | c:0015 p:0014 s:0124 e:000123 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/executor.rb:14
rails   | c:0014 p:0078 s:0116 e:000115 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/static.rb:127
rails   | c:0013 p:0007 s:0108 e:000107 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.0.8/lib/rack/sendfile.rb:111
rails   | c:0012 p:0208 s:0096 e:000095 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-cors-1.0.3/lib/rack/cors.rb:95
rails   | c:0011 p:0151 s:0083 e:000082 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.3/lib/webpacker/dev_server_proxy.rb:25
rails   | c:0010 p:0009 s:0078 e:000076 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-proxy-0.7.0/lib/rack/proxy.rb:63
rails   | c:0009 p:0016 s:0072 e:000071 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-5.2.3/lib/rails/engine.rb:524
rails   | c:0008 p:0028 s:0066 e:000065 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/configuration.rb:252
rails   | c:0007 p:0008 s:0061 e:000060 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/request.rb:77
rails   | c:0006 p:0023 s:0058 e:000057 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:340
rails   | c:0005 p:0286 s:0053 e:000052 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/request.rb:76
rails   | c:0004 p:0128 s:0032 e:000031 METHOD /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/server.rb:441 [FINISH]
rails   | c:0003 p:---- s:0020 e:000019 IFUNC 
rails   | c:0002 p:0099 s:0017 e:000014 BLOCK  /Users/work/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:147 [FINISH]
rails   | c:0001 p:---- s:0003 e:000002 (none) [FINISH]

Always generating sheets as right_to_left

no matters what i do, it always create the sheets as right_to_left, even if right_to_left was never called, i tried things like:
worksheet[:right_to_left]=0
worksheet[:right_to_left]=1
worksheet[:right_to_left]=false
worksheet.right_to_left
none gave me a normal left-to-right sheet

How to assign keywords, title in set_properties

I am trying to set the keyword property in the excel file as 'Confidential' by using the below method

workbook = FastExcel.open('./dummy.xlsx')
workbook.set_properties({ keywords: 'Confidential' })

It gives me error that "Argument is not a valid pointer"

After Going through the gem it looks like that it expects a DocProperties Object

d = Libxlsxwriter::DocProperties.new

d[:keywords] = 'Confidential'

workbook.set_properties(d)

When i try to assign d[:keywords] = 'Confidential' then it gives me error that "Cannot set string field"

Could you please let me know how to assign properties

New tagged release on RubyGems

Hi,

I was hoping that 0.2.4 could be pushed up to RubyGems

Additionally, if it's easy to upgrade libxlsxwriter to the latest version (0.7.7), then that would be appreciated. I see the diff for 0.7.6 => 0.7.7 is non-trivial though, so I'm not sure what that involves in terms of testing / validation.

Not installed in Docker

current directory: /bundle/gems/fast_excel-0.2.6
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.6.0 -r ./siteconf20190910-1-97hcrj.rb extconf.rb

current directory: /bundle/gems/fast_excel-0.2.6
make "DESTDIR=" clean
make[1]: Entering directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter'
make[2]: Entering directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter/src'
make[2]: Leaving directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter/src'
make[2]: Entering directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter'
make[2]: *** test/unit: No such file or directory.  Stop.
make[2]: Leaving directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter'
make[1]: *** [Makefile:35: clean] Error 2
make[1]: Leaving directory '/bundle/gems/fast_excel-0.2.6/libxlsxwriter'
make: *** [Makefile:13: clean] Error 2

current directory: /bundle/gems/fast_excel-0.2.6
make "DESTDIR="
Compiling ext/text_width ...
rake compile
/bundle/gems/bundler-2.0.2/lib/bundler/resolver.rb:287:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'fast_excel' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
	from /bundle/gems/bundler-2.0.2/lib/bundler/resolver.rb:255:in `each'
	from /bundle/gems/bundler-2.0.2/lib/bundler/resolver.rb:255:in `verify_gemfile_dependencies_are_found!'
	from /bundle/gems/bundler-2.0.2/lib/bundler/resolver.rb:49:in `start'
	from /bundle/gems/bundler-2.0.2/lib/bundler/resolver.rb:22:in `resolve'
	from /bundle/gems/bundler-2.0.2/lib/bundler/definition.rb:258:in `resolve'
	from /bundle/gems/bundler-2.0.2/lib/bundler/definition.rb:170:in `specs'
	from /bundle/gems/bundler-2.0.2/lib/bundler/definition.rb:237:in `specs_for'
	from /bundle/gems/bundler-2.0.2/lib/bundler/definition.rb:226:in `requested_specs'
	from /bundle/gems/bundler-2.0.2/lib/bundler/runtime.rb:108:in `block in definition_method'
	from /bundle/gems/bundler-2.0.2/lib/bundler/runtime.rb:20:in `setup'
	from /bundle/gems/bundler-2.0.2/lib/bundler.rb:107:in `setup'
	from /bundle/gems/bundler-2.0.2/lib/bundler/setup.rb:20:in `<top (required)>'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /bundle/gems/spring-2.1.0/lib/spring/commands.rb:33:in `<module:Spring>'
	from /bundle/gems/spring-2.1.0/lib/spring/commands.rb:4:in `<top (required)>'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /bundle/gems/spring-2.1.0/lib/spring/server.rb:9:in `<top (required)>'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /bundle/gems/spring-2.1.0/lib/spring/client/server.rb:9:in `call'
	from /bundle/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
	from /bundle/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
	from /bundle/gems/spring-2.1.0/bin/spring:49:in `<main>'
make: *** [Makefile:8: all] Error 1

make failed, exit code 2

Future intentions with fast_excel

Hey @Paxa !
Thank you for this gem. I'm interested what's your intention with it? I.e do you plan to update the libxlswriter source? Are there any blockers?Do you see some milestones? Do you plan to maintain this gem in future?

Thanks for your feedback!
Best regards

is fast_excel thread safe?

Hey!

We have some data, and want to query it from the DB, and export it to excel.

workbook = FastExcel.open(tmp_file_path, constant_memory: true)
sheet = workbook.add_worksheet('name)
sheet.write_row(0, column_names, workbook.bold_cell_format)

So the problem is, I want to write it parallelly.

limit = 50_000
count = 523_523 # whatever

0.step(count, limit).each do |offset|
  fork do
    data = db_query(offset, limit)

    data.each.with_index do |row, idx|
      sheet.write_row(
        offset + idx + 1,
        row
      )
    end
  end
end

Process.waitall
workbook.close

But the result is weird. Sometimes I have the half of the data, and sometimes a bit more. (but without empty rows!! which is super weird)
So the question is, fast_excel is thread unsafe, or I did miss something?

Errors encountered when test example.rb

/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/ffi-1.10.0/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/fast_excel-0.2.5/libxlsxwriter/lib/libxlsxwriter.so': dlopen failed: cannot locate symbol "fopen64" referenced by "/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/fast_excel-0.2.5/libxlsxwriter/lib/libxlsxwriter.so"... (LoadError)

Error happens when using with warble gem

I am using it ina jruby rails application. I have added to the Gemfile, bundle install is a success.
$ bundle install | grep fast
Using fast_excel 0.4.0

After creating the war file by using the warbler gem,
when I want to run the war file it is not able to find the gem and saying to install the missing gem.

$ java -jar rtti_web.war
2021-10-06 13:14:26.699:INFO::main: Logging initialized @189ms
2021-10-06 13:14:26.707:INFO:oejr.Runner:main: Runner
2021-10-06 13:14:26.851:INFO:oejs.Server:main: jetty-9.2.9.v20150224
2021-10-06 13:14:32.941:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
2021-10-06 13:14:33.198:INFO:/:main: INFO: jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f OpenJDK 64-Bit Server VM 11.0.11+9-Ubuntu-0ubuntu2.20.04 on 11.0.11+9-Ubuntu-0ubuntu2.20.04 +jit [linux-x86_64]
2021-10-06 13:14:33.199:INFO:/:main: INFO: using a shared (threadsafe!) runtime
uri:classloader:/jruby/rack/response.rb:294: warning: constant ::Fixnum is deprecated
uri:classloader:/jruby/rack/core_ext.rb:26: warning: constant ::NativeException is deprecated
Could not find fast_excel-0.4.0 in any of the sources
Run bundle install to install missing gems.
2021-10-06 13:14:36.766:INFO:/:main: An exception happened during JRuby-Rack startup|exit|--- System|jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f OpenJDK 64-Bit Server VM 11.0.11+9-Ubuntu-0ubuntu2.20.04 on 11.0.11+9-Ubuntu-0ubuntu2.20.04 +jit [linux-x86_64]|Time: 2021-10-06 13:14:36 +0530|Server: jetty/9.2.9.v20150224|jruby.home: uri:classloader://META-INF/jruby.home||--- Context Init Parameters:|jruby.max.runtimes = 1|jruby.min.runtimes = 1|public.root = /rtti_web|rails.env = development||--- Backtrace|SystemExit: exit| exit at org/jruby/RubyKernel.java:790| exit at org/jruby/RubyKernel.java:753|

at /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/gems/gems/bundler-2.2.28/lib/bundler/setup.rb:17| require at org/jruby/RubyKernel.java:1017| require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85| at /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/config/boot.class:3| load at org/jruby/RubyKernel.java:1052| at /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/config/boot.rb:1| require at org/jruby/RubyKernel.java:1017| require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85| load_environment at uri:classloader:/jruby/rack/rails/environment3.rb:23| load_environment at uri:classloader:/jruby/rack/rails_booter.rb:83| at <script>:1||--- RubyGems|Gem.dir: /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/gems|Gem.path:|/home/in-lt-89/.gem/jruby/2.6.0|uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared|/tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/gems|Activated gems:| jar-dependencies-0.4.1| did_you_mean-1.3.0| bundler-2.2.28||--- Bundler|Bundler.bundle_path: /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/gems|Bundler.root: /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF|Gemfile: /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/Gemfile|Settings:| gemfile = /tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/WEB-INF/Gemfile| quantuminventions.jfrog.io = santanu.bhattacharya:1Jamphibia_anura1| without = [:development, :test, :assets]||--- JRuby-Rack Config|compat_version = |default_logger = org.jruby.rack.logging.StandardOutLogger@225ddf5f|equals = <error: >|err = java.io.PrintStream@74badf19|filter_adds_html = true|filter_verifies_resource = false|ignore_environment = false|initial_memory_buffer_size = |initial_runtimes = 1|jms_connection_factory = |jms_jndi_properties = |logger = org.jruby.rack.logging.ServletContextLogger@59b3f754|logger_class_name = servlet_context|logger_name = jruby.rack|maximum_memory_buffer_size = |maximum_runtimes = 1|num_initializer_threads = |out = java.io.PrintStream@8315e4a|rackup = |rackup_path = |rewindable = true|runtime_arguments = |runtime_environment = |runtime_timeout_seconds = |serial_initialization = false|servlet_context = ServletContext@o.e.j.w.WebAppContext@63753b6d{/,file:/tmp/jetty-0.0.0.0-8080-rtti_web.war--any-145514313392485866.dir/webapp/,STARTING}{file:/home/in-lt-89/dev/rtti-web/web/rtti_web.war}|throw_init_exception = false|
2021-10-06 13:14:36.767:WARN:/:main: ERROR: initialization failed

Consider releasing pre-compiled gems (Windows)

Building native gems on Windows lately has been increasingly difficult (I've tried the last 2 hours troubleshooting various problems and still unable to). I've noticed some gems offer pre-compiled versions:

Example ffi:

  • 1.9.18 - March 06, 2017 x86-mingw32 (1.19 MB)
  • 1.9.18 - March 06, 2017 x64-mingw32 (1.2 MB)
  • 1.9.18 - March 03, 2017 java (9.5 KB)
  • 1.9.18 - March 03, 2017 (865 KB)

I think this would help increase the adaption and have other benefits too.

regenerate / update bindings

Hello!

I'm trying to access this enum, but it does not seem to exists in the binding. Maybe they need to be regenerated? Do you still have the command you used to generate the original binding?

Building on OpenBSD

Thanks for the great gem, this is so much better than using axlsx!

To build this gem on OpenBSD, I need to set MAKE=gmake. This is because some makefile uses GNU make concepts. I would like to create a PR to autodetect the existence of gmake on the system and if available use that automatically. I'm not sure how to incorporate this correctly into the gem, do you have any pointers?

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.