All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
C#中定义鼠标指针为指定的图片实例
用C#实现pdf文件的完整性验证_[Asp.Net教程]
在asp.net网页中实现tabPage功能(上)_[Asp.Net教程]
Ajax的缺点_[AJAX教程]
应用实例:用javascript实现定时任务_JavaScript技术_编程技术
.Net开发常用十大辅助软件_[Asp.Net教程]
SQL Server 2005重新安装不上的问题及其解决_[SQL Server教程]
Delphi类似Windows xp的程序界面
如何使用PHP通过SMTP发送电子邮件_php资料_编程技术
Ajax实例教程-----级联菜单_[AJAX教程]
Reading number is top 10 pictures
Sell the barbecue as says father du breul2
Female model behind the bitterness, often being overcharged4
Photographed the passion of the clients and prostitutes in the sex trade picture2
好身材能把衣服穿出3D效果
八个盛产美女的国家2
Fierce chengdu woman, street rape man
The real super beauty3
Li Zongrui hunting video screenshots1
Hunan province aizhai super-large suspension bridge open to traffic and 4 world first1
Sexy women in 2013--2
Download software ranking
WebService在.NET中的实战应用教学视频 → 第5集
美女写真2
Tram sex maniac 2 (H) rar bag5
功夫熊猫2(下集)
尖东毒玫瑰A
SP4 for SQL2000
Tram sex maniac 2 (H) rar bag18
Ashlynn Video5
好色的外科大夫
徐若瑄成名作“魔鬼天使”
delv published in(发表于) 2014/1/23 3:10:59 Edit(编辑)
asp.net从数据库导出数据到word、excel、txt文本文件_[Asp.Net教程]

asp.net从数据库导出数据到word、excel、txt文本文件_[Asp.Net教程]

asp.net从数据库导出数据到word、excel、txt文本文件_[Asp.Net教程]

using System;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using Excel;
using Word;
using System.IO;
namespace Common
{
///
/// 把数据导入到.doc、.txt、.xls文件中
///

public class Export
{
private const string DATAWORDPATH = @"C:\folder\doc\datadoc\";
private const string IMAGEWORDPATH = @"C:\folder\doc\imagedoc\";
private const string IMAGEPATH = @"C:\folder\image\";
private const string EXCELPATH = @"C:\folder\excel\";
private const string TXTPATH = @"C:\folder\txt\";
private const string IMAGEPOSTFIX = ".bmp";
private const string WORDPOSTFIX = ".doc";
private const string EXCELPOSTFIX = ".xls";
private const string TXTPOSTFIX = ".txt";
private const int DATADISTANCE = 5;
private const int TABDISTANCE = 8;

public Export()
{
//
// TOD 在此处添加构造函数逻辑
//
}
///
/// 获得数据集Dataset--------------------------------用于调试
///

/// Dataset
public DataSet GetData()
{
try
{
string sConnectionString;
sConnectionString = "workstation id=GUOFU;packet size=4096;user id=sa;data source=GUOFU;persist security info=True;initial catalog=YC;password=sc";
SqlConnection objConn = new SqlConnection(sConnectionString);
objConn.Open();
SqlDataAdapter daPoint = new SqlDataAdapter("Select * From Point", objConn);
DataSet dsYC = new DataSet("YC");
daPoint.FillSchema(dsYC,SchemaType.Mapped, "Point");
daPoint.Fill(dsYC,"Point");
daPoint = new SqlDataAdapter("Select * From Employee", objConn);
daPoint.FillSchema(dsYC,SchemaType.Mapped, "Employee");
daPoint.Fill(dsYC,"Employee");
return dsYC;
}
catch(Exception ex)
{
throw new Exception(ex.Message);
}

}







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.