您好,
背景图是SpreadJS特有的,Excel不支持背景图片的功能,所以无法导出。
如果您想要导出图片可以直接添加浮动图片进行导出,不过这就不是背景图的形式了。
示例代码:
var base64Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAKBJREFUOE+l0cENwjAMBdCM0BEYhZG6AjdvwQhMUvXQI0KcKo6IY2/9v0qQnVilFoenJF+2q6RJRP7ihhFuGOGGO851Zg4/9PCGi8oOD+iAzQM8c7bRRTX9pStMmbnGd1Nhwz2vbOD+ATcwteagjPBSZuAVTmBqzUHhnTnkA2wkPmJT2wRKGbLk1avZHUAcwldv/n/hhhFuGOGGEW54nKQVV2qyDejeW7YAAAAASUVORK5CYII=';
var picture = sheet.pictures.add("f2", base64Image, 50, 50, 100, 100); |