ByteScout Spreadsheet SDK - C# - Remove Columns from Existing Spreadsheet - ByteScout

ByteScout Spreadsheet SDK – C# – Remove Columns from Existing Spreadsheet

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Remove Columns from Existing Spreadsheet

How to remove columns from existing spreadsheet in C# and ByteScout Spreadsheet SDK

The tutorial below will demonstrate how to remove columns from existing spreadsheet in C#

Remove columns from existing spreadsheet is easy to implement in C# if you use these source codes below. Want to remove columns from existing spreadsheet in your C# app? ByteScout Spreadsheet SDK is designed for it. 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.

This rich sample source code in C# for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to remove columns from existing spreadsheet. In your C# project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample codes in C#.

Free trial version of ByteScout Spreadsheet SDK is available for download from our website. Get it to try other source code samples for C#.

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.IO; using System.Diagnostics; namespace Removing_columns_from_existing_XLS { class Program { static void Main(string[] args) { // Open Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("AdvancedReport.xls"); // Get Worksheet Worksheet worksheet = document.Workbook.Worksheets[0]; // Remove Column worksheet.Columns.Delete(1, 1); // 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 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