在Excel中从Html源创建注释 [英] Create comment in Excel from Html source

查看:103
本文介绍了在Excel中从Html源创建注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,可以从Html创建一个excel文件。而且我发现很多事情都是可能的,比如添加图像,格式化等等只是一些CSS调整。

So, it's possible to create an excel file from Html. And I've found that many things are possible, like adding images, formatting, etc with just some css tweaks.

然而,我现在要做的是得到小红色的三角形注释显示。

However, what I'm trying to do now is get the little red triangle comment to show up.

我已经创建了一个空白的excel文件,只有一个注释,但它生成的html是一团糟。我确信很多都是多余的。有没有人这样做,或者知道如何让它工作?

I've created a blank excel file with nothing but a comment, but it's generated html is a mess. And I'm sure much of it is superfluous. Has anyone done this, or know how I can get it to work?

如果它像< td title一样简单=comment> text< / td> ,但不是。

编辑:基础知识需要html显示一个注释,当加载到excel修剪到这个...我只需要看看我是否可以修剪vml到更简单。

I have the basics required so that html shows a comment when loaded in excel trimmed down to this... I just need to see if I can trim the vml down to something simpler.

看起来它连接的单元格的链接也是这样的:
0
0

It appears the link to the cell it's connected too is this: 0 0

现在我只需要正确定位它,最初

Now I just need to position it properly, initially

我认为这是最低限度,我通过稍微修改html添加了第二个评论。

I think this is the bare minimum, and I've added a second comment by modifying the html slightly.

但是,如果您可以帮助将其缩小到最低限度,那将非常有用

But, if you can help trim this down further to it's bare minimum that would be very helpful

<html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
<body>
    <table>
        <tr>
            <td>cell 1</td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td>cell 3</td>
        </tr>
    </table>

    <div style='mso-element:comment-list'>
        <div style='mso-element:comment'>
            <!--[if gte mso 9]>
            <xml>
             <v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
              <v:stroke joinstyle="miter"/>
              <v:path gradientshapeok="t" o:connecttype="rect"/>
             </v:shapetype>
             <v:shape id="_comment1" type="#_x0000_t202" 
                    style='width:96pt;height:55.5pt;z-index:1;visibility:hidden' 
                    fillcolor="infoBackground [80]" o:insetmode="auto">
              <v:textbox style='mso-direction-alt:auto'/>
              <x:ClientData ObjectType="Note">
               <x:Row>0</x:Row>
               <x:Column>0</x:Column>
              </x:ClientData>
             </v:shape>
             <v:shape id="_comment2" type="#_x0000_t202" 
                    style='width:96pt;height:55.5pt;z-index:1;visibility:hidden' 
                    fillcolor="infoBackground [80]" o:insetmode="auto">
              <v:textbox style='mso-direction-alt:auto'/>
              <x:ClientData ObjectType="Note">
               <x:Row>1</x:Row>
               <x:Column>3</x:Column>
              </x:ClientData>
             </v:shape>
            </xml>
            <![endif]-->
            <div v:shape="_comment1" >
                This is a comment
            </div>
            <div v:shape="_comment2" >
                This is another comment
            </div>
        </div>
    </div>
</body>
</html>


推荐答案

我认为这是最低限度, ve通过稍微修改html添加了第二个评论。

I think this is the bare minimum, and I've added a second comment by modifying the html slightly.

<html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
<body>
    <table>
        <tr>
            <td>cell 1</td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td>cell 3</td>
        </tr>
    </table>

    <div style='mso-element:comment-list'>
        <div style='mso-element:comment'>
            <!--[if gte mso 9]>
            <xml>
             <v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
              <v:stroke joinstyle="miter"/>
              <v:path gradientshapeok="t" o:connecttype="rect"/>
             </v:shapetype>
             <v:shape id="_comment1" type="#_x0000_t202" 
                    style='width:96pt;height:55.5pt;z-index:1;visibility:hidden' 
                    fillcolor="infoBackground [80]" o:insetmode="auto">
              <v:textbox style='mso-direction-alt:auto'/>
              <x:ClientData ObjectType="Note">
               <x:Row>0</x:Row>
               <x:Column>0</x:Column>
              </x:ClientData>
             </v:shape>
             <v:shape id="_comment2" type="#_x0000_t202" 
                    style='width:96pt;height:55.5pt;z-index:1;visibility:hidden' 
                    fillcolor="infoBackground [80]" o:insetmode="auto">
              <v:textbox style='mso-direction-alt:auto'/>
              <x:ClientData ObjectType="Note">
               <x:Row>1</x:Row>
               <x:Column>3</x:Column>
              </x:ClientData>
             </v:shape>
            </xml>
            <![endif]-->
            <div v:shape="_comment1" >
                This is a comment
            </div>
            <div v:shape="_comment2" >
                This is another comment
            </div>
        </div>
    </div>
</body>
</html>

这篇关于在Excel中从Html源创建注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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