//查询sys_username以S.00655开头的用户 ),sys_password FROM `tbl_sa_syslogin` where sys_username like 'S.%'; //修改S.00655用户的密码等于S码 ) where sys_username like 'S.%'; */ //建立一个中间导出表 create table tbl_export_network( id int, sys_username ), sys_password ), network_n
SQL 导出表结构到Excel SELECT 表名 then d.name else '' end, 表说明 then isnull(f.value,'') else '' end, 字段序号 = a.colorder, 字段名 = a.name, 标识 then '√'else '' end, 主键 FROM sysobjects where xtype='PK' and parent_obj=a.id and name in ( SELECT name FROM sysindexes WHE
最近在做一个发邮件的功能,客户要求需要导出一个Excel附件,并给了附件的格式, eg: Last Name 姓 First Name 名 Chinese Characters汉字书写(仅大陆人填写) 实现方式有两种: 一.使用Microsoft.Office.Interop.Excel组件的方式 二.使用NPOI的方式 下面讲一下这两种方式的具体实现: 一.使用Microsoft.Office.Interop.Excel组件的方式 该方式需要引入Microsoft.Office.I
在上一篇<NPOI操作excel之读取excel数据>我们把excel数据写入了datatable中,本篇就讲如何把datatable数据写入excel中. using System; using System.Data; using System.IO; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using NPOI.HSSF.UserModel; namespace NPOIOprateExcel { public class