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.

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 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"); } } }

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