Home

Bytescout.XLS for .NET
Screenshots

Click to view sample
Click to view sample
Click to view sample
Click to view sample
Click to view sample
Click to view sample
Click to view sample Click to view sample

Bytescout.XLS library for .NET

Download Free Trial Buy Now More Information

How to rename a worksheet in existing spreadsheet (Excel XLS) using Bytescout.XLS library

This source code sample demonstrates how to rename workshett in existing XLS document file using Bytescout.XLS library for .NET

Download example source code: bytescoutxls_rename_worksheet.zip (8 KB)

Screenshot of the spreadsheet with renamed worksheet (first worksheet was renamed from "Sheet1" into "Collected Data Sheet"):

Renamed worksheet in existing XLS spreadshett

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using Bytescout.XLS;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
// Create new XLSDocument
XLSDocument document = new XLSDocument("Data.xls");

// Get worksheet by name
Worksheet worksheet = document.WorkBook.Worksheets.ByName("Sheet1");

// Set new worksheet name
worksheet.Name = "Collected Data Sheet";

// Save document
document.SaveAs("RenamedData.xls");

// Close document
document.Close();

// open generated XLS document in default program
Process.Start("RenamedData.xls");
}
}
}

Download example source code: bytescoutxls_rename_worksheet.zip (8 KB)

Download Free Trial Buy Now More Information

Documentation online: view (separate window)

First steps tutorials:

Advanced Examples:
Products  |  Download  |  Purchase  |  Support  |  Contacts  |  Testimonials |  

ByteScout, 2003-2008. All other company and product names may be trademarks of their respective companies. Privacy Statement