Working with Background in ODS Files
Background in ODS Files
Background can be added to sheets in ODS files. The background can either be a colored background or graphic background. The background is not visible when the file is open but if the file is printed as PDF, the background is visible in the generated PDF. The background is also visible in the print preview dialogue.
Aspose.Cells for Python via .NET provides the ability to read the background information and add the background in ODS files.
Read Background Information from ODS file
Aspose.Cells for Python via .NET provides the OdsPageBackground class to manage background in ODS Files. The following code sample demonstrates the use of OdsPageBackground class by loading the source ODS file and reading the background information. Please see the Console Output generated by the code for reference.
Sample Code
Console Output
Background Type: Graphic
Backgorund Position: CenterCenter
Add Colored Background to ODS file
Aspose.Cells for Python via .NET provides the OdsPageBackground class to manage background in ODS Files. The following code sample demonstrates the use of OdsPageBackground.color property to add a color background to the ODS file. Please see the output ODS file generated by the code for reference.
Sample Code
Add Graphic Background to ODS file
Aspose.Cells for Python via .NET provides the OdsPageBackground class to manage background in ODS Files. The following code sample demonstrates the use of OdsPageBackground.graphic_data property to add graphic background to the ODS file. Please see the output ODS file generated by the code for reference.