Export C# DataTable to MS Excel
Here, in this post, we are going to show you an C# code example of exporting a C# datatable data to MS Excel with headers. Step1: Add reference to Microsoft Excel Interop in your application. […]
Here, in this post, we are going to show you an C# code example of exporting a C# datatable data to MS Excel with headers. Step1: Add reference to Microsoft Excel Interop in your application. […]
We use Remove Duplicates feature of excel application to remove duplicate data in a column. Same task we can do by using VBA code. Range.RemoveDuplicates method of exvel VBA helps you to do this. We […]
This post shows an example of listing name of all files with extension, available in a folder. We need to import System.IO namespace in our program and Directory.GetFiles() method helps you to get the list […]
In this post, we will demonstrate an example of creating a directory by using C# code. For creating a directory in file system, you need to import System.IO namespace in program and CreateDirectory() method of […]
When you need to check whether a particular file exists on a specified path, you can use File.Exists(string) method of C#. This method requires full file name i.e. file name along with its extension and […]
After applying filter to excel range, rows not satisfying the filter condition get hidden and only rows satisfying the filter condition are visible. Refer our previous post for detailed Excel AutoFilter by C# information. Below […]
Here in this article, we are going to provide you an overview of applying and working with filters on Excel range. C# Syntax of Applying Filters in Excel The below code line applies filter on […]
While working with excel using C# you can require to find the last used row or column in a range. Here in this post, we are providing you the code snippets that will simplify your […]
This example demonstrates how to copy format from one excel range to another excel range. For this, you need to use PasteSpecial() method of Range with xlPasteFormats. For example, you have set the desired format […]
Here in this article, we are going to guide you to create a program in C# to automate MS Excel workbook. To do this you need to add reference to the dynamic link library of […]