開發背景
看到網上有人發教程,如何通過在excel里設置單元格顏色畫一幅畫,感覺手工做太復雜,就打算用程序實現一個。
開發運行環境
python 2.7
PIL
xlsxwriter
用法
python image2xlsx.py somefile.png
會在somefile.png目錄下生成一個somefile.png.xlsx的文件
效果預覽

其他說明
最好先使用小圖,100*100左右,大圖很慢。
xlsxwriter對excel長寬的控制不是很好,可以在程序里微調。
源碼下載
http://files.cnblogs.com/files/zzrom/image2xlsx.py.zip
