10

I'm a beginner to Powershell and CLI in general, but this task does not need to use either so I'm open to using other tools.

I'm trying to do the following:

  1. Create multiple files from a Word template.
  2. Rename each file based on a list of names found in an Excel/CSV sheet.

Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[-] lemmy___user@lemmy.world 4 points 4 months ago

You should be able to use COM interoperability , specifically the OpenAsDocument() and Save() methods. You can also use COM interoperability to read from Excel, but using ImprtFrom-CSV would be much easier. Then you just iterate over the file names, and for each one open the template as a document, then save it as the filename.

[-] BobTheDestroyer@lemy.lol 1 points 4 months ago

Sorry I'm new to this. What exactly do I enter into Powershell for each step?

[-] BobTheDestroyer@lemy.lol 2 points 4 months ago

Nevermind I got it!

this post was submitted on 22 Mar 2024
10 points (100.0% liked)

Programming

16687 readers
210 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS