ByteScout Spreadsheet SDK - C# - Copy Worksheet - ByteScout

ByteScout Spreadsheet SDK – C# – Copy Worksheet

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Copy Worksheet

How to copy worksheet in C# with ByteScout Spreadsheet SDK

How to copy worksheet in C#

These source code samples are listed and grouped by their programming language and functions they use. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams. It can be used to copy worksheet using C#.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Spreadsheet SDK for copy worksheet below and use it in your application. 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! Enjoy writing a code with ready-to-use sample codes in C#.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

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 Sample { class Program { static void Main(string[] args) { // Open existing Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("input.xls"); // Create copy of worksheet document.Workbook.Worksheets.Copy(0, 1, "Copy of Sheet1"); // delete output file if exists already if (File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close document document.Close(); // Open document in default xls viewer Process.Start("Output.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