Export to Excel possible with list from model in view ASP.NET MVC?
New DiscussionI’m working on a ASP.NET MVC application where I have a custom made table with data from a list in the model that I pass into the view. This data is not in a grid of Infragistics. I want to export this data to Excel.
Currently I have this in my Javascript:
$("#btnExportToExcel").click(function () {
console.log("exporting to Excel");
$.ig.GridExcelExporter.exportGrid("@Model.labortimeReports)",
{ fileName: "bookreport_" + $('#startDateDatePicker').val() }, { } );
});
I’m trying to pass the list from my model for exporting it to Excel, but is does not work.
Is it possible to export this list to Excel without having to create a grid for this?
Or am I using the wrong version(s)? I’m currently using these:
<!-- Ignite UI Required Combined CSS Files --> <link href="">cdn-na.infragistics.com/.../infragistics.theme.css" rel="stylesheet"> <link href="">cdn-na.infragistics.com/.../infragistics.css" rel="stylesheet"> <!--Required scripts--> <script src="">igniteui.com/.../script> <script src="">code.jquery.com/.../script> <script src="">code.jquery.com/.../script> <!-- External files for exporting --> <script src="">www.igniteui.com/.../script> <script src="">www.igniteui.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script> <script type="text/javascript" src="">cdn-na.infragistics.com/.../script>
I also have tried to create an igGrid with this data and hide this. But I still can’t export to excel. I get this error:

Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
7 Created On
Apr 16, 2019 Last Post
6 years, 10 months ago 