您好,以下是一个简单的代码示例:
- let sheet = spread.getActiveSheet();
- let { x, y, height, width } = sheet.getCellRect(10, 1);
- let rowHeaderWidth = sheet.getColumnWidth(
- 0,
- GC.Spread.Sheets.SheetArea.rowHeader
- );
- let colHeaderHeight = sheet.getRowHeight(
- 0,
- GC.Spread.Sheets.SheetArea.colHeader
- );
- sheet.pictures.add(
- "p1",
- "../v16/picture/Calories.png",
- x - rowHeaderWidth,
- y - colHeaderHeight,
- width,
- height
- );
复制代码
|