Open-XML-SDK | Open XML SDK by Microsoft | SDK library

 by   OfficeDev C# Version: v2.19.0 License: MIT

kandi X-RAY | Open-XML-SDK Summary

kandi X-RAY | Open-XML-SDK Summary

Open-XML-SDK is a C# library typically used in Utilities, SDK applications. Open-XML-SDK has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Open XML SDK by Microsoft
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Open-XML-SDK has a medium active ecosystem.
              It has 3368 star(s) with 520 fork(s). There are 210 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 74 open issues and 400 have been closed. On average issues are closed in 103 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Open-XML-SDK is v2.19.0

            kandi-Quality Quality

              Open-XML-SDK has 0 bugs and 0 code smells.

            kandi-Security Security

              Open-XML-SDK has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Open-XML-SDK code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Open-XML-SDK is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Open-XML-SDK releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              Open-XML-SDK saves you 383 person hours of effort in developing the same functionality from scratch.
              It has 911 lines of code, 0 functions and 918 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Open-XML-SDK
            Get all kandi verified functions for this library.

            Open-XML-SDK Key Features

            No Key Features are available at this moment for Open-XML-SDK.

            Open-XML-SDK Examples and Code Snippets

            No Code Snippets are available at this moment for Open-XML-SDK.

            Community Discussions

            QUESTION

            Unable to read from Excel file in F# using OpenXml
            Asked 2020-May-13 at 13:47

            I'm trying to figure out, how to use F# to read data from an existing Excel file. I found this (rather old) question, but have problems running it: Reading cell contents in an Excel file with F# and Open XML SDK

            It seems that either the compiler or the SDK (or both) changed with regard to this line:

            ...

            ANSWER

            Answered 2020-May-13 at 13:44

            You could use EPPlus for that. Here is a very simple example in a script:

            Source https://stackoverflow.com/questions/61775438

            QUESTION

            How to export data from C# from List or IEnumerable to Excel (MS OpenXml)?
            Asked 2020-May-07 at 21:55

            I'm trying to export a List or IEnumerable to an Excel file using the library Open XML of Microsoft.

            Library: https://github.com/OfficeDev/Open-XML-SDK

            Example of similar request: https://www.codeproject.com/Articles/692121/Csharp-Export-data-to-Excel-using-OpenXML-librarie

            The example above works pretty fine but have a lot of code between (As far works neat, but I searching for an optimization)

            But the documentation of this library does not extend (or hasn't many examples), and the examples that I saw around about how to export data to Excel it's using a DataTable or Dataset; so, they make the conversation from the List to DataTable to export the DataTable. And that seems pretty complex way to something that other libraries resolve easier.

            So, if someone has a sort of example of how to make the export quickly and generic, it will be appreciated.

            ...

            ANSWER

            Answered 2020-May-07 at 21:53

            FYI, here is my implementation, using the code of @mikesknowledgebase (http://www.mikesknowledgebase.com -- The Webpage doesn't work... but to give the credits at least :D)

            Post with all information here

            So, I used it for .Net Core 2.2; and the intention is to use the method to export a List to Excel.

            The final result (In the simplest example):

            Source https://stackoverflow.com/questions/61663213

            QUESTION

            Create in-memory Excel file and open it in Excel without using COM Interop
            Asked 2020-Apr-16 at 20:01

            I'm currently using COM Interop in .NET to export the contents of a DataTable to Excel. It's a method I've been using for years, but the problem is that COM is sketchy and throws random, intermittent, untraceable exceptions. This hasn't been a huge issue, since it's always just been code on a machine dedicated for this purpose and the exceptions are pretty rare, but recently I wrote a front-end for a data warehouse and I've got 200+ users on it, and the problem has (as you would expect) grown exponentially.

            The problem is finding a method that does what COM does without the problems that come with COM. Namely, creating an Excel file in-memory (no writing to disk) that is a new workbook, so that when the user hits "Save" for the first time, it will ask them where they want to save the file and what they want to call it.

            I know I can export a DataTable to an Excel file using OpenXML: Export DataTable to Excel with Open Xml SDK in c#

            And I know I can create an OpenXML Excel object in-memory without writing to a file on disk: How to create Excel file using OpenXML without creating a local file?

            The problem is the last step: Opening that in-memory file in Excel (without using COM)

            Getting this to work would be my ideal option.

            Now, I would prefer not to write to a file, but that isn't a deal breaker if there are no other options, so as a backup option I've also considered using OpenXML to create an Excel Template, and opening the Template (using Process.Start).

            The problem with that approach is that some users have reported that Templates sometimes open as xltx files in Edit mode by default, instead of opening as new xlsx files: https://answers.microsoft.com/en-us/office/forum/office_2007-customize/is-there-a-way-to-get-my-excel-template-xltx-file/ab36cd4d-f6b0-46e0-8f15-533a4acb357f?page=1

            This would be an even bigger issue than the random errors I'm getting from using COM.

            Any ideas are appreciated.

            EDIT - These are the COM errors I get:

            Cannot create ActiveX component.

            COM target does not implement IDispatch.

            Exception from HRESULT: 0x800AC472

            Select method of Range class failed

            Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))

            The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

            The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

            Unable to cast COM object of type 'System.__ComObject' to interface type 'System.Collections.IEnumerable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{496B0ABE-CDEE-11D3-88E8-00902754C43A}' failed due to the following error: 'The requested object does not exist. (Exception from HRESULT: 0x80010114)' and the COM component does not support IDispatch::Invoke calls for DISPID_NEWENUM.

            Unable to get the Add property of the Workbooks class

            Activate method of Workbook class failed

            I've received 107 errors over the course of a few months, but I've gotten more lately since I updated the feature to attach to any existing instance of Excel that the user might already have open instead of creating a new one. Before, when I was always creating a new Excel instance each time, the errors were much more rare (and were largely solved by making Excel invisible while I did the work behind the scenes).

            ...

            ANSWER

            Answered 2020-Apr-16 at 20:01

            This is a suggestion more than an answer. Consider trying to save the file to a temporary location and set it to Read-Only in the file system. The would force your users to do a SaveAs rather than a Save. Then use the Excel command line options (apparently /n is best) to open the XLSX file as if it were a template.

            Those command line options are located here:Excel Command Line Options

            Source https://stackoverflow.com/questions/61240059

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Open-XML-SDK

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular SDK Libraries

            WeiXinMPSDK

            by JeffreySu

            operator-sdk

            by operator-framework

            mobile

            by golang

            Try Top Libraries by OfficeDev

            TrainingContent

            by OfficeDevC#

            ews-java-api

            by OfficeDevJava

            generator-office

            by OfficeDevTypeScript

            Open-Xml-PowerTools

            by OfficeDevC#

            script-lab

            by OfficeDevTypeScript