Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comma in Worksheet Name on Template causes InvalidOperationException #47

Closed
SmilingCatEntertainment opened this issue Nov 2, 2018 · 1 comment
Labels

Comments

@SmilingCatEntertainment
Copy link

SmilingCatEntertainment commented Nov 2, 2018

  1. Create a template
  2. Add a second worksheet
  3. Rename the sheet to a name containing a comma
  4. Add a valid vertical table definition to the sheet
  5. Attempt to apply the template
  6. Exception occurs:
    System.InvalidOperationException
    HResult=0x80131509
    Message=Sequence contains no matching element
    Source=System.Core
    StackTrace:
    at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
    at ClosedXML.Excel.XLNamedRange.<get_Ranges>b__9_3(<>f__AnonymousType32 <>h__TransparentIdentifier0) at System.Linq.Enumerable.<>c__DisplayClass7_03.b__0(TSource x)
    at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at ClosedXML.Excel.XLNamedRange.get_Ranges() at ClosedXML.Report.Excel.XlExtensions.<>c__DisplayClass7_0.<GetContainingNames>b__0(IXLNamedRange x) at System.Linq.Enumerable.<>c__DisplayClass6_01.b__0(TSource x)
    at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
    at ClosedXML.Report.RangeInterpreter.ParseTags(IXLRange range, String rangeName)
    at ClosedXML.Report.RangeInterpreter.Evaluate(IXLRange range)
    at ClosedXML.Report.XLTemplate.Generate()
    ...
@b0bi79 b0bi79 added the bug label Nov 2, 2018
@b0bi79
Copy link
Member

b0bi79 commented Nov 2, 2018

This is a bug in ClosedXML that has been fixed in recent versions. We are currently working to support ClosedXML.Report the latest version of ClosedXML.

@b0bi79 b0bi79 closed this as completed Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants