Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4633

Problem Generating .xlsx File from Tilde-Delimiited File

$
0
0

When I try to convert a tilde-delimited file to a .xlsx using the code below, I get this error:

"Unable to activate axlsx-2.0.1, because rubyzip-2.3.2 conflicts with rubyzip (~> 1.0.0) ..."

Load the tilde-delimited file

csv = Roo::Spreadsheet.open(fid, extension: :csv, col_sep: '~')

Create a new Excel workbook

Axlsx::Package.newdo |p|p.workbook.add_worksheet(name: 'Sheet1')do |sheet|csv.each_with_indexdo |row, row_index|row.each_with_indexdo |cell, col_index|sheet.add_row([cell])endendendp.serialize(fidx)end

Uninstalling and then reinstalling axlsx and rubyzip.


Viewing all articles
Browse latest Browse all 4633

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>