1、EXCEL開發Interior.ColorIndex 色彩列表 參見文章:
http://hi.baidu.com/%B0%B2%BE%B8_%BF%D5%B3%C7/blog/item/b3db8511c999df09213f2e19.html
2、將system.drawing中的color與excel中range的interior的color進行轉換:
System.Color col = System.Drawing.ColorTranslator.FromOle((int) r.Interior.Color);
3、進行xls文件的創建,創建一個空文檔。
fielstream fs = new FileStream(path, FileMode.Create, FileAccess.Write); fs.close();
4、比較詳細的excel開發內容參考: 參見微軟官方文檔:
http://msdn.microsoft.com/zh-cn/library/aa168292(v=office.11).aspx