Comments (10)
I do not know about such limitations in the number of columns. Can you send a test in which I can reproduce it?
from closedxml.report.
@b0bi79 i found it. the same issue as below. And ever the column did not tag to
"row","column","page" also could not be null or empty.
In the data for which there is a grouping (tags <>, <>, <>) there should not be null or empty lines. Blank lines must be replaced by at least a space. The used version of ClosedXML (v0.92) did not correctly process such data. I think that in the new version of ClosedXML this problem should be fixed.
from closedxml.report.
Thanks, I will check it on the new version
from closedxml.report.
I have a similar issue. I have a table which varies in number of rows but is generally 35,000 to 40,000. The number of columns is static at 10. When creating a pivot table, the maximum number of rows that will correctly translate to a pivot table is 32,895 (that was fun determining). Therefore, I not only can I not create a complete pivot table, I also cannot use LastRowUsed to define it.
I'm using v0.94.
from closedxml.report.
If this is not a limitation of MS Excel, then this may be a limitation of ClosedXML. Can you provide the problem result file?
from closedxml.report.
Certainly.
Test2.xlsx
from closedxml.report.
@mlivingstonNE please also attach the template. Thanks.
from closedxml.report.
There is no template. But here is the code from the application:
static void Main(string[] args)
{
String fileName = "DeliveryCompliace " + DateTime.Today.ToString("MMddyyyy") + ".xlsx";
String runTime = DateTime.Now.ToString("MM/dd/yyyy HH:mm");
String reportDate = DateTime.Today.ToLongDateString();
// Create Workbook
XLWorkbook wb = new XLWorkbook();
// Create Worksheet
IXLWorksheet ws = wb.Worksheets.Add("Data");
// Fill table from stored procedure
SqlConnection sqlConnection = new SqlConnection(Properties.Settings.Default.conString);
SqlCommand sqlCommand = new SqlCommand("dbo.cex_DScanCompData", sqlConnection);
sqlCommand.CommandType = CommandType.StoredProcedure;
sqlCommand.Parameters.Add("@dDate", SqlDbType.DateTime).Value = reportDate;
SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
DataTable dataTable = new DataTable();
sqlDataAdapter.Fill(dataTable);
// Insert Datatable data
IXLTable table = ws.Cell(1, 1).InsertTable(dataTable, "Data", true);
// Fix OrderTrackingID format in ws
ws.Column(5).CellsUsed().Style.NumberFormat.Format = "#.000000";
// Adjust column widths in ws
ws.Columns().AdjustToContents();
// Pivot Table
// Add new worksheet
IXLWorksheet ps = wb.Worksheets.Add("Report");
// Create pivot table
var totalRows = ws.LastRowUsed().RowNumber() - 5;
var totalColumns = ws.LastColumnUsed().ColumnNumber();
IXLPivotTable pt = ps.PivotTables.Add("PivotTable", ps.Cell(3, 1), ws.Range(1,1,totalRows,totalColumns)); // Max rows 32,895!!
pt.RowLabels.Add("TerminalName").SetCollapsed();
pt.RowLabels.Add("Driver").SetCollapsed();
pt.RowLabels.Add("ConsCompany", "Client").SetCollapsed();
pt.Values.Add("PkgCount").SetSummaryFormula(XLPivotSummary.Sum);
pt.Values.Add("DScan").SetSummaryFormula(XLPivotSummary.Sum);
pt.Values.Add("MScan").SetSummaryFormula(XLPivotSummary.Sum);
pt.Values.Add("NScan").SetSummaryFormula(XLPivotSummary.Sum);
//For testing purposes
IXLWorksheet ws3 = wb.Worksheets.Add("Test");
ws3.Cell("A1").Value = totalRows;
ws3.Cell("A2").Value = totalColumns;
// Save workbook
wb.SaveAs(@"C:\Users\CEsolutions\Documents\Test2.xlsx");
}
from closedxml.report.
@igitur I think it need to create an issue in ClosedXML?
from closedxml.report.
I will do that.
from closedxml.report.
Related Issues (20)
- HYPERLINK error: Collection was modified; enumeration operation may not execute. HOT 2
- Failed to generate a file from a template HOT 7
- How to hide a entire column in excel report? HOT 3
- MissingMethodException on new XLTemplate() HOT 2
- Merge cells with same value without grouping?
- V0.2.6 with flat tables HOT 4
- How to set different colors for the same cell font
- How do I set the Time format and value of a cell?
- Unknown identifier 'item' for {{item}} HOT 1
- Method not found: ClosedXML.Excel.IXLRange ClosedXML.Excel.IXLPivotTable.get_SourceRange() HOT 1
- Template doesn't recognize nested list
- Question : how do i get a horizontal table to grow verticaly and horizontaly
- How to define a range name when the data source includes an underscore (_)?
- in .net 8 its impossible to use ClosedXml newest version (0.102.1) with ClosedXml.Report 0.2.8 HOT 1
- Unknown identifier 'item' Issue
- One bad formula results in total report generation failure
- Slow to export HOT 1
- multi table in report
- ClosedXML to 0.102.2 HOT 3
- How can I have only one line of grouping recaps?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from closedxml.report.