We are facing a serious data mismatch issue when converting an Excel workbook (containing a PivotTable) to HTML using Aspose.Cells for Node.js.
The Excel workbook is generated programmatically using Aspose. The PivotTable inside the “PivotTable” sheet is correct when viewed in Excel.
However, after converting the workbook to HTML using HtmlSaveOptions, the PivotTable output differs from what is shown in Excel.
Code Used (for HTML conversion):
const tempFile = ‘pivot_only.html’;
saveWorkbookAsHtml(workBook, tempFile);
function saveWorkbookAsHtml(workBook, fileName) {
const sheets = workBook.getWorksheets();
for (let i = 0; i < sheets.getCount(); i++) {
const sheet = sheets.get(i);
if (sheet.getName() !== 'PivotTable') {
sheet.setVisible(false);
}
}
const saveOptions = new aspose.cells.HtmlSaveOptions();
saveOptions.setExportActiveWorksheetOnly(true);
saveOptions.setPresentationPreference(true);
saveOptions.setExportGridLines(true);
workBook.save(fileName, saveOptions);
}
Issue Details:
There is a clear data mismatch between the Excel PivotTable and the HTML Pivot generated by Aspose.
1. Missing Pivot Value in HTML
In Excel, the C column contains the value “Jan”, but in the HTML output this value is missing.
It appears that the cell is shifted or misaligned in the HTML rendering.
2. Incorrect Random Value Added in HTML
In the HTML output, a random date-like value — <1900-01-01 — is getting added, which does not exist in the Excel Pivot at all.
These issues indicate a rendering problem with how Aspose exports PivotTables to HTML.
Attachments:
(We will attach screenshots showing the Excel Pivot vs HTML Pivot.)
Screenshot 2025-12-03 at 8.59.30 PM.png (640.7 KB)
Screenshot 2025-12-03 at 8.59.51 PM.png (60.8 KB)
Screenshot 2025-12-03 at 9.01.19 PM.png (614.5 KB)
Request:
Please investigate why:
- Pivot values (e.g., “Jan” in column C) are missing in HTML,
- Cells appear shifted in the HTML output, and
- An incorrect value
<1900-01-01is being added.
We need the HTML Pivot to match the Excel Pivot exactly in terms of data, positioning, and values.