从HTML在Excel中添加评论 [英] Adding comment in excel from html

查看:101
本文介绍了从HTML在Excel中添加评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在一个单元格中发表评论.
这两个数据都来自我的数据库.
我正在使用sb.Append和html表生成对excel的报告.
这可能吗?
在此先感谢.

I need to put a comment in a cell.
Both data came from my database.
I''m using sb.Append and html tables to generate report to excel.
Is this possible?
Thanks in advance.

推荐答案

有两种方法可以实现它.第一个解决方案是手动操作,如:
提取您的简单html文件,然后在Excel中打开它.
在单元格中添加评论.
保存它,保留html格式.

第二种解决方案是通过代码如下:
Two ways you can achieve it. First solution is manual operation as:
Take your simple html file and open it in Excel.
Add a comment to a cell.
Save it, preserving the html format.

Second solution is through code as:
<html xmlns:v="urn:schemas-microsoft-com:vml">
    xmlns:office="urn:schemas-microsoft-com:office:office"
    xmlns:excel="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
<body>

    <div style="mso-element:comment-list">
        <div style="mso-element:comment">
         <div v:shape="_comment1">
                This is first comment
            </div>
            <div v:shape="_comment2">
                This is another comment
            </div>
        </div>
    </div>
</body>
</html>


这篇关于从HTML在Excel中添加评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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