When converting an Excel workbook with a pivot table to HTML using Aspose.Cells for Node.js via Java, an unexpected blank column is appearing after the pivot table in the generated HTML output.
Environment
Library: Aspose.Cells for Node.js via Java
Platform: Node.js
Description
I am using Aspose.Cells to convert an Excel file containing a pivot table to HTML format. The pivot table in the original Excel file is positioned starting at cell B3 (after one entire row and two entire columns). However, when the workbook is exported to HTML using HtmlSaveOptions, an extra blank column is being added after the pivot table, which is not present in the original Excel file.
Expected Behavior
The HTML output should match the Excel layout exactly, with the pivot table starting at cell B3 and no additional blank columns appearing after the table content.
Actual Behavior
An extra blank column is visible after the pivot table in the generated HTML file, causing layout inconsistencies.
I have tested your scenario using Aspose.Cells for Java 26.1, there is no extra blank column appears after the pivot table.
I have attached it here for your reference. output.zip (2.4 KB)
@Eric.wang I checked this in 26.1 as well—it’s still happening.
Note :: Issue wont reproduce on local machine, but it consistently reproduces in QA and Prod environments.
To rule out whether the behavior originates from the HTML conversion process itself, could you please help verify the following:
Temporarily disable pivot refresh and formula recalculation, for example:
comment out pivot.refreshData()
comment out pivot.calculateData()
comment out workBook.calculateFormula()
try {
// Aspose version
LOGGER.info(
'Aspose version:',
aspose.cells.CellsHelper.getVersion()
);
// Node.js version
LOGGER.info(`Node.js version: ${process.version}`);
// OS details
LOGGER.info(`OS: ${os.type()} ${os.release()} ${os.arch()}`);
// Aspose Cells version
LOGGER.info(
`Aspose Cells version: ${aspose.cells.CellsHelper.getVersion()}`
);
// Java version
const { execSync } = require('child_process');
try {
const javaVersion = execSync('java -version 2>&1', {
encoding: 'utf-8'
});
LOGGER.info(`Java version:\n${javaVersion}`);
} catch (error) {
LOGGER.warn('Java is not installed or not in PATH');
}
workbook = new aspose.cells.Workbook(tempExcelFile);
LOGGER.info(
`[processReportWithAspose] Aspose Workbook loaded | request_id=${request_id}`
);
} catch (wbErr) {
LOGGER.error(
`[processReportWithAspose] Failed to load workbook | request_id=${request_id}`,
wbErr
);
return null;
}
Output
Node.js version : v20.19.4
OS : Linux 6.1.147-172.266.amzn2023.aarch64 arm64
Aspose Cells version: 26.1.0
Java version :
openjdk version "17.0.18" 2026-01-20
OpenJDK Runtime Environment (build 17.0.18+8-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.18+8-Debian-1deb12u1, mixed mode, sharing)
Thank you for sharing the QA/Production environment details. We will work on setting up the environment to evaluate and test the issue. We will get back to you soon.
We have tested your case with the similar environment, unfortunately, we cannot reproduce the issue yet. It is hard for us to guess the possible reason for such kind of strange issue too. Would you please compare your locale machine with the QA and Prod to see whether there are some possible differences that may cause issue? Such as the for those info(OS, JDK…) you provided?
And please call Cells.getMaxDisplayRange() before and after the saving process and output the result so we can check whether the range needs to be output has changed.