Questions tagged [rubyxl]

RubyXL is a ruby lib for reading/writing/modifying .xlsx and .xlsm files

RubyXL is a ruby lib for reading/writing/modifying .xlsx and .xlsm files

44 questions
1
vote
3 answers

Update cell values referenced by a formula with RubyXL

I have a xlsx with values in cells, many of them are referenced with a formula in other cell (in the same sheet). Im working with RubyXL because i wasn't found another gem which help me to write, edit and save an existed xlsx file. Now to be clear,…
Pistorius
  • 97
  • 1
  • 11
1
vote
0 answers

Trying to color the cells of an excel sheet once data is verified in ruby-capybara

Below is my code where i try to find the text from the excel sheet and click that 'text' on the application. Once done I want to color that particular cell(where the text is located ) in green color. require 'rubyXL' require 'roo' workbook =…
RPD
  • 47
  • 8
1
vote
1 answer

How to copy/write in excel sheet using rubyXL gem. Please advice

I am using the below option 'add' worksheet1.add(2, 6, "A1") I need to copy the text A1 in (2,6). Error message is get is "undefined method `add' for # (NoMethodError)"
RPD
  • 47
  • 8
1
vote
2 answers

RubyXL - Copying cells between the sheets

How can I copy a cell from one sheet (or worksheet) with all styles (not only value) and paste to another? Thanks for answer.
Costy
  • 165
  • 2
  • 14
1
vote
1 answer

how to convert RubyXL workbook to binary in rails

I used gem RubyXL to export something to a workbook, and I do not want to use workbook.write() to create a file, but want to save the workbook to mysql DB as binary. how can i convert the RubyXL workbook to binary?
xiaoniumumu
  • 21
  • 1
  • 6
1
vote
1 answer

Parsing a specific section of an Excel Spreadsheet with RubyXL

I'm trying to get a table, for example A1:A9 to G1:G9. My problem is, there are other elements in the sheet that I don't want to iterate through. workbook = RubyXL::Parser.parse("excelFIle.xlsm") worksheet = workbook[0] data =…
guboi
  • 197
  • 2
  • 13
1
vote
2 answers

RubyXL returns HEX Cell code while read a cell

I am trying read a book with RubyXL, but always return me a Hex code like: # workbook = RubyXL::Parser.parse("issues.xlsx") worksheet = workbook[0] worksheet.extract_data # Produces a simple…
Benjamin RD
  • 11,516
  • 14
  • 87
  • 157
1
vote
0 answers

Upload/Parse an Excel doc in Rails App

I am creating an app that has an option to add single entries to a database model as well as upload multiple from an Excel doc. I am following the rails guides on uploading and am hoping there is a way to utilize the RubyXL gem to upload the Excel…
Utopia025
  • 1,181
  • 3
  • 11
  • 21
1
vote
1 answer

rubyXL with dates - spec works, actual use doesn't

Using rubyXL to handle xlsx files with dates. The spec for date handling passes, but when I try to replicate it in my own script, it doesn't work. Instead, it leaves the dates as floats/numbers (which is how dates are stored in excel). I downloaded…
Jeff Tratner
  • 16,270
  • 4
  • 47
  • 67
0
votes
0 answers

How to disable the "Autocomplete for cell values" on Excel using Ruby?

While exporting the EXCEL file using Ruby or Rails, I faced something that needs to be disabled the Autocomplate for cell values. Is there any solution for it? require 'rubyXL' workbook = RubyXL::Workbook.new worksheet =…
0
votes
0 answers

External driver for Excel for end-to-end tests

Is there an external driver for Excel (e.g., something roughly analogous to chromedriver) that would let me write end-to-end tests for a complex spreadsheet setup? I have a script that generates a somewhat complex Excel spreadsheet, and I'd like to…
Zack
  • 6,232
  • 8
  • 38
  • 68
0
votes
1 answer

How to use rubyXL to lock existing cells but leave all empty cells unlocked?

How do I use rubyXL to lock the existing cells in a worksheet but leave all empty cells unlocked? (I don't want to make the user jump through any hoops like requiring him or her to create a new column before entering new data.) I figured out how to…
Zack
  • 6,232
  • 8
  • 38
  • 68
0
votes
2 answers

How do I hide columns using rubyXL 3.4.0 or later?

How do I hide columns using rubyXL 3.4.0 or later? The example here (https://github.com/weshatheleopard/rubyXL/issues/145) appears to be out-of-date. (sheet.cols.find now returns an Enumerator, so doesn't have a hidden method.) Code from rubyXL…
Zack
  • 6,232
  • 8
  • 38
  • 68
0
votes
2 answers

RubyXL export array to xlsx file

I have an array of data which I want to export to xlsx file. An array size depends on input data so the array size will change and using add_cell is problematic. Is there any way to add rows with data to workbook?
mila002
  • 327
  • 3
  • 14
0
votes
1 answer

Auto resizing of the font on RubyXL

I'm currently working on the ruby on rails project which handles excel sheets. I'm using RubyXL for it. https://github.com/weshatheleopard/rubyXL What I have no idea about it is how to shrink the texts to fit the cell. I believe that this…