Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing template #7

Open
ndemoreau opened this issue Jan 7, 2014 · 1 comment
Open

Missing template #7

ndemoreau opened this issue Jan 7, 2014 · 1 comment

Comments

@ndemoreau
Copy link

I tried to create a .xlsx.axlsx template but I get this error message:

Missing template item_refs/index, application/index with {:locale=>[:fr], :formats=>[:xlsx], :handlers=>[:erb, :builder, :raw, :ruby, :slim, :jbuilder, :coffee]}

My controller is like so:

def index
@item_refs = ItemRef.filtered_by(params[:q]).order(sort_order).first(10)
respond_to do |format|
format.html
format.js
format.xlsx { render :xlsx => "index", filename: 'items.xlsx'
}
end
end

And this is my view (index.xlsx.axlsx):

ItemRef.to_xlsx package: xlsx_package

xlsx_package.workbook.worksheets.first.tap do |sheet|
sheet.add_row ["First Column", "Second", "Third"]
sheet.add_row [1, 2, 3]
sheet.add_row [' preserving whitespace']
end

Am I doing something wrong? Thanks.

@straydogstudio
Copy link

@ndemoreau Looks like you are having an issue with axlsx_rails, not acts_as_xlsx. It isn't finding the template. Have you solved your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants