之前问道您,为什么在富文本的同时,设置单元格类型。如果直接设置富文本,是没有这个问题的,如:
- sheet.setValue(1, 1, {
- "text": getRichDocIcon + "未命名文档" + getRichDocIcon + "未命名文档" + getRichDocIcon + "未命名文档",
- "richText": [
- {
- "text": getRichDocIcon,
- "style": {
- "font": " 20px iconfont",
- "foreColor": "blue",
- "textDecoration": 0
- }
- },
- {
- "style": {},
- "text": "未命名文档"
- },
- {
- "text": getRichDocIcon,
- "style": {
- "font": " 20px iconfont",
- "foreColor": "blue",
- "textDecoration": 0
- }
- },
- {
- "style": {},
- "text": "未命名文档"
- },
- {
- "text": getRichDocIcon,
- "style": {
- "font": " 20px iconfont",
- "foreColor": "blue",
- "textDecoration": 0
- }
- },
- {
- "style": {},
- "text": "未命名文档"
- }
- ]
- })
- sheet.getCell(1, 1).wordWrap(true)
- sheet.autoFitRow(1)
复制代码
|