Learn how to copy range in C# with this source code sample. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can copy range in C#.
This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly copy range in your C# application. Just copy and paste the code into your C# application’s code and follow the instruction. Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
Trial version of ByteScout Spreadsheet SDK 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)
using System.Diagnostics; using System.IO; using Bytescout.Spreadsheet; namespace CopyRange { class Program { static void Main(string[] args) { // Open spreadsheet from file Spreadsheet document = new Spreadsheet(); document.LoadFromFile("example.xls"); // Get first worksheet Worksheet worksheet = document.Workbook.Worksheets[0]; // Select cell range Range range = worksheet.Range("A2:B8"); // Copy range to C10 cell range.CopyInto("C10"); // 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"); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: