ByteScout Spreadsheet SDK - C# - Remove Columns from Existing Spreadsheet - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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#.

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

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