#import-excel help, start rows dynamically?

7 messages · Page 1 of 1 (latest)

upper elbow
#

https://dfinke.github.io/powershell/2019/08/29/Learn-to-Automate-Excel-like-a-Pro-with-PowerShell.html

In Doug's article he's using the parameter -startrow value in the example script and I know he's just doing a select-object -first 5 but is it possible after running a query let's say for get-process it may have X amount of rows then I want to start and query of get-service (like in the article) it outputs the data with a 2 row gap from the get-process data? I hope I explained that okay.

trail marsh
#

Is your question abou thow to get offsets for a variable sized table?

upper elbow
#

Sorry @trail marsh , I should have explained this better.

Example of what I was thinking.
Running 3 commands but instead of doing a select-object -first 5 like in the artcile have it just output the whole data set, but then the next data be spaced out.

#

I didn't know if that was possible, like in the article he starts on a certain row, I didn't know if you could just select a row and then the next data set could be on another so it's spaced out.

#

When I get to work tomorrow I'll try to pull an example of what I'm trying to do.