xls icon indicating copy to clipboard operation
xls copied to clipboard

当excel不同的文本值过多时,会读不到单元格文本值

Open liuxinghen opened this issue 4 years ago • 5 comments

test_data_2.xls.zip 读取附件中的文件,读取到253行附近开始无法获得后面文本单元格的文本值。 image

问题出现在workbook.go第118行,在读不到数据的循环中,binary.Read(buf_item, binary.LittleEndian, &size)开始返回err==EOF,但是分支并没有处理。

liuxinghen avatar May 22 '20 02:05 liuxinghen

看來我掉這個坑了

hanksudo avatar Sep 29 '20 15:09 hanksudo

看來我掉這個坑了

我用了最後一個 commit 的 0.0.2 版本解決了這問題。因為 Github 是 tag 0.0.1

hanksudo avatar Oct 10 '20 03:10 hanksudo

读取某些xls 时是会存在 Cell有值但是读取为空的情况。鉴于xls很久没有更新,使用xls2csv-go 将XLS转换为 csv来处理。libxls可以下载说明文档中的版本v0.2.0。 缺点就是就是目标服务器需要相应的库文件。

banfg56 avatar Nov 13 '20 07:11 banfg56

1000多行,中间有空格,读到中间后面就全乱了,不但行列不对,还出现乱码,用java的POI就没有这个问题

hongshunanhai avatar May 30 '22 08:05 hongshunanhai

Yes, I forked it into my own warehouse and created a tag with the latest commit. After replacing the library in the project, I solved this problem. If you encounter the same problem, you can directly use my library "github.com/shuiYe-704265085/xls"

shuiYe-704265085 avatar Jun 09 '23 02:06 shuiYe-704265085