إدراج صورة خلفية إلى إكسل

تعيين خلفية الورقة في Microsoft Excel

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

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

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

    تعيين خلفية لورقة

todo:image_alt_text

تعيين خلفية الورقة باستخدام 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");

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