-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malformed xlsx file with jruby #99
Comments
Does jruby support FFI?
May be run same code on C Ruby and J Ruby, then extract xlsx file (which is
zip file with xml inside) and compare content?
…On Mon, 15 Jan 2024 at 16.18 Şenol Feldmann ***@***.***> wrote:
The gem seems to produce faulty xlsx files when using jruby (tested on x86
MacOS and fast_excel 0.5.0). I tried jruby versions 9.2.21.0, 9.3.13.0 and
9.4.5.0.
Excel complains about the xlsx file being corrupted and offers to repair
them. After the repair, no files are missing. The same behaviour can be
observed even when producing an empty workbook. Steps to reproduce:
require 'fast_excel'
wb = FastExcel.open# it does not matter what we do in between, whether we add a sheet or not# the output is "corrupted" nonetheless wb.close
—
Reply to this email directly, view it on GitHub
<#99>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGLI7UBNK5NGECZF5D7I3YOTX7PAVCNFSM6AAAAABB26BBMCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4DCNJZGIZTMOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yes, jruby does indeed support FFI. I compared the checksums of all files inside the xlsx/zip and "docProps/core.xml" and "xl/worksheets/sheet1.xml" differ between CRuby and JRuby under MacOS. for docProps/core.xml xl/worksheets/sheet1.xml seems to be the problem. With CRuby, we get the correct formatting of pageMargins data: When using JRuby, the data is as follows: My OS is currently set to German, and in German "," is the default decimal separator. When I set the OS language and number format to English, everything works just fine. JRuby somehow refers to the decimal separator set by the OS language, although it shouldn't in this case. Edit: The same error also happens on Linux (Tested on Ubuntu Focal). When I set the locale (env variable |
The gem seems to produce faulty xlsx files when using jruby (tested on x86 MacOS and fast_excel 0.5.0). I tried jruby versions 9.2.21.0, 9.3.13.0 and 9.4.5.0.
Excel complains about the xlsx file being corrupted and offers to repair them. After the repair, no files are missing. The same behaviour can be observed even when producing an empty workbook. Steps to reproduce:
The text was updated successfully, but these errors were encountered: