Convert document types using the PDF Converter for SharePoint (xls to xslx, doc to docx)

Posted at: 16:44 on 22 February 2012 by Muhimbi

DOC-to-DOCX-XLS-to-XLSXWe have known for a long time that this day was coming, but the PDF Converter for SharePoint is no longer limited to generating just PDFs. So now we have a product that doesn’t quite describe what it does…GREAT! Oh well, the good news is that once again we have added some excellent new functionality that allows documents to be converted to types other than PDF.

So, how is this useful? Well, let’s say that you have a large amount of legacy Office 97-2003 files, but your company now requires all files to be saved in the more modern, and open, Office 2007-2010 formats. By using the Muhimbi PDF Converter you can convert between these formats automatically using a SharePoint workflow or a simple web service call using Java or .NET.

Naturally you can go in the other direction as well. For example many users in your company may still be on Office 2000 or 2003, but those fancy guys in IT are saving documents in Office 2010 format. No-one else in the organisation can open these shiny new files using their geriatric versions of MS-Office / Open Office. A simple SharePoint workflow will automatically take care of this and convert the file to the desired format.

Naturally we have to be realistic about which files to convert between. Going from AutoCAD to Excel makes no sense, but from Excel to Word and Word to Excel could be useful. The table listed below shows which file formats can be converted between.


Some points of interest:

  1. It is now possible to convert InfoPath files to MS-Word, Excel and HTML (PDF and XPS was already possible).
  2. Although not displayed in this chart, it is also possible to convert PDF (and any other file type) to PDF/A.
  3. It is even possible to ‘convert’ to the same format as the source, e.g. docx to docx, but specify additional settings such as a password on the document.


Convert using Web Service calls

Converting files to non-PDF formats using web service calls works identical to converting files to PDF. The only difference is that the Format property on the ConversionSettings object must be set to the file type you are converting to. For details see the existing Convert to PDF sample code for Java and .NET.


Convert using SharePoint Workflows

Converting a document using SharePoint Designer workflows (Nintex version here) works similar to converting to PDF. The main difference is that you now use the Convert Document Workflow Activity rather than the Convert to PDF one.

After adding the new activity to your workflow you will see the following Workflow Sentence.


The workflow sentence is consistent with our other Workflow Activities (e.g. Converting / Watermarking / Splitting / Merging), and is largely self-describing.

  • This document: The document to convert. For most workflows selecting Current Item will suffice, but some custom scenarios (List or Site workflows) may require the look up of a different item. 
  • This File: An optional filename (and path) to write the converted document to. When not specified, the same name as the document that triggered the workflow will be used, just with a different extension. Please make sure that the path does not include the host name, e.g. ‘http://your site/…’., see this post for details about specifying paths.
  • Select file type: Select the type to convert to from the drop down menu.
  • Include / exclude meta data: In case of sensitive documents you may want to strip any custom SharePoint columns from the file. For example, if your document library contains a column named ‘Yearly sales forecast’ then you may want to select ‘Exclude’.
  • Optional parameters: Override default conversion settings, for details see this post.
  • Parameter ‘List ID’: The ID of the list the converted file was written to. This can later in the workflow be used to perform additional tasks on the file such as performing a check-in or out.
  • Parameter ‘List Item IDs’: At the moment this workflow activity will always generate a single output file. However, in the future it will be possible to generate multiple output files in one go, in which case this parameter will return a string with ‘;’ separated values of the generated item IDs. This list can then be used by other (custom) activities, e.g. the ones created by our Workflow Power Pack, to process the individual files further.


A basic sample workflow is included below, by attaching this workflow to a Forms Library any InfoPath form saved in it will automatically be converted to an MS-Word 2007 file.



Similar to all other functionality provided by the PDF Converter for SharePoint, this new Workflow Activity works on all SharePoint 2007 and 2010 editions.

For a more complex scenario see the existing blog post about the PDF Conversion Activity.

If you have any questions then either contact us or leave a comment below. We’d love to hear from you.


Labels: , , , , , ,


  • Hi,
    Can I convert a Word Docx file to html using either Nintex WF Muhimbi Actions or Web service? Yeh I know it's usually the other way round but there is always one!

    If so would the conversion be rendered any more accurately that what you would get doing a 'Save As' from within Word?


    By Anonymous Anonymous, At 27 February, 2014 14:05  

  • Hi,

    You can do this as per the information and chart provided in this post. The the results will be the same as saving an MS-Word file to HTML. Further, when saving as HTML, any in-line images will go missing as only a single file can be returned. If you wish to maintain more formatting convert it to MHT, a HTML format that wraps all its resources.

    If you need any detailed help then please contact

    By Blogger Muhimbi, At 27 February, 2014 14:59  

  • Want this workflow functionality with SharePoint online :(

    By Blogger The Baretta, At 24 November, 2014 02:36  

  • Hi Baretta,

    A SharePoint online version is now available on request. Please contact for details.

    By Blogger Muhimbi, At 13 February, 2015 16:12  

  • Can this be used to just add footers to docx and xlsx files?

    By Blogger Unknown, At 13 October, 2017 13:22  

  • This can be used to convert those docx and xlsx file to PDF and THEN add footers to the PDF file.

    Not sure if that is an acceptable workaround for you. If you have any questions drop a line, they love to help.

    By Blogger Muhimbi, At 13 October, 2017 13:24  

Post a Comment

Subscribe to Post Comments [Atom]

Subscribe to News feed