Infoga bakgrundsbild i Excel

Hur man ställer in bladbakgrund i Microsoft Excel

För att ange ett kalkylblads bakgrundsbild i Microsoft Excel (t.ex. Microsoft Excel 2019):

  1. Från menyn Sidlayout, hitta alternativet Sidlayout och klicka sedan på alternativet Bakgrund.

  2. Välj en bild för att sätta kalkylbladets bakgrundsbild.

    Ange en ark-bakgrund

todo:image_alt_text

Hur man sätter sidbakgrund med Aspose.Cells för Python Excel Library

Koden nedan ställer in en bakgrundsbild med en bild från en ström.

from aspose.cells import SaveFormat, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Create a new Workbook.
workbook = Workbook()
# Get the first worksheet.
sheet = workbook.worksheets[0]
# Set the background image for the worksheet.
sheet.background_image = open("background.jpg", "rb").read()
# Save the Excel file
workbook.save("outputBackImageSheet.xlsx")
# Save the HTML file
workbook.save("outputBackImageSheet.html", SaveFormat.HTML)