2010年9月3日

[转]C#操作Excel文件

摘要: 摘要:本文介绍了Excel对象、C#中的受管代码和非受管代码,并介绍了COM组件在.net环境中的使用。  关键词:受管代码;非受管代码;Excel对象;动态连接库  引言  Excel是微软公司办公自动化套件中的一个软件,他主要是用来处理电子表格。Excel以其功能强大,界面友好等受到了许多用户的欢迎。在设计应用系统时,对于不同的用户,他们对于打印的需求是不一样的,如果要使得程序中的打印功能适用... 阅读全文

posted @ 2010-09-03 16:33 shaya 阅读(586) 评论(0) 推荐(1)

C# byte[]和文件FileStream相互转化

摘要: usingSystem.IO;//读filename到byte[]privatebyte[]ReadFile(stringfileName){FileStreampFileStream=null;byte[]pReadByte=newbyte[0];try{pFileStream=newFileStream(fileName,FileMode.Open,FileAccess.Read);Binar... 阅读全文

posted @ 2010-09-03 12:18 shaya 阅读(1127) 评论(0) 推荐(0)

C#中常用的经典文件操作方法

摘要: C#中常用的经典文件操作方法 阅读全文

posted @ 2010-09-03 11:39 shaya 阅读(159) 评论(0) 推荐(0)

OnPaint事件

摘要: protected override void OnPaint(PaintEventArgs pe){ if (this.pictureBoxState[0x20]) { try { if (this.WaitOnLoad) { this.Load(); } else { this.LoadAsync(); } } catch (Exception exception) { if (ClientU... 阅读全文

posted @ 2010-09-03 11:38 shaya 阅读(473) 评论(0) 推荐(0)

文件的权限设制

摘要: using Microsoft.Win32.Security;private Boolean CreateDir(String strSitePath, String strUserName) {Boolean bOk;try {Directory.CreateDirectory(strSitePath);SecurityDescriptor secDesc = SecurityDescripto... 阅读全文

posted @ 2010-09-03 11:34 shaya 阅读(227) 评论(0) 推荐(0)

导航