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

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

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