ByteScout Spreadsheet SDK - C# - Add Image Into Existing Spreadsheet - ByteScout

ByteScout Spreadsheet SDK – C# – Add Image Into Existing Spreadsheet

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

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

The tutorial shows how to add image into existing spreadsheet in C#

The documentation is designed to help you to implement the features on your side. What is ByteScout Spreadsheet SDK? It is the SDK that can write and read, modify and calculate Excel and CSV spreadsheets. Most popular formulas are supported. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can help you to add image into existing spreadsheet in your C# application.

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 into existing 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. Use of ByteScout Spreadsheet SDK in C# is also explained in the documentation included along with the product.

Free trial version of ByteScout Spreadsheet SDK is available on our website. Documentation and source code samples are included.

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

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(); spreadsheet.LoadFromFile("AdvancedReport.xls"); // add new worksheet Worksheet sheet = spreadsheet.Workbook.Worksheets[0]; // get AdvancedReport worksheet // add a picture to worksheet sheet.Pictures.Add("image.jpg", 100, 100); 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(); } } } }

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