开发者

Importing html file into excel - getting the color palette right

I have an html file which contains a table, the table uses colours to indicate different types of data. I need to be able to import this into excel with the right color pale开发者_C百科tte.

I am importing the html file using:

//using Microsoft.Office.Interop.Excel;

var excel = new Application(excel);
excel.Workbooks.OpenXML(fileName); //where filename is the path to the html file.

I am then using

_excel.Workbooks[1].Colors

to add the colors that are used in the html file.

This seems to change some of the colors of some of the elements in the spreadsheet but not the ones I expect. What order do I need to add them in? Can I extend the color palette in excel beyond 56? How are you supposed to use the color palette in excel when importing an html file?


The color palette has 56 entries. As far as I can tell, you can't change that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜