Independentsoft
Home
Products
Purchase
Support
Downloads
Company
Contact
Spreadsheet .NET
>
Tutorial
> Insert Background image
The following example shows you how to insert worksheet background image.
See screenshot
.
C# example
using System; using Independentsoft.Office; using Independentsoft.Office.Spreadsheet; namespace Sample { class Program { static void Main(string[] args) { Worksheet sheet1 = new Worksheet(); sheet1.BackgroundImage = new BackgroundImage("c:\\draft.png"); Workbook book = new Workbook(); book.Sheets.Add(sheet1); book.Save("c:\\test.xlsx"); } } }
VB example
Imports System Imports Independentsoft.Office Imports Independentsoft.Office.Spreadsheet Module Module1 Sub Main(ByVal args As String()) Dim sheet1 As New Worksheet() sheet1.BackgroundImage = New BackgroundImage("c:\draft.png") Dim book As New Workbook() book.Sheets.Add(sheet1) book.Save("c:\test.xlsx") End Sub End Module