On this page you will learn from code samples for programming in VB.NET.Writing of the code to add background image with spreadsheet sdk in VB.NET can be executed by programmers of any level using ByteScout Barcode Suite. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK) and you can use it to add background image with spreadsheet sdk with VB.NET.
These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Barcode Suite. Follow the instructions from scratch to work and copy the VB.NET code. Enjoy writing a code with ready-to-use sample codes in VB.NET.
You can download free trial version of ByteScout Barcode Suite from our website to see and try many others source code samples for VB.NET.
Imports System.Diagnostics Imports System.Drawing Imports System.IO Imports Bytescout.Spreadsheet Class Program Friend Shared Sub Main(args As String()) ' Create new spreadsheet (or open existing) Dim doc As New Spreadsheet() doc.RegistrationName = "demo" doc.RegistrationKey = "demo" ' Add worksheet Dim worksheet As Worksheet = doc.Worksheets.Add() ' Put background image on the worksheet worksheet.BackgroundPicture = Image.FromFile("image1.jpg") ' Save document doc.SaveAs("output.xls") ' Close spreadsheet doc.Close() ' Open generated XLS document in default application Process.Start("output.xls") doc.Dispose() End Sub End Class