I'm having some issues trying to remove the title form an Excel export. Right now I'm extending the buttons to set the filename, but when I export the file the first row is the page title that's set in my HTML page. I saw that this can be removed from the file by setting the title to an empty string. This works for CSV and PDF files, but when I open the Excel file I get a message from Excel that there was a problem with the content in the file being generated (This happens if I set the title to null as well). I get a modal popup from Excel asking if I want to continue. When the load is complete the file appears to be correct, but I need to be able export the excel file without a huge error message appearing every time. Anyone have any experience with this? Below is the code:
$(document).ready(function () {
$('#<%= gvReport.ClientID %>').DataTable({
dom: 'Bfrtip',
buttons: [
{
extend: 'excel',
filename: 'MostRecentVideoCreatedByDealer',
title: ''
},
{
extend: 'csv',
filename: 'MostRecentVideoCreatedByDealer',
title: ''
},
{
extend: 'pdf',
filename: 'MostRecentVideoCreatedByDealer',
title: ''
}
],
paging: false,
searching: false,
order: [[1, 'desc']]
});
})
Thanks!