datagrid|excel|打印|导出excel|函数 一个通用的Datagrid导出Excel打印的源函数闲暇之余,写成函数,供新人研究学习 'Power by:Landlordh '列宽默认为datagird的tablestyles(0)列宽的五分之一 'G2E(dg1) Public Function G2E(ByVal dg As DataGrid) Dim dt As New DataTable Try dt = CType(dg.DataSource, DataTable) Cat
namespace AsterDnet{ using System; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Drawing.Printing; using System.IO; using System.Data ; using System.Data.SqlClient ; /// <su