ExcelScript.Image interface
Représente une image dans la feuille de calcul. Pour obtenir l’objet correspondant Shape , utilisez Image.getShape.
Remarques
Exemples
/**
* 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éthode
| get |
Renvoie le format de l’image. |
| get |
Spécifie l’identificateur de forme de l’objet image. |
| get |
Retourne l’objet |
Détails de la méthode
getFormat()
getId()
Spécifie l’identificateur de forme de l’objet image.
getId(): string;
Retourne
string