【发布时间】:2021-01-24 10:21:52
【问题描述】:
我正在尝试冻结工作表的顶行和前两列。
xlsx.SetPanes(sheetName, `{"freeze":true,"x_split":2,"y_split":1,"top_left_cell":"A1","active_pane":"topLeft","panes":[{"sqref":"A1:B1","pane":"topLeft"},{"sqref":"C1:XFD1", "pane":"topRight"},{"sqref":"A2:B2", "pane":"bottomLeft"},{"sqref":"C3:XFD3", "pane":"bottomRight"}]}`)
如果我在 excel 中打开文件,我会收到以下警报,并且在我尝试恢复恢复日志后显示没有任何内容被删除:
警告:
We found a problem with some content in ’test.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
恢复日志:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>Repair Result to test3.xml</logFileName>
<summary>Errors were detected in file ’/test.xlsx’</summary>
<repairedRecords summary="Following is a list of repairs:">
<repairedRecord>Repaired Records: View from /xl/worksheets/sheet1.xml part</repairedRecord>
</repairedRecords>
</recoveryLog>
这不是数据问题,因为如果我删除 setPanes 方法,文件可以正常工作。我做错了什么?
另请注意,如果我使用 google 表格打开文件,它的工作正常。
【问题讨论】:
标签: go excelize 360entsecgroup-skylar-excelize