Spread.Sheets Documentation
backgroundImage Method
The cell background image.
Gets or sets the background image for the cell.
Syntax
var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
var returnValue; // Type: any
returnValue = instance.backgroundImage(value);
function backgroundImage( 
   value : string
) : any;

Parameters

value
The cell background image.

Return Value

If no value is set, returns the cell background image; otherwise, returns the cell.
Example
The following examples set the background image.
var cellImage = document.getElementById("circle").src;
var rowImage = "./css/images/quarter1.png";
var colImage = document.getElementById("logo").src;
sheet.getCell(3, 3).backgroundImage(cellImage);
sheet.getCell(1, -1).backgroundImage(rowImage);
sheet.getCell(-1, 1).backgroundImage(colImage);
...
<img src="./css/images/box3.png" id="logo"/>
<img src="./css/images/greencircle.png" id="circle"/>
activeSheet.getRange(1, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backgroundImage("images/example.jpg");
activeSheet.getCell(1,1).backgroundImage("images/example.jpg");
activeSheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backgroundImage("images/example.jpg");
See Also

Reference

CellRange type
Adding a Background Image

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.