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 color 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 provides the ability to read the background information and add background in ODS files.
Read Background Information from OSD file
Aspose.Cells 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: CENTER_CENTER
Add Colored Background to ODS file
Aspose.Cells 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 provides the ODSPageBackground class to manage background in ODS Files. The following code sample demonstrates the use of ODSPageBackground.GraphicData property to add graphic background to the ODS file. Please see the output ODS file generated by the code for reference.
Sample Code