Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在HTML中添加嵌套表时,表的列宽度不起作用_C#_Html_Excel_Model View Controller_Html Table - Fatal编程技术网

C# 在HTML中添加嵌套表时,表的列宽度不起作用

C# 在HTML中添加嵌套表时,表的列宽度不起作用,c#,html,excel,model-view-controller,html-table,C#,Html,Excel,Model View Controller,Html Table,我有一个要导出到Excel的html表。一切正常,直到我添加了一个嵌套表,然后该属性才停止发挥作用。有什么办法解决吗 <table width="570px" style="table-layout:fixed; width:430pt"> <colgroup> <col width="190px" style="width:143pt; "/> <col width="190px" style="width:143pt"/> <col wi

我有一个要导出到Excel的html表。一切正常,直到我添加了一个嵌套表,然后该属性才停止发挥作用。有什么办法解决吗

<table width="570px" style="table-layout:fixed; width:430pt">
<colgroup>
<col width="190px" style="width:143pt; "/>
<col width="190px" style="width:143pt"/>
<col width="190px" style="width:143pt"/>
<col width="190px" style="width:143pt"/>

</colgroup>
    <tr>
        <td>Test1</td>
        <td>Test1</td>
<td>Test1</td>
<td>Test1</td>
    </tr>
    <tr>
        <td>Test2</td>
        <td>16</td>
        <td></td>
        <td>
        <table width = "100%" style=" width:100%" >
        <tr><td>Hello</td></tr>
        </table>
        </td>
    </tr>
</table>

请提供代码。如果有任何错误,请在问题中也提到。另外,您还没有提到编程语言。我添加了html表,我在MVC中使用它。错误在于col未显示为colgroup中设置的col