Tinymce data export and dowonload to excel file

283 views Asked by At

I want to download tinymce data export to excel file,i am using asp.net with C#, I copy the tinymce data http://jsfiddle.net/pybp6/198/

how can i do this?Should i do using Jquery or C#?

i tried with C# its dowonload and export but showing white background of excel not showing column and rows

string extension = GetOfficeVersion();
            StringBuilder StrBuilder = new StringBuilder();
            StrBuilder.Append("<table cellpadding='0' cellspacing='0' border='0' class='Messages' id='idTbl' runat='server'><tr><th>date</th><th>Subject</th></tr><tr class='myHot_smsMessages_new'><td>01/01/2014</td><td>Some Subject No 1</td></tr><tr class='myHot_smsMessages_new'><td>10/12/2013</td><td>Some subject no 2</td></tr></table>");
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Charset = "";
            HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
            HttpContext.Current.Response.AddHeader("Content-Disposition", "filename=ExcelFile." + extension);
            HttpContext.Current.Response.Write(StrBuilder);
            HttpContext.Current.Response.End();
            HttpContext.Current.Response.Flush();
0

There are 0 answers