• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home » Resolved: Powershell: search & replace in xlsx except first 3 columns

Resolved: Powershell: search & replace in xlsx except first 3 columns

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I need to run PS script on multiple xlsx files where I need to search and replace certain values. Script has to check entire sheet, but needs to ignore first 4 columns, aka, it has to “start” from column number 5. Is there a way how to do that with the script below please? Those first 4 columns need to be present when exporting/saving a final xlsx file. Thank you.

Answer:

You could replace your second foreach loop with a for loop instead, as you’ll then be able to skip the first x records as desired.
It would look like this to skip the first 4 columns:
Replace the $i = 4 with another number if you want to start on a different column number instead.

If you have better answer, please add a comment about this, thank you!

excel powershell replace search
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to get Union type from an array of objects in Flow?

24/03/2023

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.