Skip to content

Experimental PowerShell Module to create and edit Microsoft Word, Microsoft Excel, and Microsoft PowerPoint documents without having Microsoft Office installed.

Notifications You must be signed in to change notification settings

EvotecIT/PSWriteOffice

Repository files navigation

PSWriteOffice - PowerShell Module

PSWriteOffice is a cross-platform PowerShell module for creating and reading Microsoft Office documents (Word, Excel, PowerPoint - experimental), plus Markdown and CSV, powered by OfficeIMO.*. It provides verb-noun cmdlets and a scriptblock-first DSL while OfficeIMO owns the core engine and tests.

This module is built using following libraries:

HTML converters (OfficeIMO.Word.Html):

  • ConvertTo-OfficeWordHtml -Path .\report.docx -OutputPath .\report.html
  • ConvertFrom-OfficeWordHtml -Path .\snippet.html -OutputPath .\report.docx

CSV helpers:

  • Get-OfficeCsv -Path .\data.csv
  • Get-OfficeCsvData -Path .\data.csv
  • ConvertTo-OfficeCsv -OutputPath .\export.csv

Markdown helpers:

  • Get-OfficeMarkdown -Path .\README.md
  • ConvertTo-OfficeMarkdown (from objects)
  • ConvertTo-OfficeMarkdownHtml -Text $md -DocumentMode

Word DSL quick start:

  • New-OfficeWord -Path .\Report.docx { WordSection { WordParagraph 'Hello' } }
  • Get-OfficeWordParagraph -Path .\Report.docx | Select-Object -First 3

Excel DSL quick start:

  • New-OfficeExcel -Path .\Report.xlsx { ExcelSheet 'Data' { Set-OfficeExcelRow -Row 1 -Values 'Name','Value' } }
  • Get-OfficeExcelNamedRange -Path .\Report.xlsx

About

Experimental PowerShell Module to create and edit Microsoft Word, Microsoft Excel, and Microsoft PowerPoint documents without having Microsoft Office installed.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •