إدراج صورة الخلفية في Excel

إعداد خلفية الورقة في Microsoft Excel

لتعيين صورة خلفية الورقة في Microsoft Excel (على سبيل المثال ، Microsoft Excel 2019):

  1. منتخطيط الصفحة القائمة ، والعثور علىاعداد الصفحة الخيار ، ثم انقر فوقخلفية اختيار.

  2. حدد صورة لتعيين صورة خلفية الورقة.

    إعداد خلفية الورقة

ما يجب القيام به: image_بديل_نص

إعداد خلفية الورقة بالرقم Aspose.Cells

يحدد الكود أدناه صورة الخلفية باستخدام صورة من دفق.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// Create a new Workbook.
Workbook workbook = new Workbook();
// Get the first worksheet.
Worksheet sheet = workbook.getWorksheets().get(0);
// Get the image file.
File file = new File("background.jpg");
// Get the picture into the streams.
byte[] imageData = new byte[(int) file.length()];
FileInputStream fis = new FileInputStream(file);
fis.read(imageData);
// Set the background image for the sheet.
sheet.setBackgroundImage(imageData);
fis.close();
// Save the excel file
workbook.save("SBPforWorksheet.xlsx");

مقالات ذات صلة