- Home
- Purchase
- Developer Tools
- BarCode Generator SDK
- BarCode Generator SDK for Javascript for Code 128
- BarCode Reader SDK
- PDF Generator SDK for Javascript
- PDF Extractor SDK
- PDF Renderer SDK
- PDF To HTML SDK
- PDF Viewer SDK
- Spreadsheet SDK
- Image To Video SDK
- Screen Video Capturing SDK
- SWF To Video and Images SDK
- Images Watermarking SDK
- Document SDK beta
- Misc Tools
- Desktop Utilities
- Download
- Support
- Company
How to change cell value in existing XLS document using Bytescout Spreadsheet
How to change data in an existing Excel (XLS) document using Bytescout Spreadsheet SDK
This source code sample demonstrates how to use Bytescout Spreadsheet SDK to change data in an existing Excel (.XLS) document and save changed file as a new one.
Download example source code: bytescoutxls_changing_data_in_existing_xls.zip (8 KB)
Source document screenshot:

Modified document screenshot (see Homer's Full Name changed)

using System;
using System.Collections.Generic;
using System.Text;
using Bytescout.Spreadsheet;
namespace Changing_data_in_existing_XLS
{
class Program
{
static void Main(string[] args)
{
// Open Spreadsheet
Spreadsheet document = new Spreadsheet("AdvancedReport.xls");
// Get Worksheet
Worksheet worksheet = document.Workbook.Worksheets[0];
// Set cell value
worksheet.Cell(1, 1).Value = "Homer Jay Simpson 2";
// Save document
document.SaveAs("AdvancedReport1.xls");
// Close Spreadsheet
document.Close();
}
}
}
Download example source code: bytescoutxls_changing_data_in_existing_xls.zip (8 KB)
Filed in:
Spreadsheet SDK
Tutorials:









