Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / productivity / Office / MS-Excel

MS-Excel

MS-Excel

Great Reads

by IvanFeng
With AutoExcel, you can quickly import and export Excel without hard coding, and embrace changes.
by Brian C Hart
A class that accepts a reference to an Excel.Worksheet and lets you use an overloaded subscript operator to cleanly and intuitively read/write the Value2 of Excel cells, and get the Excel.Range corresponding to a given cell.
by Stefan Huy
For those who badly miss a .NET like List in VBA

Latest Articles

by IvanFeng
With AutoExcel, you can quickly import and export Excel without hard coding, and embrace changes.
by Brian C Hart
A class that accepts a reference to an Excel.Worksheet and lets you use an overloaded subscript operator to cleanly and intuitively read/write the Value2 of Excel cells, and get the Excel.Range corresponding to a given cell.
by Stefan Huy
For those who badly miss a .NET like List in VBA

All Articles

Sort by Score

MS-Excel 

by Stefan Huy
For those who badly miss a .NET like List in VBA
by Glenn Lloyd
This is an alternative for "A Simple List Class for VBA Projects"
by Pasan Eeriyagama
This article focuses on a Very simple and Robust way to export Data to EXCEL
by WhiskeyBeforeWater
A nodular Singely Linked List for VBA with some basic functions
by Sachin Chandanshive
Addin Containg Useful Macros & Easily Accessible From Ribbon Menu
by Member 3471983
Add Filter Sort and Theme to a datagridview
by KumarM.NET
This tip explains the features of PowerPivot, a Business Intelligence tool provided by Microsoft. This is integrated with Office 2010 and provides capabilities to represent the data in various formats to business users.
by dietmar paul schoder
Read rows and cells from an xlsx-file: quick, dirty, effective.
by Altaf Ansari
Converting XML Data into DataTable and Exporting DataTable into Excel File
by Darren G441
Two functions to help manipulate Excel sheets with VBA by converting Column Header letters to 1 based numbers and back
by Maciej Los
This is an alternative for "Copy Rows Within Excel Sheets via VBA"
by miteleda
Copy DataGridView contents to clipboard regardless of current selection.
by Jerry Burch
Quickly create a spreadsheet from Datatable using Interop and the Clipboard
by ASP.NET Community
Here is a simplified class to create Excel file from DataTable just Pass DataTable and Preferred location on server to generate. Call the
by Rojalin Sahoo
Creating dynamic grid-view worked like an Excel sheet
by Raja.Krishnasamy
Data Driven Testing in MSTest by using Excel as data source and Named Region as table name instead of sheet name
by Robby Tendean
ExcelLibrary implementation sample to convert DataSet to Excel file in VB.NET
by Robert Hutch
Hi,another alternative is this Excel C# / VB.NET component that has limited free version that can be used in commercial applications and unlimited professional version.Here is an Excel VB.NET code how to export DataSet to Excel:Dim ef = New ExcelFile()For Each dataTable As...
by Saket Pawar
How to delete headers/certain strings in rows from your Excel file
by rj45
Directly embedding .CSS ( or strip it out ) instead of href link (Excel export part 2)
by BIUser_2011
Configure Excel dynamically in foreach loop container
by simonp_ca
An Excel template, which provides unlimited basic arithmetic worksheets (random question generator), and answer sheets as well. All printer friendly formatted. Good for kids math practice.
by Celstream
Embed Charts, not Images into Slides
by Debopam Pal
How to bring data from Entity model to Excel file using LINQ.
by Bassam Abdul-Baki
This allows you to display in Excel column names other than A, B, C or 1, 2, 3 (R1C1) format.
by Anupama Agarwal
How to do power pivot sorting in Excel 2013
by ArindamSarkar
Tips and tricks to quickly find out how to manipulate Excel using .NET Managed Code
by Dennis Wu CA
A demo that generates a simple Excel spreadsheet with subscripts and superscripts
by Anurag Gandhi
An Excel macro that generates SQL insert script that can be executed against database directly
by NewPast
Excel, Pure VBA Macro: Molecular Weight/Molecular Mass Calculator
by Jani Giannoudis
Calculate the number of whole working days between start and end with support of holidays and holiday-periods.
by Go Cova
public static int GetFullWorkingDaysBetween(DateTime firstDate, DateTime lastDate, IEnumerable holidays){ if (firstDate > lastDate)// Swap the dates if firstDate > lastDate { DateTime tempDate = firstDate; firstDate = lastDate; lastDate =...
by LukeCodes
This is a simple macro script to search and retrieve individual cells in an Excel document.
by JamesFaix
Automated build tool for ExcelDNA projects to add referenced libraries to packed ExcelDNA add-in
by Passion4Code
How to export and Excel file using ClosedXML
by rj45
Export any page to Excel automatically
by Michael Rosqvist
How to export a DataGridView to Excel.
by DiponRoy
Create a file like Excel, CSV, txt, etc. from a DataTable object using C#
by Er. Puneet Goel
Here is a quick code for how you can export the HTML table to Excel with CSS of table.
by Vishal.KumarSingh
Export Data from a Entity DataSource / GridView / Datatable in ASP.NET to Excel 2007(.xlsx) format with proper formatting and no warning messages
by Sarvesh Kumar Gupta
Export to Excel from GridView in C#
by Sarvesh Kumar Gupta
Export to Excel from GridView in C#
by Hisham Saber
This code solves the problem when exporting very large data size to Excel file.
by rj45
Export whole page to Excel with infragistics
by Kabwla.Phone
Tip: Change your loop to the following to also support derived classes:foreach (var item in controlList ){ GridView asGridView = item as GridView; if (asGridView != null) { Utilities.RenderControlInExcel(asGridView, workBook); } DetailsView asDetailsView =...
by Dan Mos
A few months ago I posted a article about exporting and formatting a datagridview to Excel.Well what about exporting a List to Excel?Sure, some may wonder but what's the point? Cause it's very easy to havelike a hidden dataGridView and when exporting one could easily add something...
by LazyCoder0
This tip describes how to generate Excel charts from data in .NET applications using Office Automation.
by JamesFaix
Get a collection of all running Excel interop Application objects (not just the active one)
by HP2M
This tip covers handling two Excel lists using Interop.
by B. Clay Shannon
The most straightforward way to add a Pivot Table to an Excel sheet based on data already on the sheet, using Excel Interop and C#
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Here we will explore the trick to verify whether Excel is installed in the client's system or not by C#.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This simple Tip will give you the Trick to convert Excel file to CSV file using Interop Services.
by Smitha_Kalakoduvath
Load data present in multiple Excel sheets to an Excel sheet or any other destination.
by Krzysiek Wiśniewski
Nice solution for easy load data from files with extensions: .csv, .xls, .xlsx
by Philippe Herremans
This tip describes a VB.NET program to implement Custom task panes in Excel 2010 and 2013 using Excel-DNA to integrate .NET into Excel.
by Brian C Hart
Code to call Excel Interop to take a Comma-Separated-Values (.CSV) file and suck it into your Excel workbook programmatically, and then Auto-Fit the resultant columns.
by Sachin Chandanshive
Read / Write data from CSV to Excel
by Kiran Chandrashekhar
This tutorial gives you a complete overview on how to insert a Chart to an Excel file through Matlab
by FLouis38
Intelligent workbook for generating time series DAX
by stormpy
Interactive analysis is a cycle analysis procedure of assumption, validation, and adjustment to achieve the fuzzy computation goal.
by veen_rp
A simple, step by step tutorial to set up an MS-Office Excel Ribbon, launch your own .NET applications from Excel and interact with the spreadsheet values.
by KumarM.NET
Leveraging the benefits of Open XML
by AspDotNetDev
This query will show you all tables and columns in a database, and it can be pasted into Excel for easy manipulation.
by Aman Bhullar
Here I am posting code, which will read through a Excel Document. This code will traverse through all sheets of Excel spread sheet, No matter what name they will have.This uses OLEDB connection to read through excel sheets.using System.Data.OleDb;protected void Page_Load(object...
by genious Developer
FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read);//1. Reading from a binary Excel file ('97-2003 format; *.xls)IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);//...//2. Reading from a OpenXml Excel file (2007 format;...
by Robby Tendean
A tool for viewing Microsoft Excel BIFF8 binary format
by Jepy
Replace the last 3 blocks of code with:String.Format("{0:x}", value)
by Alexey Shtykov
Convert column numbers to range letters and add comments
by Niyazi Yarar
Helps developer to get excel column letter or index
by Kudredin
How to use a normal Excel cell within a worksheet as a checkbox
by Shivi Gupta Lucknow
Using EP plus, an Excel file is loaded onto a Windows Form with multiple sheets as buttons aligned horizontally below the gird, to give the look and feel of an Excel sheet.
by B. Clay Shannon
How to obtain a reference to a range of Excel cells for manipulation and then do so (operate on the range)
by rj45
Parse out controls from your html page.
by rj45
You can simplify this by doing the following:/// /// Render/// /// protected override void Render(HtmlTextWriter writer){ if (Session[ExcelExport] != null && bool.Parse(Session[ExcelExport].ToString())) { ...
by Kabwla.Phone
Tip - Never use type equality because that does not support derived classes:if (item.GetType() == typeof(Image)) //this is bad, mkay.Instead use the following which does support derived classes:if (item is Image)The Microsoft prefered pattern (when you actually need the cast object)...
by W. García
VBA solution for CSV parsing problem
by rj45
Pasting excel data into an asp.net gridview
by vivektiwari97701
Datatype conversion in query (Excel query) add null column for unavailable field in destination database
by Kiran Chandrashekhar
This tutorial gives you a complete overview on how to read from an Excel file through Matlab
by adriancs
Sample code for reading and writing Excel documents using OLEDB.
by chetan virkar
Read Excel in ASP.NET
by cwfong
Get Excel cell values as string
by OriginalGriff
Reading a sheet into a database isn't difficult - it's just I keep forgetting how... :sigh: So I abstracted this from my working code so I wouldn't lose it again.
by Igor Merabishvili
A small tip how to release Excel object after using Interop
by Klaus Luedenscheidt
Alternatively, you can kill the Excel instance. I have to maintain an application which makes heavy use of Excel. I have written a wrapper for the base functionality. In the Dispose() method of the wrapper, I use the following code to ensure Excel will be released:mExcelApp.Quit(); // My...
by Duncan Edwards Jones
How to save a Silverlight Telerik grid content to Excel
by Clifford Nelson
This is a tip that has the code for selecting an Excel file and sheet for import into Microsoft Access. This includes the code required to browse for a file, and populate a ListBox with the sheets of the Excel Workbook, and the code to import an Excel spreadsheet.
by Predrag Radic
Show only visible values in RadGridView filter popup.
by Bernster
How to use Excel conditional formatting features to simulate a progress bar in an Excel worksheet
by joe_j
Export SQL table data into Excel and open the excel file on the client side.
by DrABELL
Statistical Outliers detection in Microsoft Excel worksheet using Median() and array formula
by Brian C Hart
C# code to format a certain range of Excel cells using the Format As Table button -- but from C# interop code
by Brian C Hart
You know that little "Merge and Center" button in Microsoft Excel? Here's how to 'click' it in C# with Excel Interop (and this carries over to VB etc, too).
by V5709
This tip will provide one of the ways of generating Excel files using Microsoft COM interop in MVC project.
by algor-AG
VBA : encrypted / password protected PDF for MS Office
by Nanda Kumar Chintam
Demonstration of Excel manipulations using C#
by Kiran Chandrashekhar
This tutorial gives you a complete overview on how to write to an Excel file through Matlab.
by Eric Reynolds
Learn how to easily substitute VBA with Python as Excel's scripting language with a library called ExcelPython