ASP.NET (VB) รบกวนแนะนำวิธี export ข้อมูลไปยัง ms word .doc หน่อยคับ
แปลงเป็น C# ให้ครับ
Code (C# to Word Document)
public void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "Attachment;Filename=Word.doc");
Response.Buffer = true;
Response.Charset = "UTF-8";
Response.ContentType = "application/vnd.word";
Response.write("<table width=500 border=1>");
Response.write(" <tr>");
Response.write("<td>Column1</td>");
Response.write("<td>Column2</td>");
Response.write("<td>Column3</td>");
Response.write(" </tr>");
Response.write(" <tr>");
Response.write("<td>1</td>");
Response.write("<td>2</td>");
Response.write("<td>3</td>");
Response.write(" </tr>");
Response.write(" <tr>");
Response.write("<td>4</td>");
Response.write("<td>5</td>");
Response.write("<td>6</td>");
Response.write(" </tr>");
Response.write("</table>");
}
Date :
2012-02-15 10:21:42
By :
webmaster
openoffice มันมี Library ให้เลือกใช้หรือเปล่าครับ
Date :
2012-02-15 12:52:54
By :
webmaster
ขอโทษนะค่ะคือไม่รู้ว่าตัวไหนค่ัะ
Date :
2012-02-15 13:41:10
By :
fight2932
Load balance : Server 00