Skip to content

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

Open

Description

@liuxinghen

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

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

Activity

  1. hanksudo commented on Sep 29, 2020

    @hanksudo

    看來我掉這個坑了

  2. hanksudo commented on Oct 10, 2020

    @hanksudo

    看來我掉這個坑了

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

  3. banfg56 commented on Nov 13, 2020

    @banfg56

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

  4. hongshunanhai commented on May 30, 2022

    @hongshunanhai

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

  5. shuiYe-704265085 commented on Jun 9, 2023

    @shuiYe-704265085

    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"

  6. itsgodzilla commented on Jun 11, 2025

    @itsgodzilla

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

    这个库确实有问题。我验证过有50个sheets的文件x.xls,读取的文件写出来后确实会“稳定”异常, 单元格内容错乱。

  7. itsgodzilla commented on Jun 11, 2025

    @itsgodzilla

    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"

    Your contributation is so nice ~ I have tried and it works fine , I would give you a damn hug for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions