11
Trying to get data from a list of employee ID's
Post Flair (click to view more posts with a particular flair)
Post Body
I have an excel sheet that I'm trying to pull the employee ID from the first column but I'm getting the error "You cannot call a method on a null-valued expression" which I assume means its not reading the value within excel.
# First-time setup, install the module:
Install-Module ImportExcel
Import the module:
Import-Module ImportExcel
Now, import the data from your existing excel document:
$wb = Import-Excel -Path 'c:\Scripts\Emp.xlsx'
Display the data by using the column names:
$ws=$wb.ActiveSheet
$Row=3 do { $data.Range("A$Row").Text if ($data) { Write-Verbose "I see $data" $Row }
else { write-host "This is broken"}
}while($Row -ne 221)
Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
Yes
Total Karma
66,614
Link Karma
30,920
Comment Karma
35,639
Profile updated: 4 days ago
Posts updated: 9 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PowerShell/...