GithubHelp home page GithubHelp logo

openxml4net temp files about npoi HOT 5 CLOSED

dotnetcore avatar dotnetcore commented on May 30, 2024
openxml4net temp files

from npoi.

Comments (5)

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

@baiyunchen
Hi, yunchen
I'm on a business trip recently. Can you see what the problem is?

from npoi.

baiyunchen avatar baiyunchen commented on May 30, 2024

@Hauptsatana Can you Provide you sample code?
I tried to reproduce what you said with the following code and did not found the .tmp file generated.And I showd windows hidden files and system files.

public void ReadExcel()
{
    using (var file = new FileStream(@"template.xlsx", FileMode.Open, FileAccess.Read))
    {
        var excel = new XSSFWorkbook(file);
        var cell = excel.GetSheetAt(0).GetRow(0).GetCell(0);
        Console.WriteLine(cell.NumericCellValue);
    }

    using (var file = new FileStream(@"template.xls", FileMode.Open, FileAccess.Read))
    {
        var excel = new HSSFWorkbook(file);
        var cell = excel.GetSheetAt(0).GetRow(1).GetCell(2);
        Console.WriteLine(cell.NumericCellValue);
    }
}

from npoi.

Hauptsatana avatar Hauptsatana commented on May 30, 2024

@baiyunchen here is code that I used

string filePath = "template.xlsx";
IWorkbook workbook = WorkbookFactory.Create(filePath);
...
workbook.Close()

Tests have shown that .tmp file is produced after workbook.Close() when workbook was opened using string filePath.
If I use FileStream as in your example or exclude workbook.Close() then no .tmp file is generated.

from npoi.

baiyunchen avatar baiyunchen commented on May 30, 2024

@Hauptsatana It's a bug.
Please reference #35.

from npoi.

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

Fixed in version 1.2.0

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.