Posted on: 1/20/2014 6:28:43 AM | Views : 400

Hi all, I need help from you guys. I need to pull data from database and create/save it in memory stream. After that, i wan get the excel file that i had created in memory stream and attached it together in my email before send out. I can successfully send the email out, but i got error return when i tried to open the excel file that attached in the email i recieved. 

Error return :
Excel cannot open the file 'EasyEditCmsGridData.xlsx' because the file format or file extension is not vaalid. Below are the code:
protected void btnEmail_Click(object sender, EventArgs e) { ProcessRequest(); } public void sendEmail() { MySqlConnection mysqlConnection = new MySqlConnection(mysqlConnString); MySqlCommand mysqllCmd = new MySqlCommand(); string mailBody; string to; to = "test@yahoo.com& ...

Go to the complete details ...