I am able to download the excel sheet with its content. Kindly let me know how to remove excel sheet contents as soon as it got downloaded.
function(){
$.ajax({
/* url : baseURL+'Welcome/downloadornot',
type : 'POST',
data : formData,
//async : false,
cache : false,
contentType : false,
processData : false,*/
success : function(isConfirm) {
// var result = JSON.parse(response);
//function(isConfirm){
if (isConfirm) {
window.location.href = "<?php echo base_url() . 'system/file-' . $a . "_" . $b . date('y-m-d') . '.csv'?>";
}
function() {
<?php unlink('system/file-'.$a."_".$b.date('y-m-d').'.csv');?>
}
}
}
});
});