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

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

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

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

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

Add rows into existing spreadsheet is easy to implement in C# if you use these source codes below. 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. It can add rows into existing spreadsheet in C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout Spreadsheet SDK. 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! Test C# sample code examples whether they respond your needs and requirements for the project.

Trial version of ByteScout Spreadsheet SDK can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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 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