有坑的地方: 如果代码写成这样: [( os.path.abspath(x)) for x in os.listdir(startPath) ] 此代码只能用于当前目录下,listdir列出的都只是文件名,然后abspath(x)对着一个文件名找绝对路径,肯定不行,电脑里同名的文件那么多,你要找哪个? 同样,isfile()也不同用于一个文件名,所以这些函数都只是对当前目录下的操作 import os,sys #编写一个程序,能在某目录以及其所有子目录下查找文件名包含指定字符串的文件,并打印出相…
代码: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Microsoft.Office.Interop.Excel; using System.Diagnostics; using System.IO; using Microsoft.Office.Interop.Word; namespace Suya.Web.Ap…
生成EXCEL文件是经常需要用到的功能,我们利用一些开源库可以很容易实现这个功能. 方法一:利用excellibrary,http://code.google.com/p/excellibrary/ excellibrary是国人写的开源组件,很容易使用,可惜貌似还不支持.xlsx(Excel 2007),例子如下: //Create the data set and table DataSet ds = new DataSet("New_DataSet"); DataTable dt…
Awesome Python A curated list of awesome Python frameworks, libraries and software. Inspired by awesome-php. Awesome Python Environment Management 环境管理 Package Management 软件包管理 Package Repositories 软件源 Distribution …
在部署Word/Excel到服务器的时候,经常会碰到权限问题.例如; Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a 因为配置类型不正确,系统无法开始服务器进程.请检查用户名和密码. (Exception from HRESULT: 0x8000401A). …