Chapter 26. Storing data—not in Excel!

PowerShell can programmatically create and update Excel documents. You can also jump off the roof of your house into a pile of sharp glass. But just because you can do those things, doesn’t mean you should do them. Excel isn’t a database, and it pains us to see people struggling to use it as one. Programming against Excel, in PowerShell, requires you to use the Microsoft Office Programmability components, which are added into .NET when you install Office. Those components, in turn, use a decade-old Component Object Model (COM) interface that Microsoft hasn’t updated in, well, ever. We cry when we see administrators write scripts that literally include hundreds of lines of Excel-related code. It’s time consuming, ...

Get Learn PowerShell Scripting in a Month of Lunches now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.