Giter Club home page Giter Club logo

pymsofficeconverter's Introduction

PyMSofficeConverter

Overview

Microsoft office files(.doc/.xls/.ppt etc) converter written in Python.
Recently supports

  • Microsoft word document convert between .doc and .docx
  • Microsoft excel workbook convert between .xls and .xlsx
  • Microsoft powerpoint presentation convert between .ppt and .pptx

Requirements

  • Python 2.7
  • Windows 7 or above
  • Microsoft Office 2013 or above
  • pywin32

Documentation

Copy the MSofficeConverter.py to current directory or under site-packages of your python.
And then

from MSofficeConverter import easy_convert

easy_convert('x:/test.doc','x:/test.docx') 
# full path of file, here convert test.doc to test.docx

Also, you can use a class to do this, but please remember to call quit() when your work is over.

from MSofficeConverter import converter

xx=converter('PPT') # the file type you are going to convert, accept 'PPT','DOC','XLS'

xx.convert('x:/test.pptx','x:/tst.ppt')
# xx.convert('x:/tst.ppt','x:/test2.pptx') # you can do more before you quit

xx.quit() # must do this

It is strongly recommanded that if you are dealing with a quantity of files, you should use the converter class and set a loop to call convert() instead of easy_convert().

pymsofficeconverter's People

Contributors

dxsooo avatar

Stargazers

 avatar SUPER-MARIO avatar

Watchers

James Cloos avatar  avatar  avatar  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.