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

ByteScout Spreadsheet SDK – C# – Add Image to Spreadsheet

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

How to add image to spreadsheet in C# using ByteScout Spreadsheet SDK

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

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. Want to add image to spreadsheet in your C# app? ByteScout Spreadsheet SDK is designed for it. ByteScout Spreadsheet SDK is the SDK to create, read, modify and calculate spreadsheets. Formula calculations are supported, import and export to and from JSON, CSV, XML, databases, arrays.

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 image to spreadsheet below and use it in your application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. You can use these C# sample examples in one or many applications.

Trial version of ByteScout Spreadsheet SDK is available for free. Source code samples are included to help you with your C# app.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.IO; using Bytescout.Spreadsheet; namespace CSharp { class Program { static void Main(string[] args) { try { // create new Spreadsheet object Spreadsheet spreadsheet = new Spreadsheet(); // add new worksheet Worksheet sheet = spreadsheet.Workbook.Worksheets.Add("Sample"); // add a picture to worksheet sheet.Pictures.Add("image.jpg", 100, 100); sheet.Cell("A1").ValueAsHTML = "<b>Image from</b> from <i>Image.jpg</i>"; if(File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save it as XLS spreadsheet.SaveAs("Output.xls"); // close the document spreadsheet.Close(); // open output XLS Process.Start("Output.xls"); } catch(Exception e){ Console.WriteLine("CAN NOT EXECUTE: " + e.ToString()); Console.WriteLine("\nPress any key to exit"); Console.ReadKey(); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next