I've been working with an Excel file stored in SharePoint that I access using PnP PowerShell along with the Import-Excel module. When I run my script under my personal account, everything runs smoothly. However, when I switch to a Managed Service Account (MSA) for scheduled tasks, I end up with a bunch of extra empty rows in the output. I use a filter to clean them up, but it doesn't seem to work with the MSA, resulting in erroneous error reports sent to Slack. I've double-checked the MSA's permissions, and it can handle downloads, edits, and uploads without issue. The transcript doesn't show much except that it's detecting those empty rows. Any ideas on what's going wrong?
1 Answer
I think you're facing an issue where Excel can misreport the 'last used cell'. Even if your data looks fine, Excel may still consider other rows as valid due to previous inputs. Have you tried manually opening the file and hitting Control + End to see where it jumps? It might give you a clue if the last used cell is further down than expected.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically