码迷,mamicode.com
首页 > 其他好文 > 详细

proc_excel

时间:2017-12-12 13:34:06      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:findall   std   name   append   listdir   pos   led   .com   post   

import os
import xlrd
import re
d="D:\\untitled2\\10月\\(原始)\\潘区\\2次\\"
file=[f for f in os.listdir(d)if os.path.isfile( os.path.join(d, f))]
pat=‘[^(](.*?)[^)]一品三笑‘
shop_name=[]
for i in range(len(file)):
shop_name.append(re.compile(pat).findall(file[i]))
print(shop_name)
xl=xlrd.open_workbook(d+file[0])
print(xl.sheet_names())

proc_excel

标签:findall   std   name   append   listdir   pos   led   .com   post   

原文地址:http://www.cnblogs.com/xiesongyou/p/8027144.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!