Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模板导出设置了宽度和自动换行,表格会被拉宽 #302

Open
nomenofear opened this issue Jan 29, 2021 · 1 comment
Open

模板导出设置了宽度和自动换行,表格会被拉宽 #302

nomenofear opened this issue Jan 29, 2021 · 1 comment

Comments

@nomenofear
Copy link

nomenofear commented Jan 29, 2021

模板导出在设置了宽度和自动换行后,如果一个单元格文字非常多表格会被拉宽。
这是我的模板:

<table style="border-style:thin">
    <caption>sheetName</caption>
    <thead>
    <tr style="height: 40px;">
        <th colspan="6" style="text-align: center;vertical-align: middle;font-weight: bold;font-size: 14px;">这是标题</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td style="width: 5px;font-weight: bold;">责任处室</td>
        <td style="width: 10px;">测试</td>
        <td style="width: 5px;font-weight: bold;">反馈时间</td>
        <td style="width: 10px;">测试</td>
        <td style="width: 10px;"></td>
        <td style="width: 10px;text-align: left;">测试</td>
    </tr>
    <tr style="height: 60px; vertical-align: center;text-align: left;">
        <td  colspan="6" style="width:50px;word-break: break-all">此处输入超长文本
        </td>
    </tr>
    </tbody>
</table>
`
@wang1784594241
Copy link

wang1784594241 commented Nov 4, 2022

excelBuilder.widthStrategy(WidthStrategy.NO_AUTO); 设置一下固定宽度策略为非自动

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants