Coder Social home page Coder Social logo

brucezhang80 / open-xml-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotnet/open-xml-sdk

0.0 1.0 0.0 4.11 MB

Open XML SDK by Microsoft Open Technologies, Inc.

Home Page: http://msopentech.com

License: Apache License 2.0

PowerShell 0.03% C# 99.91% Makefile 0.06%

open-xml-sdk's Introduction

Open-XML-SDK

The Open XML SDK provides open-source libraries for working with Open XML Documents (DOCX, XLSX, and PPTX). It supports scenarios such as:

  • High-performance generation of word-processing documents, spreadsheets, and presentations
  • Document modification, such as removing tracked revisions or removing unacceptable content from documents
  • Data and content querying and extraction, such as transformation from DOCX to HTML, or extraction of data from spreadsheets

Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

Documentation

This release of the SDK is the exact source code for version 2.5, therefore the documentation available on MSDN is still accurate.

Open XML SDK 2.5 for Office

In addition to open sourcing of the SDK, Microsoft has opened up the conceptual documentation for public review / contributions. A copy of the documentation is now in GitHub for you to edit and review.

Build Instructions

For a video that shows how to get and build the SDK, see this blog post at OpenXmlDeveloper.org.

Note: for this first release, you must have some version of Visual Studio installed. Visual Studio 2012 Express Edition will work just fine: http://www.microsoft.com/en-us/download/details.aspx?id=34673

Set Execution Policy for PowerShell

In order to run the script that builds the Open XML SDK, you need to set the execution policy. To set the execution policy, you must run PowerShell as administrator.

  • Right click on the PowerShell shortcut, and click "Run as administrator". An easy way to find the PowerShell shortcut is to click the Start button, then type PowerShell. The PowerShell shortcut will be in the search results above the start menu.
  • Click the Yes button in the User Account Control dialog box.
  • Run the command to set the execution policy: The the PowerShell prompt, type: Set-ExecutionPolicy Unrestricted
  • The Set-ExecutionPolicy cmdlet asks: Do you want to change the execution policy? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Press Y Enter
  • You can exit the PowerShell session that is running as administrator. At the PowerShell prompt, type: Exit

Build the Open XML SDK Libraries

  • Start a Visual Studio command prompt. It does not need to run as administrator.
  • Change directories into the directory that contains this README.md, and the PowerShell script BldSdk.ps1 For instance, type: CD C:\users\username\Documents\Open-Xml-Sdk
  • Start PowerShell. At the DOS command prompt, type: PowerShell Enter
  • Run the PowerShell script to build the libraries: Type: ./BldSdk.ps1 Enter
  • The build will commence - it can take a few seconds, up to a minute, depending on the speed of your computer.
  • Find the debug libraries in the folder: ./build/OpenXmlSdkLib/Debug. Find the release libraries in the folder: ./build/OpenXmlSdkLib/Release

Building with Mono

Building with Visual Studio

The Visual Studio project contains a pre-build command line that launches a PowerShell script which sets the version string of the AssemblyInfo.cs (in roughly the same way as the normal command line build script). To be able to execute that pre-build command line, you must also set the execution policy as described above. Should you have multiple PowerShell shortcuts, you must use the right one for your Visual Studio installation.

If you get the error "The command "cd C:\Users\Eric\Documents\Open-Xml-Sdk
powershell ./SetAssemblyVersionString.ps1" exited with code 1, then you need to set your execution policy. There is a different execution policy for PowerShell scripts that are run from Visual Studio. To set this execution policy:

  • Start a COMMAND prompt (not PowerShell console) as Administrator
  • Enter the following command:

C:\windows\system32>c:\windows\syswow64\WindowsPowerShell\v1.0\powershell.exe -command set-executionpolicy unrestricted

open-xml-sdk's People

Contributors

ericwhitedev avatar officecpub avatar weswigham avatar thomasbarnekow avatar jthake avatar

Watchers

布鲁斯张 avatar

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.