ByteScout Spreadsheet SDK - C# - Select Active Worksheet - ByteScout

ByteScout Spreadsheet SDK – C# – Select Active Worksheet

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Select Active Worksheet

How to select active worksheet in C# and ByteScout Spreadsheet SDK

Tutorial on how to select active worksheet in C#

The documentation is designed to help you to implement the features on your side. ByteScout Spreadsheet SDK can select active worksheet. It can be used from C#. 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.

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 select active worksheet below and use it in your application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Enjoy writing a code with ready-to-use sample C# codes.

Our website provides trial version of ByteScout Spreadsheet SDK for free. It also includes documentation and source code samples.

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.Text; using Bytescout.Spreadsheet; using Bytescout.Spreadsheet.Constants; using System.Diagnostics; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Add new worksheets Worksheet worksheet1 = document.Workbook.Worksheets.Add("Worksheet1"); Worksheet worksheet2 = document.Workbook.Worksheets.Add("Worksheet2"); Worksheet worksheet3 = document.Workbook.Worksheets.Add("Worksheet3"); // Activate worksheet2 worksheet2.Active = true; // delete output file if exists already if (File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close Spreadsheet document.Close(); // open generated XLS document in default program Process.Start("Output.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