From 06a8683c20eddf7b334d46d435f01b1bd13af08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AF=D1=80=D0=B8=D0=BD=20=D0=97=D0=B0=D1=85=D0=B0=D1=80?= =?UTF-8?q?=20=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B8=D1=87?= Date: Tue, 21 Nov 2023 12:11:38 +0500 Subject: [PATCH] delete invalid URIs --- .../ObjectPrintingTests/ExcelParsingTests.cs | 19 ++++++++++++++++++ ...leWithEnumerable_targetWithInvalidUri.xlsx | Bin 0 -> 20265 bytes .../Implementations/ExcelDocument.cs | 6 +++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Excel.TemplateEngine.Tests/ObjectPrintingTests/Files/simpleWithEnumerable_targetWithInvalidUri.xlsx diff --git a/Excel.TemplateEngine.Tests/ObjectPrintingTests/ExcelParsingTests.cs b/Excel.TemplateEngine.Tests/ObjectPrintingTests/ExcelParsingTests.cs index d033ce6..97cdec9 100644 --- a/Excel.TemplateEngine.Tests/ObjectPrintingTests/ExcelParsingTests.cs +++ b/Excel.TemplateEngine.Tests/ObjectPrintingTests/ExcelParsingTests.cs @@ -65,6 +65,25 @@ public void TestSimpleWithEnumerable() }); } + [Test] + public void TestInvalidUris() + { + var (model, mappingForErrors) = Parse("simpleWithEnumerable_template.xlsx", "simpleWithEnumerable_targetWithInvalidUri.xlsx"); + + mappingForErrors["Type"].Should().Be("C3"); + mappingForErrors["Items[0].Id"].Should().Be("B13"); + mappingForErrors["Items[0].Name"].Should().Be("C13"); + mappingForErrors["Items[1].Id"].Should().Be("B14"); + mappingForErrors["Items[1].Name"].Should().Be("C14"); + + model.Type.Should().Be("email@email.email>"); + model.Items.Should().BeEquivalentTo(new[] + { + new Item {Id = "2311129000009", Name = "СЫР ГОЛЛАНДСКИЙ МОЖГА 1КГ"}, + new Item {Id = "2311131000004", Name = "СЫР РОССИЙСКИЙ МОЖГА 1КГ"}, + }); + } + [Test] public void TestLazyParse() { diff --git a/Excel.TemplateEngine.Tests/ObjectPrintingTests/Files/simpleWithEnumerable_targetWithInvalidUri.xlsx b/Excel.TemplateEngine.Tests/ObjectPrintingTests/Files/simpleWithEnumerable_targetWithInvalidUri.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..91158741ae0165ef9e0bc82688130c108d988b8a GIT binary patch literal 20265 zcmeFZgL`JpvNs&tPA0a^i7}apZQHhO+qP}nPA0Z(>&wi3_WPdiI{W+u?^#!_yVu?Q ztE%o!Rjul-UbnOuFbE0&7ytwS0005NFMfeh8$bYnYA^r*WB>>tH9;#&djm^*EqNDf z13L{`XA5)uTo54gYyhAy{QqA656{4O!kA?*J;IO2gctajCI#JWcm-6SA9!PEC3nDU z&H~ift2Y=>UYj8<#ig0!Xyjt?jg2KP+ z!77e!qw3IaoJ^m+SyW%R<;^&g5MV;$Y5tJFaL;*8x}TFWD_XXUK@(L=ECnzLQ;|R( zo_0Y%qVkqLrLI(=iC?z9yowqa-ks%U_;u?k^TZdqkz%c$1vxa4V!if({4<*i0Jmxg zZ-%_?kWW|Hv|G+AQN}*Yj)ZIYaf^aO3hqkI4IO-cbXYAYz8V)UtCv(D?P5L#;VE1D zTdsvpy+gh|kL%g=UKhyn&cyDg;T0?Zz~?70fb{>*QX3TLiSEACPyEXep}#Cu%htf$ zj*j-v=l@#h|HEeaUxr>DDn&*babZ0gK|suj|5qDh>i>Q z3lAwjMP0}pJEADdnu~M9MmC9r=dOin5T{W>Zjy?R1TnE8U093GSb<6y%IKOsaJ=ZNC$`Xz81G z-wLI5A-}uRNTv_V5;7w_F;4v)BFVn@Qmtpc9?Nj)XM^l38@?Lx4Z|zm_d7%Bh*n-2gWZkz-i^jpaER|%DiXv@@7L#?5EZD2cf#$E;(_V6`!FNhPYVq*;Lhgh z3WO2Jh(0vx%S);uO}Dq}e!$w|<_ zzDLxY_ShELcFy$|R2fu-g;nw!iqs~3R0R$jrOuSd_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PF?8Li hH4(CI9}gtmuzD%Ln-!RiKqtKLGrR=mL@jR+4*=1y*r5Ob literal 0 HcmV?d00001 diff --git a/Excel.TemplateEngine/FileGenerating/Primitives/Implementations/ExcelDocument.cs b/Excel.TemplateEngine/FileGenerating/Primitives/Implementations/ExcelDocument.cs index 3906f15..27e3a8e 100644 --- a/Excel.TemplateEngine/FileGenerating/Primitives/Implementations/ExcelDocument.cs +++ b/Excel.TemplateEngine/FileGenerating/Primitives/Implementations/ExcelDocument.cs @@ -32,7 +32,11 @@ public ExcelDocument([NotNull] byte[] template, [NotNull] ILog logger) documentMemoryStream = new MemoryStream(); documentMemoryStream.Write(template, 0, template.Length); - spreadsheetDocument = SpreadsheetDocument.Open(documentMemoryStream, true); + var settings = new OpenSettings + { + RelationshipErrorHandlerFactory = RelationshipErrorHandler.CreateRewriterFactory((_, _, val) => " ") + }; + spreadsheetDocument = SpreadsheetDocument.Open(documentMemoryStream, true, settings); var theme = GetEmptyTheme(); documentStyle = new ExcelDocumentStyle(spreadsheetDocument.GetOrCreateSpreadsheetStyles(), spreadsheetDocument.WorkbookPart?.ThemePart?.Theme ?? theme, this.logger);