经常项目上有导入excel的需求,其实导入一个固定格式的excel数据非常容易,但是,发现一个问题就是,导入excel后,用户在打开excel时,必须要打开2次才能打开excel,这让人很不爽:开始查找原因:excel的进程关闭不了,资源不能释放,于是就想尽办法释放com对象excel实例: public Excel.Application app; //Excel对象 public Excel.Workbooks wbs; //工作簿集 public Excel.Workb
向先原来就有数据的Excel写数据是不会覆盖原有的数据,只是在追加数据. public class Excel { public Excel() { } public void CreateWorkbook(File file, double[] a) { try { if (!file.exists()) { //判断文件是否已存在,如果没有存在则创建新文件 jxl.write.WritableWo
原文链接:http://blog.sina.com.cn/s/blog_53855ace0100ded4.html 首先,我们需要使用linux下另外一个ps命令查找与进程相关的PID号:ps auxgrepprogram_filter_word ps a 显示现行终端机下的所有程序,包括其他用户的程序. ps -A 显示所有程序. ps c 列出程序时,显示每个程序真正的指令名称,而不包含路径,参数或常驻服务的标示. ps -e 此参数的效果和指定"A"参数相同. ps e 列出程序
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; namespace ProcessKill { public parti