Thinkai's Blog

Autohotkey|Python|php|aardio|VOIP|IT 爱好者

Excel所有工作表合并输出到txt Autohotkey 786

作者为 发表

Autohotkey

;适合所有工作表字段(列头)一致的情况
#maxmem 1024
file := "d:\desktop\list.xls"
xls := new exceldb()
xls.open(file)
content := ""
for k,v in xls.GetTableInfo()
{

	for a,b in xls.GetTable("select * from [" k "$]")

	{

		tmp_str := ""

		for x,y in b

		{

			tmp_str .= tmp_str ? "`t""" y """" : """" y """"

		}

		content .= tmp_str "`t" k "`n"

	}
}
FileAppend % content, d:\desktop\out1.txt

来了就留个评论吧! 没有评论




友情链接:Autohotkey中文帮助Autohotkey官网Autohotkey中文网联系作者免GooglePlay APK下载

 主题设计 • skyfrit.com  Thinkai's Blog | 保留所有权利

62 queries in 1.877 seconds |