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.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training


Get Your Free API Key

Explore Web API Documentation