You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Add-ExcelChart cmdlet has various parameters to configure the X and Y axis. While configuring the Y-axis seems to work as expected, the X-axis behaves quite strangely as the example below shows.
`
$XL = Open-ExcelPackage -Path "Example2.xlsx" -Create
$Sheet = Add-WorkSheet -ExcelPackage $XL -WorksheetName "Example2"
I've included a couple of lines of code that are commented out. These show some other parameters that have an effect but not a desirable one.
Having looked at the code for Add-ExcelChart I am fairly sure that the problem is in the EPPlus library but I thought I should mention it in case it is something that can be fixed elsewhere.
@ccx004B If you want to pull the fix and try it locally - let me know how it goes. Looke at it at a glance.
I'm a tad suspicious that it has the xml tags. Not sure if that is the "fix" it did or was just reporting.
Hi Doug,
Thanks for looking at this and I’m sorry to take so long to reply.
Sadly the new version didn’t work. I had a strange problem in the first place which was that when I replaced the Add-ExcelChart in Public with the new version I got the following error when I tried to use it:
D:\My Code\PS-Excel\TESTS>powershell -file .\Test6.ps1
Add-ExcelChart : The term 'Add-ExcelChart' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At D:\My Code\PS-Excel\PowerEXCEL-IMPORTEXCEL.psm1:2565 char:2
+ Add-ExcelChart @FormatArgs -Row 8 -Column 1
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-ExcelChart:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
When I compared the original version with the new version, the only difference that Notepad++ noted was a single chunk of code so I copied that code to the old version of Add-ExcelChart and then my test program ran without errors. Unfortunately the results were the same as before.
I should add that I don’t use git if I can possibly avoid it so the problem is likely to be something I am doing wrong. Perhaps there are other files that have been changed but git only shows Add-ExcelChart and a test program as the changed files.
Anyway, thanks again for looking at it. The issue is not that important for me given the simple charts I need to create so feel free to close it unless you think others might benefit from the fix.
Best wishes…
Colin
From: Doug Finke ***@***.***>
Sent: 07 October 2025 18:35
To: dfinke/ImportExcel ***@***.***>
Cc: ccx004B ***@***.***>; Mention ***@***.***>
Subject: Re: [dfinke/ImportExcel] Configuring X-Axis on a line chart (Issue #1722)
<https://avatars.githubusercontent.com/u/67258?s=20&v=4> dfinke left a comment (dfinke/ImportExcel#1722) <#1722 (comment)>
@ccx004B <https://github.com/ccx004B> If you want to pull the fix and try it locally - let me know how it goes. Looke at it at a glance.
I'm a tad suspicious that it has the xml tags. Not sure if that is the "fix" it did or was just reporting.
If it has legs, I'll investigate further.
—
Reply to this email directly, view it on GitHub <#1722 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AVBL56NOTOODP5RWLDSDCC33WP2TNAVCNFSM6AAAAACH6PNL2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNZXHA4DIOBQHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AVBL56LAZVRO5X7DTI27Z5T3WP2TNA5CNFSM6AAAAACH6PNL2SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTWJKZXIS.gif> Message ID: ***@***.*** ***@***.***> >
@ccx004B all good. Axis were a challenge when I intially wired them up. Thanks for trying out the change. I asked the AI Copilot to try a fix. I didn't give it an direction, figured it was woth a shot.
Dear Doug,
That’s great thanks. I suspect it is on the right lines. Anyway, it isn’t very important so just if you have time. I suppose others might benefit as well.
Best wishes…..
Colin
From: Doug Finke ***@***.***>
Sent: 22 October 2025 17:57
To: dfinke/ImportExcel ***@***.***>
Cc: ccx004B ***@***.***>; Mention ***@***.***>
Subject: Re: [dfinke/ImportExcel] Configuring X-Axis on a line chart (Issue #1722)
dfinke left a comment (dfinke/ImportExcel#1722) <#1722 (comment)>
@ccx004B <https://github.com/ccx004B> all good. Axis were a challenge when I intially wired them up. Thanks for trying out the change. I asked the AI Copilot to try a fix. I didn't give it an direction, figured it was woth a shot.
If I can, I'll go deeper.
—
Reply to this email directly, view it on GitHub <#1722 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AVBL56NS6MA5O6VM35HIHXD3Y6ZO3AVCNFSM6AAAAACH6PNL2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMZTGMZTENBSHE> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
Activity
dfinke commentedon Oct 7, 2025
@ccx004B If you want to pull the fix and try it locally - let me know how it goes. Looke at it at a glance.
I'm a tad suspicious that it has the xml tags. Not sure if that is the "fix" it did or was just reporting.
If it has legs, I'll investigate further.
ccx004B commentedon Oct 22, 2025
dfinke commentedon Oct 22, 2025
@ccx004B all good. Axis were a challenge when I intially wired them up. Thanks for trying out the change. I asked the AI Copilot to try a fix. I didn't give it an direction, figured it was woth a shot.
If I can, I'll go deeper.
ccx004B commentedon Oct 22, 2025