ByteScout Barcode Suite - C# - Add images advanced with spreadsheet sdk - ByteScout

ByteScout Barcode Suite – C# – Add images advanced with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Add images advanced with spreadsheet sdk

How to add images advanced with spreadsheet sdk in C# using ByteScout Barcode Suite

Learn to code in C# to add images advanced with spreadsheet sdk with this step-by-step tutorial

ByteScout simple and easy to understand tutorials are planned to describe the code for both C# beginners and advanced programmers. ByteScout Barcode Suite: the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can add images advanced with spreadsheet sdk in C#.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Barcode Suite. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample codes in C#.

Our website gives trial version of ByteScout Barcode Suite for free. It also includes documentation and source code samples.

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.Diagnostics; using System.IO; using System.Text; using Bytescout.Spreadsheet; using Bytescout.Spreadsheet.MSODrawing; namespace AddImages { class Program { static void Main(string[] args) { // Create spreadsheet Spreadsheet doc = new Spreadsheet(); // Add worksheet Worksheet worksheet = doc.Worksheets.Add(); // Put an image to "C3" cell PictureShape shape = worksheet.Pictures.Add(2, 2, "image1.jpg"); // Make the picture "floating". It will be not moved if you move or resize the "C3" cell shape.PlacementType = Placement.FreeFloating; // Make the picture brighter shape.Brightness = 0.8f; // Put second image to "K11" cell shape = worksheet.Pictures.Add(10, 10, "image2.jpg"); // Make the picture bound to the cell. It will be moved alonf with the "K11" cell shape.PlacementType = Placement.Move; // Crop 10% from left and right side of the image shape.CropFromLeft = 0.1f; shape.CropFromRight = 0.1f; // Delete output file if exists if (File.Exists("output.xls")) { File.Delete("output.xls"); } // Save document doc.SaveAs("output.xls"); // Close spreadsheet doc.Close(); // Open generated XLS document in default application Process.Start("output.xls"); doc.Dispose(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite 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 Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next