def to_xlsx_file(file_path="tmp", file_name="export")
      path = "#{file_path}/#{file_name}_#{Time.now.to_i}_#{SecureRandom.hex}.xlsx"
      workbook = FastExcel.open(path, constant_memory: true)
      worksheet = workbook.add_worksheet("Default")

      bold = workbook.bold_cell_format
      worksheet.set_row(0, FastExcel::DEF_COL_WIDTH, bold)

      rows! do |columns, model, x|
        worksheet.write_row(x, columns)
      end

      workbook.close
      path
    end
def to_xlsx_file(file_path="tmp", file_name="export")
      path = "#{file_path}/#{file_name}_#{Time.now.to_i}_#{SecureRandom.hex}.xlsx"
      workbook = FastExcel.open(path, constant_memory: true)
      worksheet = workbook.add_worksheet("Default")

      bold = workbook.bold_cell_format
      worksheet.set_row(0, FastExcel::DEF_COL_WIDTH, bold)

      rows! do |columns, model, x|
        worksheet.write_row(x, columns)
      end

      workbook.close
      path
    end
新版 Excel (outpuut: path)