ByteScout Barcode Suite - C# - Add rows into existing spreadsheet with spreadsheet sdk - ByteScout

ByteScout Barcode Suite – C# – Add rows into existing spreadsheet with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Add rows into existing spreadsheet with spreadsheet sdk

How to add rows into existing spreadsheet with spreadsheet sdk in C# and ByteScout Barcode Suite

If you want to learn more then this tutorial will show how to add rows into existing spreadsheet with spreadsheet sdk in C#

The sample shows instructions and algorithm of how to add rows into existing spreadsheet with spreadsheet sdk and how to make it run in your C# application. ByteScout Barcode Suite is 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 be applied to add rows into existing spreadsheet with spreadsheet sdk using C#.

The following code snippet for ByteScout Barcode Suite works best when you need to quickly add rows into existing spreadsheet with spreadsheet sdk in your C# application. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. If you want to use these C# sample examples in one or many applications then they can be used easily.

Trial version of ByteScout Barcode Suite 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 Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace Adding_rows_to_existing_XLS { class Program { static void Main(string[] args) { // Open Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("AdvancedReport.xls"); // Get Worksheet Worksheet worksheet = document.Workbook.Worksheets[0]; // Add new row worksheet.Rows.Insert(6, 1); // Set values worksheet.Rows[6][0].Value = "New Name"; worksheet.Rows[6][1].Value = "New Full Name"; // delete output file if exists already if (File.Exists("AdvancedReport_Modified.xls")){ File.Delete("AdvancedReport_Modified.xls"); } // Save document document.SaveAs("AdvancedReport_Modified.xls"); // Close Spreadsheet document.Close(); // open in default spreadsheets viewer/editor Process.Start("AdvancedReport_Modified.xls"); } } }

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