ExcelScript.Image interface
Representa uma imagem na folha de cálculo. Para obter o objeto correspondente Shape , utilize Image.getShape.
Comentários
Exemplos
/**
* This script transfers an image from one worksheet to another.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the worksheet with the image on it.
const firstWorksheet = workbook.getWorksheet("FirstSheet");
// Get the first image from the worksheet.
// If a script added the image, you could add a name to make it easier to find.
let image: ExcelScript.Image;
firstWorksheet.getShapes().forEach((shape, index) => {
if (shape.getType() === ExcelScript.ShapeType.image) {
image = shape.getImage();
return;
}
});
// Copy the image to another worksheet.
image.getShape().copyTo("SecondSheet");
}
Métodos
| get |
Retorna o formato da imagem. |
| get |
Especifica o identificador da forma para o objeto de imagem. |
| get |
Devolve o |
Detalhes do método
getFormat()
getId()
Especifica o identificador da forma para o objeto de imagem.
getId(): string;
Retornos
string