Giter Site home page Giter Site logo

Comments (2)

OssianEPPlus avatar OssianEPPlus commented on May 29, 2024

That's not possible.

Excel uses .xlsx files to read in data. Epplus reads the data from this file in and stores it in memory accessible via programming through its variables for example in a variable of ExcelWorksheet type. There is no file with the edited data until you save. So Excel cannot open it without saving.

from epplus.

kadir133 avatar kadir133 commented on May 29, 2024

Thank you for your interest. Then I found a solution like this. I save it to the temp folder. I'm viewing it from there. The temp file is automatically deleted when the application is closed.

            // Create a temporary file collection and add a temporary file with ".xlsx" extension.
            string filePath = new TempFileCollection().AddExtension("xlsx");

            package.SaveAs(filePath);

            // Create a new Process object to start an external process (Excel application).
            using (var excelProcess = new Process())
            {
                // Specify the file to be executed (Excel.exe).
                excelProcess.StartInfo.FileName = "Excel.exe";
                excelProcess.StartInfo.UseShellExecute = true;

                // Specify the file information to be opened in Excel. The "/n" parameter ensures that Excel is opened in a new window.
                excelProcess.StartInfo.Arguments = "/n " + filePath;
                // Start the Excel application.
                excelProcess.Start();
            }

from epplus.

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.