摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml 阅读全文
posted @ 2011-07-19 09:21 徐一贺 阅读(506) 评论(0) 推荐(1) 编辑
摘要: 1、在项目的引入中,引入Microsoft.Office.Interop.Excel程序集,最好的11.0版本的。2、在源文件中的using 中,使用using Excel = Microsoft.Office.Interop.Excel;3、类似函数: /// <summary> /// 导出Excel的方法 /// </summary> private void ExportExcel(DataGridView ds) { //DataSet ds = ;//数据源 if (ds == null) return; string saveFileName = &quo 阅读全文
posted @ 2011-07-19 08:35 徐一贺 阅读(561) 评论(0) 推荐(1) 编辑