I am creating a table in a view for a asp.net MVC project. The table template itself is already set up in the view (hardcoded) and i populate the table via javascript using json data from ajax. The table is populating the way I want it too though when I use the Datatable excel button it creates the table in excel but there is no data just the column names.
For reference I am using the example at https://datatables.net/extensions/buttons/examples/html5/simple.html
I have all the dependencies listed in the above link. I harcoded one row into the table and that works when I export the table to excel but not my dynamic data from my script.
I have tried putting the jquery excel button creation code in different parts of my script and that has not work (as you will see in my code) It is only working when i hardcoded a row in the table, not with dynamic data being created and put in the table
`
Event Name | Start Date | End Date | Peoplesoft_ID | First Name | Last Name | Workday_ID | District Name | District Code | Donation Date | Amount | Recurring Periods | Gift |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Easter Event | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test | Hardcoded Test |
`