ByteScout Spreadsheet SDK - C# - CopyPaste Rows - ByteScout

ByteScout Spreadsheet SDK – C# – CopyPaste Rows

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – CopyPaste Rows

How to copypaste rows in C# using ByteScout Spreadsheet SDK

The tutorial shows how to copypaste rows in C#

The sample shows steps and algorithm of how to copypaste rows and how to make it work in your C# application. 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 copypaste rows in C#.

Fast application programming interfaces of ByteScout Spreadsheet SDK for C# plus the instruction and the code below will help you quickly learn how to copypaste rows. In your C# project or application you may simply copy & paste the code and then run your app! You can use these C# sample examples in one or many applications.

You can download free trial version of ByteScout Spreadsheet SDK from our website to see and try many others source code samples for C#.

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.Diagnostics; using System.IO; using System.Text; using Bytescout.Spreadsheet; namespace CopyPasteRows { class Program { static void Main(string[] args) { // Open spreadsheet from file Spreadsheet document = new Spreadsheet(); document.LoadFromFile(@"example.xls"); //document.LoadFromFile(@"d:\2\1\Bytescout\Spreadsheet SDK\TestCase\Formats.xls"); // Get first worksheet Worksheet worksheet = document.Workbook.Worksheets[0]; // Copy first eight rows to the 10th row worksheet.Rows.CopyAndPaste(0, 7, 9); // Delete output file if exists if (File.Exists("changed.xls")) { File.Delete("changed.xls"); } // Save document document.SaveAs("changed.xls"); // Close spreadsheet document.Close(); // Open generated XLS document in default program Process.Start("changed.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