ClosedXML / ClosedXML/ClosedXML.Report
V0.2.6 with flat tables
- Dominant language
- C#
- Stars
- 647
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Description
After upgrading closedxml.report from v0.2.4 to v0.2.6, the reports with flat-tables are not working.
The template has expressions for the flat-table, such as {{item.date}} which was working fine in v0.2.4. But now it does not translate it to the value of the property, it simply shows it as text "{{item.date}}.
is there any change on how to define named ranges and the expression with the new version v0.2.6?
Here is the sample template
[sample.xlsx](https://github.com/ClosedXML/ClosedXML.Report/files/12486915/sample.xlsx)
Here are the results using v0.2.4 and v0.2.6
[samplev0.2.4.xlsx](https://github.com/ClosedXML/ClosedXML.Report/files/12486917/samplev0.2.4.xlsx)
[samplev0.2.6.xlsx](https://github.com/ClosedXML/ClosedXML.Report/files/12486918/samplev0.2.6.xlsx)
Code to generate report
```
using ClosedXML.Report;
using Newtonsoft.Json.Linq;
string outputFile = @".\reports\samplev0.2.6.xlsx";
var data = JArray.FromObject(Enumerable.Range(1, 3).Select(x => new { UserID = $"user{x}", Code = $"00{x}", Message = $"Message for User {x}" }));
var reportTemplate = new XLTemplate(@".\Templates\sample.xlsx");
reportTemplate.AddVariable("ReportRecord", data);
reportTemplate.Generate();
reportTemplate.SaveAs(outputFile);
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the regression with the attached sample.xlsx and the XLTemplate code, comparing output from v0.2.4 and v0.2.6. Trace how the ReportRecord flat-table data and {{item.date}} expressions are processed; done means the v0.2.6-generated report resolves the expressions to property values instead of displaying them as text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100