ImportExcel can't autosize, even though mono-libgdiplus is installed
I get the following message when using import-excel with Powershell on OSX:
WARNING: ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
brew install mono-libgdiplus
However, mono-libgdiplus is installed and I even reinstalled. All software is up-to-date:
Mac OSX Big Sur 11.6.8 (20G730)
Homebrew 3.5.10
mono-libgdiplus 6.1_1
Powershell 7.2.6
Powershell Module ImportExcel 7.8.0
What's wrong, what can I do?
Could be the check for that needs to be updated. Can you still use -AutoSize? Does it work? Or no go?
Sorry, I've no idea as I'm not using this software regulary. I followend an article (https://adamtheautomator.com/powershell-excel/) using ImportExcel and advising to install mono-libgdiplus on the mac, so I did it. I worte the program some time ago and I never noticed this warning I'm reporting, so I guess it's probably new due to some updates. However, the mere import of the Excel files seems to function. In my program I'm using '-Autoresize' only if !($IsMacOS) - thus on Windows, and I don't recall what it is supposed to do
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@dfinke Encountering the same with PS 7 Core.
libgdiplus is already the newest version (6.0.4+dfsg-2).
libc6-dev is already the newest version (2.35-0ubuntu3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Importing required Module: 'ImportExcel' ...
WARNING: ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev
@ili101 wondering if you know more about this?
It looked like .Net 6 drooped support for it on non-windows System.Drawing.Common only supported on Windows. So it looks like it's not going to work on PS 6.2 and up? EPPlus 6.0.3 stopped using it as a dependency https://github.com/EPPlusSoftware/EPPlus/issues/572 I don't see how we can make it work on new PS versions 🫤
Thanks @ili101 wanted to get your confirmation.
I am seeing the same issue from azure github actions.
- name: Run PowerShell script
uses: azure/powershell@v1
Can you please help with the workaround?