0

So I'm working on setting up axlsx_rails in my rails app and am running into a consistent issue where the downloaded xlsx does not display any non-numeric characters. It also does not print any cells that contain a non-numeric character (i.e. "1p") would be a blank cell.

this is the file in the axlsx file:

wb = xlsx_package.workbook
wb.add_worksheet(name: "classes") do |sheet|
  @student.classes.each do |class|
    sheet.add_row [class.name, "1"]
  end
  sheet.add_row ["p", "2", "e", "3"]
end

The controller code is

class App::Company::ReportsController < ApplicationController
  include Concerns::UserRequirements
  include Concerns::SchoolRequirements

   skip_before_action :verify_authenticity_token
   layout :false

  def holders
    @student = Student.find(params[:id])
    render xlsx: "holders", template: "app/company/reports/holders.xlsx"

  end
end

Does anyone know what may be causing this?

mosquito242
  • 353
  • 5
  • 17

0 Answers0