您好,请参考:
- IWorkbook wb = fpSpread1.AsWorkbook();
- var cellrange = fpSpread1.ActiveSheet.GetSelection(0);
- if (cellrange != null)
- {
- var cellref = new Reference(cellrange.Row,
- cellrange.Column,
- cellrange.Row + cellrange.RowCount - 1,
- cellrange.Column + cellrange.ColumnCount - 1);
- FormatCells fcd = new FormatCells(wb.ActiveSheet, cellref, FormatCells.FormatCellsTab.Number);
- fcd.ShowDialog();
- }
复制代码 |