Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Table of Contents
To add a new row:
The editor will add a new row at the selected location.

How it works?
The Add Row above and Add Row below are handled by JSF backend bean WorksheetView. The source code of the respective methods is as follows:
public void addRowAbove() {
try {
getAsposeWorksheet().getCells().insertRows(currentRowId, 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not add row", cx.getMessage());
return;
}
purge();
reloadRowHeight(currentRowId);
} public void addRowBelow() {
if (getCurrentRowId() < 0) {
msg.sendMessage("No cell selected", null);
return;
}
int newRowId = currentRowId + 1;
try {
getAsposeWorksheet().getCells().insertRows(newRowId, 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not add row", cx.getMessage());
return;
}
purge();
reloadRowHeight(newRowId);
}To add a new column:
The editor will add a new column at the selected location.

How it works?
The Add Column Before and Add Column After are handled by JSF backend bean WorksheetView. The source code of the respective methods is as follows:
public void addColumnBefore() {
try {
getAsposeWorksheet().getCells().insertColumns(getCurrentColumnId(), 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not add column", cx.getMessage());
return;
}
reloadColumnWidth(currentColumnId);
purge();
} public void addColumnAfter() {
int newColumnId = currentColumnId + 1;
try {
getAsposeWorksheet().getCells().insertColumns(newColumnId, 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not add column", cx.getMessage());
return;
}
reloadColumnWidth(newColumnId);
purge();
}To delete a row:
The editor will delete the row which includes the selected cell.

How it works?
The Delete Row button is handled by JSF backend bean WorksheetView using method WorksheetView.deleteRow:
public void deleteRow() {
try {
getAsposeWorksheet().getCells().deleteRows(currentRowId, 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not delete row", cx.getMessage());
return;
}
cells.getRows(workbook.getCurrent()).remove(currentRowId);
getRowHeight().remove(currentRowId);
purge();
}To delete a column:
The editor will delete the column which includes the selected cell.

How it works?
The Delete Column button is handled by JSF backend bean WorksheetView using method WorksheetView.deleteColumn:
public void deleteColumn() {
try {
getAsposeWorksheet().getCells().deleteColumns(currentColumnId, 1, true);
} catch (com.aspose.cells.CellsException cx) {
msg.sendMessage("Could not delete column", cx.getMessage());
return;
}
cells.getColumns(workbook.getCurrent()).remove(currentColumnId);
getRowHeight().remove(currentColumnId);
purge();
}To change width of a column:
The editor will change the width of column.
How to change row height?
To change height of a row:
The editor will change the height of row.
How it works?
When the user submit the value of width and height, these values are handled on server-side by setCurrentRowHeight and setCurrentColumnWidth methods of JSF backend bean WorksheetView.
public void setCurrentRowHeight(int height) {
if (!isLoaded()) {
return;
}
getAsposeWorksheet().getCells().setRowHeightPixel(currentRowId, height);
reloadRowHeight(currentRowId);
RequestContext.getCurrentInstance().update("sheet");
} public void setCurrentColumnWidth(int width) {
if (!isLoaded()) {
return;
}
getAsposeWorksheet().getCells().setColumnWidthPixel(currentColumnId, width);
reloadColumnWidth(currentColumnId);
RequestContext.getCurrentInstance().update("sheet");
}To add a new cell:
The editor will add a new cell at the selected location. The adjacent cells will be automatically shifted either horizontally or vertically to create space for the new one.
How it works?
The Shift Cells Right and Shift Cells Down are handled by JSF backend bean WorksheetView. The source code of the respective methods is as follows:
public void addCellShiftRight() {
if (!isLoaded()) {
return;
}
com.aspose.cells.CellArea a = new com.aspose.cells.CellArea();
a.StartColumn = a.EndColumn = currentColumnId;
a.StartRow = a.EndRow = currentRowId;
getAsposeWorksheet().getCells().insertRange(a, com.aspose.cells.ShiftType.RIGHT);
purge();
} public void addCellShiftDown() {
if (!isLoaded()) {
return;
}
com.aspose.cells.CellArea a = new com.aspose.cells.CellArea();
a.StartColumn = a.EndColumn = currentColumnId;
a.StartRow = a.EndRow = currentRowId;
getAsposeWorksheet().getCells().insertRange(a, com.aspose.cells.ShiftType.DOWN);
purge();
}Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.