Error in template while adding employee list

See original GitHub issue

Hi I am getting error while adding the list of employee in template. Error:

The range does not meet the requirements of the list ranges. For details, see the documentation.

Please check the code: `
var people = new List<Employee> { new Employee {Name = “Alice”, Address = “dfsasdasdasd”,Phone=“312312312”}, new Employee {Name = “Alice1”, Address = “dfsasdasdasd1”,Phone=“2131232”}, new Employee {Name = “Alice3”, Address = “dfsasdasdasd3”,Phone=“5645”} }; template.AddVariable(“employee”, people); template.Generate(); template.SaveAs(outputFile); public class Employee { public string Name { get; set; } public string Address { get; set; } public string Phone { get; set; } }

` Please check the error screen shot. Template:

screenshot_2

Output:

screenshot_1

Note : for string and integer values it’s working fine. but issue with list

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
b0bi79commented, Oct 9, 2018

I modified your template. Look at what I changed - I created a range with the name of your variable (“empoloyee”), which includes a row with formulas, a row of options under the formulas and a column of options to the left of the table.

template.xlsx templateimg

Read more about it here https://closedxml.github.io/ClosedXML.Report/docs/en/Flat-tables

1reaction
vinay13marcommented, Oct 9, 2018

Hi Please check the template

template.xlsx

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Template parse errors:'employee-list' is not ...
I'm new to angular 5 and getting this error: Uncaught Error: Template parse errors:'employee-list' is not a known element: · Can we see...
Read more >
Possible Errors While Uploading your Employee List
Understand the possible errors that can emerge while uploading your employee list, and the best way to resolve them. Common Error 1 -...
Read more >
Error when using an URL for document template in Content ...
Does anyone know the correct format to use in URL for a template under Advanced settings? Example URL format used : /sites/contentTypeHub/Shared.
Read more >
Template API - Possible errors
This error occurs when there is a problem in listing the available templates. { "error": { "message": "There was a problem listing available...
Read more >
Error when importing list template
Importing the template works fine, I can create the list with no issues, but when seeing the contents of the list the above...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found