And the important thing to notice here is the inline style for the table cell. This gets exported to Excel too as a background cell color. Cool, ain’t it?
So all inline styles are sent to excel too, this doesn’t happen with header style elements or external style sheets, so be careful.
One last thing to keep in mind is that this works only in IE. Code can be easily ported to the VBscript flavor. And if you have any problem, probably you should enable the “Initialize and script ActiveX controls not marked as safe” in the security options of IE.
posted on 2010-03-21 09:42 lqx 阅读(321) 评论(0) 编辑 收藏 所属分类: html
Powered by: BlogJava Copyright © lqx