Inserire un immagine di sfondo in Excel

Impostare lo sfondo del foglio in Microsoft Excel

Impostare un’immagine di sfondo di un foglio in Microsoft Excel (ad esempio, Microsoft Excel 2019):

  1. Dal menu Layout di pagina, individuare l’opzione Imposta pagina e fare clic sull’opzione Sfondo.

  2. Seleziona un’immagine da impostare come sfondo del foglio.

    Impostazione di uno sfondo del foglio

todo:image_alt_text

Impostare lo sfondo del foglio con Aspose.Cells

Il codice di seguito imposta un’immagine di sfondo utilizzando un’immagine da un flusso.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Create a new Workbook.
Workbook workbook = new Workbook();
// Get the first worksheet.
Worksheet sheet = workbook.Worksheets[0];
// Set the background image for the worksheet.
sheet.BackgroundImage = File.ReadAllBytes("background.jpg");
// Save the Excel file
workbook.Save("outputBackImageSheet.xlsx");
// Save the HTML file
workbook.Save("outputBackImageSheet.html", SaveFormat.Html);

Articoli correlati