GithubHelp home page GithubHelp logo

Comments (8)

yang-xiaodong avatar yang-xiaodong commented on May 30, 2024

请问,这个问题在NPOI中是否存在呢?能否帮忙做个测试

from npoi.

luoxgwb avatar luoxgwb commented on May 30, 2024

您好,我们之前的项目导出功能就是用的 .NET Framework 4的NPOI写的,也是用的模板导出,读取模板写入数据重新保存到其他地方,是没有问题的
现在的项目用上了.NET Core,之前一直没有Core的NPOI,前段时间找到了您的这个项目,试了一下有这个问题,但是用您的示例代码是没有问题的,也就是说新生成Excel是没有问题的
用模板导出的Excel有问题,但是经过Excel恢复数据,另存为新的,再打开就没事了,是不是文件头有问题呢?

from npoi.

QBTomzhu avatar QBTomzhu commented on May 30, 2024

好像 HSSFWorkbook 打开文件也会报错

只有 XSSFWorkbook 可以打开, 但是生成的excel文件a.xlsx就像 @martinyl 说的会提示文件损坏之类的

能不能看一下呀 @yuleyule66

      var templateNameWithPath = @"abc.xls";
      HSSFWorkbook workbook;
      using (FileStream file = new FileStream(templateNameWithPath, FileMode.Open, FileAccess.Read))
      {
        workbook = new HSSFWorkbook(file);
      }

from npoi.

QBTomzhu avatar QBTomzhu commented on May 30, 2024

EFPlus 在dnx里面比NPOI好用多了 @martinyl

from npoi.

luqizheng avatar luqizheng commented on May 30, 2024

@QBTomzhu 试一下 FileStream flush一下,看看有没有解决。

from npoi.

Abner318084 avatar Abner318084 commented on May 30, 2024

請問這個問題是不是還沒解決呢?

from npoi.

yang-xiaodong avatar yang-xiaodong commented on May 30, 2024

@AllenChen318084 抱歉这个问题我也解决不了,代码量太多,排查不到。

from npoi.

baiyunchen avatar baiyunchen commented on May 30, 2024

@QBTomzhu EpPlus好像不支持xls格式吧?大家一起完善Npoi.Core才是王道

from npoi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.