GithubHelp home page GithubHelp logo

Comments (8)

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

please show your code.

from npoi.

csluzhenyu avatar csluzhenyu commented on May 30, 2024

public class Program
{
public static void Main(string[] args) {
//ExportExcel();
//ExportExcelHSSF();
//ExportWord();
//ImportExcel();
ImportExcelHSSF();
Console.ReadKey();
}
private static void ImportExcelHSSF()
{
Stream templateStream = new MemoryStream();
using (var file = new FileStream("D:\moban.xls", FileMode.Open, FileAccess.Read))
{
file.CopyTo(templateStream);
templateStream.Seek(0, SeekOrigin.Begin);
}
var templateWorkbook = new HSSFWorkbook(templateStream, true);
Console.WriteLine(templateWorkbook.GetSheetAt(0).PhysicalNumberOfRows);
}
}

from npoi.

csluzhenyu avatar csluzhenyu commented on May 30, 2024

templateWorkbook.GetSheetAt(0) 可以获取到SheetName
但是Row 始终为0
导入.xlsx没有这个问题

from npoi.

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

Ok, Thanks for your report . I will check later.

from npoi.

csluzhenyu avatar csluzhenyu commented on May 30, 2024

困扰一天了, 没找到其他的解决方案。

from npoi.

EddieDe avatar EddieDe commented on May 30, 2024

Hi! Right now I have the same problem with reading an xls-file within HSSFWorkbook. Could you please tell me if you're still going to resolve it? Or maybe you have any ideas on how it can be done? Thanks!

from npoi.

baiyunchen avatar baiyunchen commented on May 30, 2024

please reference #11 ,it's a bug.

from npoi.

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

bug fixed by PR #11. you can reference nuget package of version 1.1.4.

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.