Closed scriptingstudio closed 5 months ago
Long time ago. IIRC, I had called it targetdata and then to support similar function in the PS world, moved to $InputObject and it was aliased.
I don't believe there are sufficient unit tests to safely change that without a bunch of work and testing.
I catch myself in situations where I’m too lazy to delete things that already work, but I understand that it’s backwards compatible
This module was beyond "organic." At the time I was and had been experimenting with many ways to capture/display/read data with PowerShell. I hit on being able to read Excel data that was reliable, not needing Excel or the COM approach (which was nice but brittle).
I thought it was cool and published it, that's why it is called ImportExcel
.
Then I discovered I could write to Excel and expanded. Didn't feel like renaming it, didn't know if this would ever go anywhere.
Never spread the word about it and folks would criticize that I didn't supply help/docs.
They didn't like the Examples
folder.
As I found cooler things, I added. Never had a plan, roadmap or vision.
The only reason it somewhat hangs together is because I've done software development for decades and have picked up a few good habits along the way.
This was/is a PoC and I consciously work to not over engineer.
I follow YAGNI - You ain't gonna need it. Why invest in building parts that may never be used, again ImportExcel
as the name.
Was just having fun building. 🙂
Some code looks strange.
InputObject
has an aliasTargetData
. In line 262 the expressionforeach ($TargetData in $InputObject) {
uses a variable namedTargetData
. This does not produce any issue but it is better to rename internal variable.if ($PSBoundParameters.ContainsKey($TargetData)) {
. What is$TargetData
here?