Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
936c92a
Feature/pivotbyv2 (#2365)
karlkallman May 27, 2026
10ba562
#2311 - Implemented new Excel functions (#2364)
swmal May 27, 2026
e3877f5
EPPlus version 8.6.0
JanKallman May 29, 2026
2237b14
Fix: ExcelWorksheets.Delete throws NotSupportedException on ExcelChar…
lievendf May 29, 2026
7978f5c
Merge branch 'develop8' of https://github.com/EPPlusSoftware/EPPlus i…
JanKallman May 29, 2026
f591cc2
Fixes issue #2372
JanKallman Jun 2, 2026
614974f
Updated test
JanKallman Jun 3, 2026
71a9b14
Fixed test that affected static values of the Chart Style Manager, ca…
JanKallman Jun 3, 2026
67759b1
Fix case-sensitivity enum parsing bug in ExcelChartAxisStandard Major…
lievendf Jun 3, 2026
c58eb06
Merge pull request #2374 from EPPlusSoftware/bug/issue2372
OssianEPPlus Jun 3, 2026
74a6bc4
Fixed some trendline issues
JanKallman Jun 4, 2026
c5cd08e
Fixes issue #2376
JanKallman Jun 4, 2026
e16b4c2
Removed, renamed and fixed a few issues
JanKallman Jun 5, 2026
105f3f1
Added new ActualPosition property for axis
JanKallman Jun 5, 2026
15fedad
Merge pull request #2377 from EPPlusSoftware/bug/issue2376
OssianEPPlus Jun 8, 2026
181c1ee
Re-implemented pie-chart and explosion
OssianEPPlus Jun 8, 2026
65d52da
Fixed trendline formulas to add superscript to textboxs
JanKallman Jun 8, 2026
74cef87
Added debug properties to pie slices
OssianEPPlus Jun 8, 2026
60a913e
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 8, 2026
2d73a98
Deactivated debug props + cleanup
OssianEPPlus Jun 8, 2026
2a887cd
Simplified constructor
OssianEPPlus Jun 8, 2026
a3b7262
Fixed most trendline sub/superscript issues + rect
OssianEPPlus Jun 8, 2026
b83e331
Added margins to rect
OssianEPPlus Jun 8, 2026
344d7d5
Half fix for duplication
OssianEPPlus Jun 8, 2026
229d086
Fixed datalabel positions. Messily.
OssianEPPlus Jun 9, 2026
77b7382
Fixed datalabels more. Started fixing centering trendline
OssianEPPlus Jun 9, 2026
73c9625
Fixed DrawingTextBox duplicate properties
OssianEPPlus Jun 9, 2026
976e1ae
Fixed Most of trendline centering
OssianEPPlus Jun 9, 2026
5a394ce
Added spacing in trendline strings
OssianEPPlus Jun 9, 2026
ab41985
Fixed stacking axis
JanKallman Jun 9, 2026
b2fb1d5
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 9, 2026
7419417
Tweaked tests. Added recalculation to textbody
OssianEPPlus Jun 9, 2026
7d7113a
Fixed positioning of stacked axis
JanKallman Jun 9, 2026
bd0f235
WIP:Axis positioning and sizeing
JanKallman Jun 9, 2026
45b069b
Fixed line-ending issue
OssianEPPlus Jun 9, 2026
df7cdaa
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 9, 2026
a84dcf6
Verified vertical alignment also functional
OssianEPPlus Jun 9, 2026
388c06e
Changed TextBox. GroupItem realtime. + margin grp
OssianEPPlus Jun 10, 2026
34c04af
Added tests for new textbox
OssianEPPlus Jun 10, 2026
29cd62c
Fixed alignment bug and in ChartTitle.DisplayedText
OssianEPPlus Jun 10, 2026
f8e83b6
Partial trendline fix
OssianEPPlus Jun 10, 2026
859353a
Partial fix for trendline autosize alignment issue
OssianEPPlus Jun 10, 2026
03a5f5d
Functional Trendlines fix
OssianEPPlus Jun 10, 2026
239f3cf
#2383 - Fixed issue where VLOOKUP and HLOOKUP sometimes returned wron…
swmal Jun 11, 2026
796e9c9
Fixed center-alignment for shapes
OssianEPPlus Jun 11, 2026
1c09dd8
Fixed sIcon location on datalabel
OssianEPPlus Jun 11, 2026
9cae12a
Fixes axis position
JanKallman Jun 11, 2026
7b1403f
Fixed width of textbox
OssianEPPlus Jun 11, 2026
c04fb81
Added fix for html images
OssianEPPlus Jun 11, 2026
57f4551
Feature/regexfunctions (#2373)
karlkallman Jun 12, 2026
3ed60c4
Fixed multiple paragraph test
OssianEPPlus Jun 15, 2026
dd28f16
Temporary fix for exact font
OssianEPPlus Jun 15, 2026
243cefe
Bugi2381 - ConditionalFormatting DxfStyleId miss-match (#2386)
OssianEPPlus Jun 15, 2026
6531b1b
WIP:Added first test for errorbars
JanKallman Jun 15, 2026
9fd6e4b
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 15, 2026
d1706a9
Fixed infinite loop in GetTolColumnFromPixels. (#2382)
AdrianEPPlus Jun 15, 2026
7d8560e
Fixed issue where rotated text would partially hide border (#2380)
AdrianEPPlus Jun 16, 2026
fc635bb
Fixed some issues on chart axis and legends.
JanKallman Jun 16, 2026
ade4d16
Partial fix for datalabels
OssianEPPlus Jun 16, 2026
f1e5ea0
EPPlus version 8.6.1
JanKallman Jun 16, 2026
da78261
Fixed background for datalabels
OssianEPPlus Jun 16, 2026
b2ac390
Removed some warnings, mostly due to usage of ExpectedException in Un…
swmal Jun 16, 2026
dc88caa
Replaced DataTestMethod->TestMethod in unit tests
swmal Jun 16, 2026
602107f
Fixed small error in positioning of shapes in charts
JanKallman Jun 16, 2026
bc11439
Merge branch 'develop8' of https://github.com/EPPlusSoftware/EPPlus i…
JanKallman Jun 16, 2026
d54fccf
Transferred piechart legend special case
OssianEPPlus Jun 16, 2026
f40e61e
Fixed label position on horizontal axis
JanKallman Jun 16, 2026
dd18c5a
Fixes axis label alignment and label positioning
JanKallman Jun 16, 2026
1e0beae
Fixed centering of piechart legend
OssianEPPlus Jun 16, 2026
31d08bc
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 16, 2026
8df3dc4
Start of datalabels for barcharts
OssianEPPlus Jun 16, 2026
5356d8c
Fixed out-end for bar-charts
OssianEPPlus Jun 17, 2026
2b6ff32
Functional datalabels
OssianEPPlus Jun 17, 2026
a84b1d5
Columnn and bar charts correct
OssianEPPlus Jun 17, 2026
f1ab07f
fixed stacked column pos datalabels
OssianEPPlus Jun 17, 2026
c576942
Start of better datalabel system+debug
OssianEPPlus Jun 17, 2026
f8afb27
Started Work on error bars
JanKallman Jun 17, 2026
4248021
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 17, 2026
8d11438
New position functional for center and in-base
OssianEPPlus Jun 17, 2026
b700909
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 17, 2026
48bac1d
Made labels work for inEnd and inBase again
OssianEPPlus Jun 17, 2026
62b16c9
Added outEnd
OssianEPPlus Jun 17, 2026
3337486
Simplified initilization in barChart
OssianEPPlus Jun 17, 2026
7b47db4
Made new system functional for bars AND columns
OssianEPPlus Jun 17, 2026
c6ef977
Fix KeyNotFoundException/ArgumentException on renaming or removing st…
lievendf Jun 18, 2026
a108702
Fix IndexOutOfRangeException in LoadFromText with trailing columns (#…
lievendf Jun 18, 2026
c581ab7
Fix url of license information in Readme.md (#2389)
lievendf Jun 18, 2026
6bf43e0
Ensured mix of series and custom datalabels get read
OssianEPPlus Jun 18, 2026
51440dc
Fix: drawing hyperlink reassignment crashes and inert tooltip setting…
lievendf Jun 18, 2026
d25f9db
Added support for negative columns + margin
OssianEPPlus Jun 18, 2026
6b38834
Ensured works for bar charts as well
OssianEPPlus Jun 18, 2026
9e3ce65
Added simpler but somewhat unclear method
OssianEPPlus Jun 18, 2026
d5ea8ab
Attempting to use functionality in pie item
OssianEPPlus Jun 18, 2026
f6db912
Fixed several pie chart datalabel bugs
OssianEPPlus Jun 18, 2026
c0770cd
Fixed bugs and cleaned up datalabels
OssianEPPlus Jun 22, 2026
3bb4be8
Cleanup and added all pie datalabels to same file
OssianEPPlus Jun 22, 2026
e3695a8
Start of adding svg to html export
OssianEPPlus Jun 22, 2026
c54a8d5
Merge branch 'develop9' into feature/DrawingRendererRefactor
OssianEPPlus Jun 22, 2026
64b8bbb
Render of Errorbars for line charts
JanKallman Jun 22, 2026
273be36
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 22, 2026
18ec82f
Added html tests
OssianEPPlus Jun 22, 2026
0df0bcd
Fixed Errorbars issue
JanKallman Jun 22, 2026
7c46aaa
Added category test
OssianEPPlus Jun 22, 2026
1341b01
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 22, 2026
15fbf9d
Fixed gapwidth for barcharts
OssianEPPlus Jun 22, 2026
0327283
Strong named EPPlus.DrawingRenderer and added tests for .NET 4.6.2.
JanKallman Jun 22, 2026
cb97188
Added stylemanager styling
OssianEPPlus Jun 22, 2026
8f39b97
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 22, 2026
1922b10
Fixed ellipse items having rect type
OssianEPPlus Jun 22, 2026
19fbe51
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 23, 2026
8dcdd7b
Fixed trendline label positioning
JanKallman Jun 23, 2026
5ee696a
Fixed trendline label positioning.
JanKallman Jun 23, 2026
8f99a32
Fixed databar bug + styling border issue
OssianEPPlus Jun 23, 2026
07e7ee1
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 23, 2026
2ecc4d1
Fixed null color for shapes and charts
JanKallman Jun 23, 2026
c2f3e88
Fixed blip fills
JanKallman Jun 23, 2026
a60e584
Start of fix for title element
OssianEPPlus Jun 23, 2026
1559914
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 23, 2026
08439a7
Fixed title bug in epplus
OssianEPPlus Jun 24, 2026
70c6563
Fixes errorbars for bar charts
JanKallman Jun 24, 2026
0ca4cc2
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 24, 2026
396227b
Fixed one test-failure
OssianEPPlus Jun 24, 2026
801f507
Fixed Line Markers
JanKallman Jun 24, 2026
3d451eb
Fixed failing tests for Archivo Narrow
swmal Jun 24, 2026
c91c853
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
swmal Jun 24, 2026
38f37a2
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 24, 2026
4e3ab79
Fixed corrupting issues with previous fix
OssianEPPlus Jun 24, 2026
ed6a024
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 24, 2026
62971c5
Turned off debug points for dlbl
OssianEPPlus Jun 24, 2026
04447fb
Fixed axis and trendlines issues
JanKallman Jun 24, 2026
476e751
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
JanKallman Jun 24, 2026
0543a6f
Differing shape and chart fill
OssianEPPlus Jun 24, 2026
677e371
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 24, 2026
6b7b134
Attempt att resolving style hierarchy correctly
OssianEPPlus Jun 25, 2026
fd35946
Added new option class to the ToSvg method
JanKallman Jun 29, 2026
8a8d188
Adding additional tests
OssianEPPlus Jun 29, 2026
bd1a513
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 29, 2026
fa81f57
Merge branch 'develop9' into feature/DrawingRendererRefactor
OssianEPPlus Jun 29, 2026
ab3399b
Fix for autofit columns with autofilters (#2390)
swmal Jun 29, 2026
aa2d8ab
Added base-functional chart export
OssianEPPlus Jun 29, 2026
08fcf4e
Allow AppVersion in OfficeProperties to be set to null. #2393. (#2394)
karlkallman Jun 29, 2026
3b6954a
Fixed absolute positioning for charts
OssianEPPlus Jun 29, 2026
5b383df
Start of relative position + multiple charts/shapes
OssianEPPlus Jun 30, 2026
d87b4ef
Merge branch 'develop8' into feature/DrawingRendererRefactor
JanKallman Jun 30, 2026
d6862da
Documented change to DrawingFillBasic
OssianEPPlus Jun 30, 2026
96fd666
Merge branch 'feature/DrawingRendererRefactor' of https://github.com/…
OssianEPPlus Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# EPPlus 8

## License
EPPlus 8 has a dual license model with a community license for noncommercial use: [Polyform Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/).
EPPlus 8 has a dual license model with a community license for noncommercial use: [Polyform Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0).

With this license EPPlus is free to use for personal/noncommercial use, but will require a commercial license to be used in a commercial business.

Expand Down
10 changes: 5 additions & 5 deletions appveyor8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 8.5.4.{build}
version: 8.6.1.{build}
branches:
only:
- develop8
Expand All @@ -10,15 +10,15 @@ install:
& $env:temp\dotnet-install.ps1 -Architecture x64 -Version '10.0.100' -InstallDir "$env:ProgramFiles\dotnet"
init:
- ps: >-
Update-AppveyorBuild -Version "8.5.4.$env:appveyor_build_number-$(Get-Date -format yyyyMMdd)-$env:appveyor_repo_branch"
Update-AppveyorBuild -Version "8.6.1.$env:appveyor_build_number-$(Get-Date -format yyyyMMdd)-$env:appveyor_repo_branch"

Write-Host "8.5.4.$env:appveyor_build_number-$(Get-Date -format yyyyMMdd)-$env:appveyor_repo_branch"
Write-Host "8.6.1.$env:appveyor_build_number-$(Get-Date -format yyyyMMdd)-$env:appveyor_repo_branch"
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
assembly_version: 8.5.4.{build}
file_version: 8.5.4.{build}
assembly_version: 8.6.1.{build}
file_version: 8.6.1.{build}
nuget:
project_feed: true
before_build:
Expand Down
1 change: 1 addition & 0 deletions docs/articles/breakingchanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,5 @@ The misspelled enum eCompundLineStyle has been renamed eCompoundLineStyle.

### 9.0.0
The misspelled enum eCompundLineStyle has been renamed eCompoundLineStyle.
The misspelled property on drawingFill `Transparancy` has been renamed to `Transparency`
The `Richtext.Baseline` property now always return that value in whole percent.
52 changes: 46 additions & 6 deletions docs/articles/fixedissues.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,52 @@
## Version 9.0.0
* Added 'Layout' property to 'ExcelChartTrendlineLabel' class.

## Version 8.5.5
### Minor Features
* Ranges can now convert their values to richText via ´ConvertToRichText()´ e.g. ´ws.Cells["A1"].ConvertToRichText()´
### Fixed issues
* Several issues related to RichText in ranges. Simply looking at the .RichText attribute no longer changes the cell value. Setting a propert e.g. ´range.RichText.Text = "Hi"´ or using ConvertToRichText() actually changes the value.

## Version 8.6 1
### Features
* 3 new functions:
* ´REGEXEXTRACT´
* ´REGEXREPLACE´
* ´REGEXTEST´
### Fixed issues
* Fixed mismatch in conditional formatting when loading a workbook.
* Fixed several issues in the HTML export
* Text rotated vertically in cells now adjusts column widths more appropriately.
* Borders sometimes disappeared when having rotate the text.
* Fixed bug where the positions/visuals of images would sometimes not appear.
* Pattern fills with empty colors did not pick the correct theme color.
* Merged cells did not render border correctly on the right and bottom edges.
* Workbooks with group shapes in charts sometimes failed to load.
* Images in charts sometimes got stretched.
* ´ExcelRangeBase.ClearDataValidation´ threw an ´InvalidOperationException´ if when there were no data validations.
* Fixed case-sensitivity parsing on ´ExcelChartAxisStandard´ enums, ´MajorTickMark´ and ´MinorTickMark´ (Fix by Lieven De Foor).
* ´ExcelWorksheets.Delete´ threw ´NotSupportedException´ on chart worksheets. (Fix by Lieven De Foor).
* Using full row/column addresses in formulas referencing external workbooks caused bad performance.
* The ´VLOOKUP´ and ´HLOOKUP´ function sometimes returned the wrong value on unsorted data.

## Version 8.6 0
### Features
* 9 new functions:
* ´GROUPBY´
* ´PIVOTBY´
* ´TRIMRANGE´
* ´WRAPROWS´
* ´WRAPCOLS´
* ´USDOLLAR´
* ´CODE´
* ´ENCODEURL´
* ´ISFORMULA´
* Support for the [trim reference operators](https://github.com/EPPlusSoftware/EPPlus/wiki/Trim-reference-operator).
* Ranges can now convert their values to rich text via ´ConvertToRichText()´ e.g. ´ws.Cells["A1"].ConvertToRichText()´
* Calculation of dynamic array formulas now support dirty cell recalculation inside other dirty cell calculations.
### Fixed issues
* Fixed a cache issue with the ´IF´ function when recalculation dynamic array formulas with dirty cells.
* ´ExcelPackage.LoadAsync´ failed with an unhandled exception, if a package had a package part larger than 2GB.
* Fixed copy of absolute positioned drawings and group shapes.
* Fixed a performance issue related to copying using full row/column addresses.
* Fixed stale values when using newer worksheet functions (e.g. ARRAYTOTEXT) by adding required features to the workbook XML.
* CompareOptions.Culture in RangeSortOptions was not honored when sorting ranges(thanks to lievendf).
* Copied "Text length data validations" no longer become "Int data validations" in the output workbook.
* Several issues related to RichText in ranges. Accessing the ´ExcelRangeBase.RichText´ property no longer casts the cell value to string.
## Version 8.5.4
### Minor Features
* Added ´IncludeInHtmlOnly´ option to the ´ePictureInclude´ enum. This allows the HTML Exporter to include pictures directly in the HTML output rather than in the CSS.
Expand Down
39 changes: 38 additions & 1 deletion src/EPPlus.DrawingRenderer.Tests/Chart/BarChartTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void GenerateSvgForBarCharts1()
var ix = 0;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
var svg = c.ToSvg(x => { x.Size.Width = 100; x.Size.Height = 100; });
SaveTextFileToWorkbook($"svg\\BarChartForSvg_sheet1_{ix++}.svg", svg);
}
}
Expand All @@ -42,5 +42,42 @@ public void GenerateSvgForBarCharts2()
}
}
}

[TestMethod]
public void DatalabelBarCharts()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("BarChartForSvgDatalabelsBasic.xlsx"))
{
var ws = p.Workbook.Worksheets[0];
var drawings = ws.Drawings;
var ix = 1;

for (int i = ix; i < drawings.Count; i++)
{
var svg = drawings[i].ToSvg();
SaveTextFileToWorkbook($"svg\\BarChartDataLabels{ix++}.svg", svg);
}
}
}


[TestMethod]
public void NegativeDatalabelBarCharts()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("negativeDatalabels.xlsx"))
{
var ws = p.Workbook.Worksheets[0];
var drawings = ws.Drawings;
var ix = 0;

for (int i = ix; i < drawings.Count; i++)
{
var svg = drawings[i].ToSvg();
SaveTextFileToWorkbook($"svg\\NegativeLabels{ix++}.svg", svg);
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/EPPlus.DrawingRenderer.Tests/Chart/ColumnChartTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void GenerateSvgForColumnCharts1()

//var ix = 1;
//var c = ws.Drawings[ix];
//var svg = renderer.RenderDrawingToSvg(c);
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\ChartForSvg_ind{ix++}.svg", svg);

var ix = 0;
Expand Down
70 changes: 70 additions & 0 deletions src/EPPlus.DrawingRenderer.Tests/Chart/ErrorbarsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using OfficeOpenXml;
using OfficeOpenXml.Drawing.Chart;

namespace EPPlus.Export.ImageRenderer.Tests.Chart
{
[TestClass]
public class ErrorbarsTests : TestBase
{
[TestMethod]
public void GenerateSvgForErrorbars_Line_Sheet1()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("Errorbars.xlsx"))
{
var ws = p.Workbook.Worksheets[0];
//var ix = 4;
//var c = ws.Drawings[ix];
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\Error_sheet1_ind{ix++}.svg", svg);

var ix = 0;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\Errorbar_sheet1_{ix++}.svg", svg);
}
}
}
[TestMethod]
public void GenerateSvgForErrorbars_Column_Sheet2()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("Errorbars.xlsx"))
{
var ws = p.Workbook.Worksheets[1];
//var ix = 4;
//var c = ws.Drawings[ix];
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\Error_sheet1_ind{ix++}.svg", svg);

var ix = 0;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\Errorbar_sheet2_{ix++}.svg", svg);
}
}
}
[TestMethod]
public void GenerateSvgForErrorbars_Bar_Sheet3()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("Errorbars.xlsx"))
{
var ws = p.Workbook.Worksheets[2];
//var ix = 4;
//var c = ws.Drawings[ix];
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\Error_sheet1_ind{ix++}.svg", svg);

var ix = 0;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\Errorbar_sheet3_{ix++}.svg", svg);
}
}
}
}
}
79 changes: 51 additions & 28 deletions src/EPPlus.DrawingRenderer.Tests/Chart/LineChartToSvgTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public void GenerateSvgForLineCharts_sheet1()
{
var ws = p.Workbook.Worksheets[0];

//var ix = 6;
//var c = ws.Drawings[ix];
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\ChartForSvg_ind{ix++}.svg", svg);
var ix = 6;
var c = ws.Drawings[ix];
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\ChartForSvg_ind{ix++}.svg", svg);

var ix = 0;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\ChartForSvg{ix++}.svg", svg);
}
//for (int i = 0; i < ws.Drawings.Count; i++)
//{
// var c = ws.Drawings[i];
// var svg = c.ToSvg();
// SaveTextFileToWorkbook($"svg\\ChartForSvg{i}.svg", svg);
//}
}
}

Expand Down Expand Up @@ -128,64 +128,65 @@ public void GenerateSvgForLineCharts()
}
}
}

[TestMethod]
public void GenerateSuperScript()
public void GenerateSvgForCharts_SecondaryAxis()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("Superscript.xlsx"))
using (var p = OpenTemplatePackage("ChartForSvg_SecondaryAxis.xlsx"))
{
var ws = p.Workbook.Worksheets[0];
//var ix = 1;
//var c = ws.Drawings[ix];
//var svg = renderer.RenderDrawingToSvg(c);
//SaveTextFileToWorkbook($"svg\\LineChartForSvg_Single{ix++}.svg", svg);
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\ChartForSvg_sheet2_{ix++}.svg", svg);
var ix = 1;
foreach (var c in ws.Drawings)
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\ss{ix++}.svg", svg);
SaveTextFileToWorkbook($"svg\\ChartForSvg_SecAxis{ix++}.svg", svg);
}
}
}

[TestMethod]
public void GenerateSvgForCharts_SecondaryAxis()
public void GenerateSvgForCharts_SecondaryAxis_sheet2()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("ChartForSvg_SecondaryAxis.xlsx"))
{
var ws = p.Workbook.Worksheets[0];
//var ix = 3;
var ws = p.Workbook.Worksheets[1];
//var ix = 2;
//var c = ws.Drawings[ix];
//var svg = renderer.RenderDrawingToSvg(c);
//SaveTextFileToWorkbook($"svg\\ChartForSvg_sheet2_{ix++}.svg", svg);
//SaveTextFileToWorkbook($"svg\\ChartForSvg_Sheet2_SecAxis{ix++}.svg", svg);
var ix = 1;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\ChartForSvg_SecAxis{ix++}.svg", svg);
SaveTextFileToWorkbook($"svg\\ChartForSvg_Sheet2_SecAxis{ix++}.svg", svg);
}
}
}
[TestMethod]
public void GenerateSvgForCharts_SecondaryAxis_sheet2()
public void GenerateSvgForCharts_SecondaryAxis_sheet3()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("ChartForSvg_SecondaryAxis.xlsx"))
{
var ws = p.Workbook.Worksheets[1];
//var ix = 2;
var ws = p.Workbook.Worksheets[2];
//var ix = 1;
//var c = ws.Drawings[ix];
//var svg = renderer.RenderDrawingToSvg(c);
//SaveTextFileToWorkbook($"svg\\ChartForSvg_Sheet2_SecAxis{ix++}.svg", svg);
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\ChartForSvg_sheet3_{ix++}.svg", svg);
var ix = 1;
foreach (ExcelChart c in ws.Drawings)
{
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\ChartForSvg_Sheet2_SecAxis{ix++}.svg", svg);
SaveTextFileToWorkbook($"svg\\ChartForSvg_Sheet3_SecAxis{ix++}.svg", svg);
}
}
}

[TestMethod]
public void GenerateSimplestChart()
{
Expand Down Expand Up @@ -280,5 +281,27 @@ public void GenerateSimpleLineChart()
SaveTextFileToWorkbook($"svg\\defChartLine3Points.svg", svg);
}
}
[TestMethod]
public void GenerateSvgForLineCharts_AxisAlign_sheet1()
{
ExcelPackage.License.SetNonCommercialOrganization("EPPlus Project");
using (var p = OpenTemplatePackage("HorizontalAxisAlign.xlsx"))
{
var ws = p.Workbook.Worksheets[0];

//var ix = 3;
//var c = ws.Drawings[ix];
//var svg = c.ToSvg();
//SaveTextFileToWorkbook($"svg\\HorizontalAxisChartForSvg{ix++}.svg", svg);

for (int i = 0; i < ws.Drawings.Count; i++)
{
var c = ws.Drawings[i];
var svg = c.ToSvg();
SaveTextFileToWorkbook($"svg\\HorizontalAxisChartForSvg{i}.svg", svg);
}
}
}

}
}
Loading
Loading