导出Html表以excel和保持css样式 [英] Export Html Table to excel and keep css styles

查看:1257
本文介绍了导出Html表以excel和保持css样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用excel网络查询将html表(mvc视图)导出为ex​​cel。我如何让它携带css样式?如果我设置 class =redLabel,它不解释它,并使标签为红色。我必须在我的表中使用内联样式这个工作。任何想法?

解决方案

据我所知,大多数Office程序不支持包含样式, p>

很可能会要求您在内容中包含您的样式(导出吮吸,几乎像邮件样式)。


I'm using excel web queries to export an html table (mvc view) to excel. How do I get it to carry across the css styles? If I set class="redLabel" it doesn't interpret that and make the label red. I have to use inline styles in my table for this to work. Any ideas?

解决方案

As far as I know, most Office programs do NOT support included styling, but only inline styling.

It's likely that you'll be required to include your styling inline (exporting sucks, almost like mail styling).

这篇关于导出Html表以excel和保持css样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆