Posted 4 September 2025, 3:30 am EST
Hi,
As I understand, you would like blank cells to appear when importing an Excel file, instead of the gray area.
If you are using the SpreadJS component directly, you are likely importing the Excel file with the
import
method. In the success callback of this method, you can add additional rows and columns so that the gray area is replaced with empty cells. Please see the attached snippet and sample:
spreadjs-react-sample.zip
spread.import(file, () => {
console.log("Imported!!");
// Add rows and columns as needed
spread.getActiveSheet().setRowCount(1000);
spread.getActiveSheet().setColumnCount(1000);
}, (err) => {
console.log(err);
});
If you are importing through the Designer component UI, you can instead use the
fileLoaded
event:
https://developer.mescius.com/spreadjs/api/designer/classes/GC.Spread.Sheets.Designer.Events#fileloaded
This event is triggered when an Excel file is imported in the Designer component, and you can set the row and column counts within the event to ensure empty cells are visible rather than the gray area, using
setRowCount
and
setColumnCount
.
References:
Regards,
Priyam