为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Cannot copy formatted tables

more options

I use FireFox to print our EMC SAN data which is basically a table of coloured cells. I used to be able to copy & paste the data from FireFox to Excel but now with the latest version I can only copy text but not the formatting. The text is in the correct cell allignment when pasted, but the colours and table borders etc are missing.

Can I fix this?

Currently on FF 51.

I use FireFox to print our EMC SAN data which is basically a table of coloured cells. I used to be able to copy & paste the data from FireFox to Excel but now with the latest version I can only copy text but not the formatting. The text is in the correct cell allignment when pasted, but the colours and table borders etc are missing. Can I fix this? Currently on FF 51.

所有回复 (2)

more options

What you are describing is normal in my experience for as long as I can remember. When you copy a selection in a Windows application, the application puts several different formats on the clipboard. You are getting HTML, but it does not have the styles you expected. Usually that's because the styles are in a style sheet outside of the selection. Firefox will include styles that are "inline" in the copied HTML, but if they are outside, then the styles are not copied along with the HTML and it ends up having the default appearance instead. This is a tricky problem to work around because often you do not want to copy the entire page and then have to clean up the paste.

Also, not that it helps with this problem, but "the latest version" is not Firefox 51, but Firefox 56.

more options

Two other things:

(1) Many Microsoft applications give you options when you paste, or a Paste Special command. You can use one of those to ensure that you are pasting the HTML. (Example screenshot attached.)

(2) It sometimes gives better results to use Excel's Data tab, From Web feature, to open a page and import a table. This is intermediated by components of Internet Explorer, so if the page doesn't work in IE, that may not work, either.