Giter VIP home page Giter VIP logo

Comments (8)

b0bi79 avatar b0bi79 commented on May 18, 2024

The named range of QLIST should not be B4:K5, but A4:K5. Check this should help.
Read the documentation here https://closedxml.github.io/ClosedXML.Report/docs/en/Flat-tables#Vertical-tables

Each range specifying the vertical table must have at least two columns and two rows. The leftmost column and the bottom row serve to configuration purposes and are treated the special way. After the report is built the service column is cleared, and the service row is deleted if it is empty.

from closedxml.report.

joy-sensato avatar joy-sensato commented on May 18, 2024

Thanks for your help.

i am attaching the template. i want the report format like that. is it possible

thanks in advance.
STUDENT_LIST.xlsx

from closedxml.report.

b0bi79 avatar b0bi79 commented on May 18, 2024

Try this
image
Cells A5 - <<pivot>>, B5 - <<data>><<count>>, F5 - <<column>>
As a result, ClosedXML.Report will create a pivot table on a new sheet.

from closedxml.report.

joy-sensato avatar joy-sensato commented on May 18, 2024

hi
Thanks for your suggestion.

getting the following error on template.SaveAs(filename)

Value cannot be null.\r\nParameter name: source

thanks

from closedxml.report.

b0bi79 avatar b0bi79 commented on May 18, 2024

Put your code in, I'll check it in the evening.

from closedxml.report.

joy-sensato avatar joy-sensato commented on May 18, 2024

Hi

Please find the code below.

`System.Data.DataTable oDt = oBL.rptClassSectionStudentList().Tables[0];

			template.AddVariable("QLIST", oDt);


			template.AddVariable("INST_NAME", oDt.Rows[0]["INST_NAME"]);
			template.AddVariable("CLASS_NAME", oDt.Rows[0]["CLASS_NAME"]);
			template.AddVariable("SECTION_NAME", oDt.Rows[0]["SECTION_NAME"]);
			template.AddVariable("ST_COUNT", oDt.Rows[0]["ST_COUNT"]);

			template.AddVariable("LOGIN_NAME", oDt.Rows[0]["LOGIN_NAME"]);

			template.Generate();
			template.SaveAs(fileName);

also the template is attached.

thanks in advance
STUDENT_LIST.xlsx

from closedxml.report.

b0bi79 avatar b0bi79 commented on May 18, 2024

Did you manage to solve the problem?

from closedxml.report.

b0bi79 avatar b0bi79 commented on May 18, 2024

Closed due to a long wait for an answer. If the issue is still relevant, reopen it.

from closedxml.report.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.