ByteScout Spreadsheet SDK - C# - Add Background Image - ByteScout

ByteScout Spreadsheet SDK – C# – Add Background Image

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Add Background Image

How to add background image in C# with ByteScout Spreadsheet SDK

This code in C# shows how to add background image with this how to tutorial

With this source code sample you may quickly learn how to add background image in C#. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays and you can use it to add background image with C#.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Spreadsheet SDK for add background image below and use it in your application. In your C# project or application you may simply copy & paste the code and then run your app! Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Download free trial version of ByteScout Spreadsheet SDK from our website with this and other source code samples for C#.

Try ByteScout Spreadsheet SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System.Diagnostics; using System.Drawing; using Bytescout.Spreadsheet; namespace AddBackgroundImage { class Program { static void Main(string[] args) { // Create new spreadsheet (or open existing) Spreadsheet doc = new Spreadsheet(); doc.RegistrationName = "demo"; doc.RegistrationKey = "demo"; // Add worksheet Worksheet 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(); } } }

Try ByteScout Spreadsheet SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK page

Explore ByteScout Spreadsheet SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next