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
8
votes
4 answers

Unable to download data from http://rubygems.org/

I wanna export xlsx excel file using ruby in ROR so i'm install rubyXL. i use this command: sudo gem install rubyXL --source http://rubygems.org and then it have error like below ERROR: Could not find a valid gem 'rubyXL' (>= 0), here is why: …
Ma YongChhin
  • 427
  • 3
  • 10
  • 24
7
votes
2 answers

How do I create a date-formatted cell using RubyXL?

I'm using RubyXL to dynamically generate a spreadsheet file that contains some dates. The documentation is kind of sparse so I've been looking at the source, and it appears the library only has special handling for Date and DateTime when you call…
benzado
  • 82,288
  • 22
  • 110
  • 138
6
votes
4 answers

RubyXL: How to add multiple cells of data to a worksheet?

How can I add an entire array of cells to a row? I have something like this-> w = RubyXL::Workbook.new w.add_worksheet("Test") test_sheet = w["Test"] test_sheet.add_cell(0, 0, "abc") #this adds abc to row 0 and column 0 arr =…
KavitaC
  • 635
  • 7
  • 29
3
votes
1 answer

How can we protect some parts of a sheet using rubyXL?

I'd like the user of my xlsx spreadsheet to edit some parts of a sheet but not the most of it. Or in other words, I'd like only some parts of the sheet to be protected. I learned how to protect the sheet using rubyXL with the code…
Junjie
  • 491
  • 1
  • 6
  • 13
3
votes
3 answers

how to use rubyxl to access the first row

workbook = RubyXL::Parser.parse(params[:file].path) worksheet = workbook[0] puts worksheet.sheet_data[0][0] But I am getting this as output My excel sheet is of this form name coupon …
gates
  • 4,465
  • 7
  • 32
  • 60
3
votes
2 answers

Downloading workbook without saving it to disk rubyxl in Rails

Rails 4.2 RubyXL I am using the RubyXL to create a workbook. I can write it disk with: workbook.write("path/to/desired/Excel/file.xlsx") and then download it with something like this: send_file(workbook.write("path/to/desired/Excel/file.xlsx"),…
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
3
votes
2 answers

Create multiple sheets that uses same template using rubyxl

I have an excel template which has only one sheet(Sheet1).Is it possible using rubyxl to generate multiple sheets that uses Sheet1 as template in my output file?
zoro
  • 65
  • 1
  • 9
3
votes
1 answer

rubyXL (Errno::ENOENT)

I'm having trouble with a crawler I'm building using rubyXL. It's correctly traversing my file system, but I am receiving an (Errno::ENOENT) error. I've checked out all the rubyXL code and everything appears to check out. My code is attached below -…
Anconia
  • 3,888
  • 6
  • 36
  • 65
2
votes
3 answers

How I get the row number in a iteration using RubyXL?

Using RubyXL I want to know what row number my iteration is. workbook = RubyXL::Parser.parse("./file.xlsx") worksheet = workbook[0] worksheet.each do |row| test0 = row[0].value line = ???? puts "Line number #{line} - Value…
Ricardo
  • 23
  • 5
2
votes
2 answers

How to access the column/row info of existing content of a xlsx file

I want to get the info of the last column and row of an existing xlsx file so that I can append new contents right below the existing content. How do I do so with RubyXL? If that's not possible, what alternative gem would you recommend?
Jackson Gong
  • 75
  • 1
  • 9
2
votes
1 answer

rubyXL iterate through specific column from xslx

i am new to ruby and rubyXL and have (maybe) a simple question. I have an Excel File which i parse with RubyXL. then i want to save all values from column B into an array. And i don't know how to get this done. Maybe someone can help me? @workbook…
Frost
  • 139
  • 1
  • 3
  • 11
2
votes
0 answers

Running an excel macro using rubyXL

I am using rubyXL version 3.3.16. I and trying to interact with a .xlsm document to perform data read/write. There is also a macro within the worksheet which I need to run at the end. Is there a way I could run the excel macros using rubyXL version…
John
  • 21
  • 2
2
votes
1 answer

Reading Worksheet name when using RubyXL to load file created by Axlsx

I am facing some problems reading excel files created with the Axlsx module via RubyXL. The specific code is this require 'axlsx' require 'RubyXL' #Create the Excel doc with Axlsx with two sheets named My Sheet1 and My Sheet 2 Axlsx::Package.new do…
Sudhir
  • 736
  • 1
  • 11
  • 23
1
vote
1 answer

Why Does Hyperlink Developed In RubyXL Work In LibreOffice And Not Excel

I am working in Rails with RubyXL. I'm trying to create links to the different tabs in the file. When I try the links in LibreOffice (Version: 4.3.7.2), the links works great, but when I try them in Excel (Office 16) in Windows, an error message…
Urroner
  • 11
  • 2
1
vote
0 answers

How to add content to a worksheet by referencing its name in ruby using axlsx gem?

I have created a workbook with multiple worksheets using axlsx. I've also given names to each of the worksheets. Now, I want to add content to one of the existing worksheets. Is there any way to reference the worksheet I want to add content to? That…
1
2 3