摘要: using System;using System.Data;using System.Drawing;using System.Data.SqlClient;using Excel;powered by 25175.netusing Word;using System.IO;namespace Common{/// <summary>/// 把数据导入到.doc、.txt、.xls文件中/// </summary>public class Export{ private const string DATAWORDPATH = @"C:\folder\doc\ 阅读全文
posted @ 2011-07-07 15:01 立伟 阅读(1175) 评论(0) 推荐(0)
摘要: .net将数据导出Word1,首先要导入Com文件Microsoft Word 11.0 Object Library.2.声明using System.Text.RegularExpressions;powered by 25175.net-----------------------------------------------------------------3.执行下面步骤Object Nothing = System.Reflection.Missing.Value; //取得Word文件保存路径 object filename = System.Web.HttpRuntime. 阅读全文
posted @ 2011-07-07 15:00 立伟 阅读(1214) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using PublicProject.ENTITY;using System.Data;using System.IO;using System.Data.OleDb;using PublicProject.BLL;public partial class 使用Excel读取数据 : System.Web.UI.Page{ //集合 private List< 阅读全文
posted @ 2011-07-07 14:59 立伟 阅读(1638) 评论(0) 推荐(0)
摘要: //到出到Excel事件 protected void ImageButton2_Click(object sender, ImageClickEventArgs e)powered by 25175.net { Scores score = new Scores(); //创建Scores对象 DataSet ds = score.QueryScore(); //调用QueryScore方法查询成绩并将查询结果放到DataSet数据集中 DataTable DT = ds.Tables[0]; //生成将要存放结果的Excel文件的名称 string NewFileName = DateTi 阅读全文
posted @ 2011-07-07 14:56 立伟 阅读(431) 评论(0) 推荐(1)