Click here to Skip to main content
15,884,962 members
Everything / Productivity Apps and Services / Microsoft Office / Microsoft Excel

Microsoft Excel

MS-Excel

Great Reads

by Alex Pumpet
A simple program for comparing table data from two sources - SQL databases, Excel, CSV or XML-files
by yuvalsol
Create professional-looking Excels (Filters, Charts, Pivot Tables) with EPPlus
by William Hey
Classical number theories
by Bert O Neill
Query Hadoop using Microsoft oriented technologies (C#, SSIS, SQL Server, Excel etc.)

Latest Articles

by Erik Drent
A simple POCO mapper for EPPlus
by W. García
VBA solution for CSV parsing problem
by Gustav Brock
Format amounts in VBA using the Indian number format for currency and amounts
by IvanFeng
With AutoExcel, you can quickly import and export Excel without hard coding, and embrace changes.

All Articles

Sort by Score

Microsoft Excel 

20 Mar 2018 by Alex Pumpet
A simple program for comparing table data from two sources - SQL databases, Excel, CSV or XML-files
23 May 2018 by yuvalsol
Create professional-looking Excels (Filters, Charts, Pivot Tables) with EPPlus
29 Dec 2015 by Bert O Neill
Query Hadoop using Microsoft oriented technologies (C#, SSIS, SQL Server, Excel etc.)
31 May 2010 by Kunal Chowdhury «IN»
Silverlight 4 has the feature to talk with Excel or any other application using the COM API. In this article, I will guide you to understand this feature step-by-step.
3 Jan 2013 by WebMaster
I guess you can do by this way: At server-side, you define some web services.At Android application, you define servie that run in background, and invoke to those web servies in a interval you defined before.To invoke web services from Android application, you can use open source lib named...
25 Jun 2014 by Shenwei Liu
Convert a generic list to an Excel byte array using Open XML SDK and dynamically create an Excel file for data distributions from an ASP.NET MVC website
21 Jan 2015 by Syed Umar Anis
ExcelXMLExport is a Microsoft Excel 2010 / 2013 Add-in that generates XML data from Excel sheet.
12 Apr 2016 by bradyguy
An end to end view of how to integrate Jira REST API's with Excel.
17 Aug 2012 by Clifford Nelson
A framework for scanning a worksheet for headers, reading and validating data, providing feedback to the user, and displaying the data in a form with the results.
30 Aug 2017 by simonp_ca
Use Excel worksheet's cells as pixels to render real image (for fun and experiment)
26 Nov 2016 by JamesFaix
Get a collection of all running Excel interop Application objects (not just the active one)
21 Feb 2012 by Christian Leutloff
Comparison of the Excel Object Library and the native C# library NPOI to extract information from .xls files.
31 May 2016 by William Hey
Semi-Prime Ordered Sequences (Part 2) is the follow-on to “Exploring Computational Number Theory (Part 1)” and describes a process for ordering the semi-prime base sequences.
25 Nov 2017 by Daniel Carvalho Liedke
Project to generate Excel Spreadsheet from DataSet with auto size (AutoFit) columns, auto-filter, alternating light blue background color with Open XML using ASP.NET MVC
18 Nov 2023 by Erik Drent
A simple POCO mapper for EPPlus
13 Jun 2013 by Adam Tibi
Exposing .NET functions to be consumed as Excel functions, otherwise known in Excel as "User Defined Functions" . Those .NET exposed functions can be easily used from Excel's cells. This article presents two ways to achieve this and the pros and cons of each.
5 Jun 2014 by Shenwei Liu
C# class that populates a generic list with data retrieved from Excel data file
12 Jun 2017 by LukeCodes
This is a simple macro script to search and retrieve individual cells in an Excel document.
26 Aug 2011 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
24 Sep 2012 by Maciej Los
Have a look here:Fill/Retrieve data from PDF Form Fields using VB.NET and Excel File[^]Read Pdf Using Csharp[^]Shareware software: http://www.softpedia.com/get/Office-tools/PDF/PDF-to-Excel-Converter.shtml[^]Hand...
16 Apr 2013 by Muhammed Anseer K K
Creating a metro style application with WCF
23 Jul 2013 by Christian Del Bianco
Automate the process of set value to Excel cells, assigning a cell name that matches the query result column name, leaving the end user the possibility to change the layout template.
31 Oct 2013 by Debopam Pal
How to bring data from Entity model to Excel file using LINQ.
11 May 2015 by markgwatts
Converting Sudoku Solver from Excel to C#
16 Jan 2016 by Glenn Lloyd
This is an alternative for "A Simple List Class for VBA Projects"
7 Sep 2018 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.
29 Jun 2010 by Izhar Lotem
Filter and export to Excel ListView data using MVVM standards.
12 Jul 2011 by Sergey Alexandrovich Kryukov
In means this: http://msdn.microsoft.com/en-us/library/system.reflection.missing.aspx[^].Missing represents a parameter which is used by default if default parameter feature is used. Default parameters were introduced in C# v.4, but the mechanism itself already existed before. If the...
30 Jan 2013 by Mantu Singh
Use the following code as the Excel 2007 vcersion files are Excel 12.0Dim connectionString As String =[String].Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1;""", filepath)Best of luck!!
15 Jan 2016 by Dave Kreskowiak
OK, first and foremost, Microsoft does not support and actively discourages using Office Interop in non-user applications, i.e.: Services and web applications.Office was not written to support a non-interactive environment. You can have problems using Office Interop in your...
20 Feb 2019 by JL Doty
App to monitor a system's sensors, with added features
14 Aug 2019 by essentialSQL
In this blog post, you will learn about stored procedures
19 Jan 2020 by CPallini
Quote: Is there any algorithm to calculate the cost difference between a given price and an unknown price It is simple and O(1). The algorithm result is always 'unknown'.
12 Jul 2011 by DanHodgson88
Found it! For anyone who would like it:App.DisplayAlerts = false;workbook.save();workbook.Close();App.DisplaAlerts = True;App.Quit();
28 Dec 2011 by Abhinav S
TryHow to export to Excel from vb.net code. [^]Export to Excel using VB.Net[^]
12 Apr 2012 by Fredrik Bornander
Assuming a spread sheet when column A holds your A values, C holds your C values and B holds the formula (starting at row two), then the formula for row 2 can be written as;=IF(C2
19 Jun 2012 by Maciej Los
Have a look at: MSDN[^].
9 Jul 2012 by Volynsky Alex
Try to use something: Excel::_ApplicationPtr XL; .... Excel::_WorkbookPtr workbook = XL->Workbooks->Add(Excel::xlWorksheet); Excel::_WorksheetPtr worksheet = XL->ActiveSheet; worksheet->Name = "last page"; worksheet = XL->Worksheets->Add(); // adding...
10 Dec 2012 by Prasad_Kulkarni
Refer:Article: Fast Exporting from DataSet to Excel[^]Similar answer: How to Export Value from Data Set to Excel Sheet[^]Lot more similar stuff on CodeProject[^]In short:for (int col = 0; col
12 Jan 2013 by «_Superman_»
You have to download and install the Excel SDK - http://msdn.microsoft.com/en-us/library/office/bb687883.aspx[^]The above link will also help you find documentation.
26 Feb 2013 by Kuthuparakkal
Ona 64bit OS;1) If 32bit is installed "ACEOLEDB.DLL" should exists here : C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL2) If 64bit is installed "ACEOLEDB.DLL" should exists here : C:\Program Files\Common Files\Microsoft...
24 Apr 2013 by Sergey Alexandrovich Kryukov
They are really different. It's no wonder that different expressions give different results, is it? :-)As different expressions, they are both "right", why not? In Excel, '^' means "power", in C#, it means "exclusive OR" (XOR). Please...
8 Jan 2014 by Pete O'Hanlon
Well, at the moment you are picking up your columns by directly allocating them as array arguments. If you are wanting to pick individual items, you're going to need to do something a little bit different - here's an example that you could adapt as you see fit:public ActionResult...
19 May 2014 by Mehdi Gholam
Excel is a complex file format, you need to open it with something that understands it's structure (it is not a text file).Try using this : http://epplus.codeplex.com/[^]
13 Aug 2014 by Sergey Alexandrovich Kryukov
It is not related to WPF, as I already noted in my comment to the question. Three most usual approaches are: 1) using Office interop assembly, 2) using Open XML SDK, 3) using 3rd-party products, mostly based on Open XML standard and directly forming the file of .xslx data structure.I would...
9 Nov 2015 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.
22 May 2017 by Bassam Abdul-Baki
This allows you to display in Excel column names other than A, B, C or 1, 2, 3 (R1C1) format.
6 May 2018 by Sam__Khan
Automated Craigslist parsing with Selenium using Node.js
21 Dec 2018 by Member 3471983
Add Filter Sort and Theme to a datagridview
30 Jul 2019 by Lee P Richardson
Fighting File Downloads and Dinosaurs with NSwag via ASP.NET Boilerplate
12 May 2020 by Maciej Los
Replace this: DateTime y = Convert.ToDateTime(tanggal); with this: DateTime y = DateTime.ParseExact(tanggal, "dd/MM/yy H:mm", CultureInfo.InvariantCulture); Note: I'm not sure what value corresponds to month and day. Please, change it...
14 Mar 2011 by fjdiewornncalwe
Google, my friend. Use Google...80,000 results - There must be something good in here.
23 Mar 2011 by OriginalGriff
Access provides autonumber: it is called an "autoNumber" field, surprise, surprise. Also unsurprisingly, it is numeric only...I would keep the Voucher code separate: The Voucher number is the Autonumber field, the Date field is the TodayDate, and build the voucher code from that using...
14 Jul 2011 by OriginalGriff
OK, the code you have posted doesn't look too bad (apart from the SQL Injection Attack caveat I mentioned).So, first things first.Have you isolated that code, and tried it without the rest of your program, just to eliminate any other factors?How many rows do you expect it to return? How...
4 Dec 2011 by Wonde Tadesse
Here are lists of Connection strings for Excel[^]
22 Jan 2012 by Dalek Dave
This[^] could be the answer to your problems.
2 May 2012 by Maciej Los
Moved from commentIt's very interesting... I'm working with multiple files which size is between 40 - 125 MB. You use IMEX, so please, see a note from connectionstrings.com site:"Treating data as text(...) Use this one when you want to treat all data in the file as text, overriding Excels...
21 May 2012 by Prasad_Kulkarni
Please refer:Export the Datatable records to Excel sheet in C#.net:Export to EXCEL from Datatable in C#.Net[^]Similar discussion: Click here[^]Export a DataTable to Excel in ASP.NET[^]Following link shows how to import or export DataTable to Excel or HTML files by using...
3 Mar 2016 by MacParekh
hi all,I am working on Vb.net desktop application. My PDF file contain data in tabular formatI want that tabular data in to Excel. Is it possible?If yes then how can i achieve it?Is there any third party tool,dll(free) to achieve this functionality?Thanks in Advance
20 Jun 2012 by Maciej Los
Yes, check the permissions to the shared folder. You need to be able to read/write into it. If the shared folder is inaccessible (not connected), you can't read the excel file.VB.NET, VB or VBA?VB.NETDim sFileName = "S:\newtestBook.xls"Dim exApp As Excel.Application = NothingDim...
9 Jul 2012 by enhzflep
Rather than indexes into the Sheets collection, you need to supply the function valid worksheet objects.Firing up a new instance of excel and recording 2 macros, we get the following code:1. Sheet added between Sheet2 & Sheet3 (right-click sheet 3, add new worksheet) ...
9 Nov 2012 by miteleda
Copy DataGridView contents to clipboard regardless of current selection.
14 Dec 2012 by thichhochoi
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.It should be the permissions problem.Please have a try using the following steps to Configure DCOM:1. Go to the Start-Run menu to type in...
26 Mar 2013 by Sergey Alexandrovich Kryukov
There are at least three approaches:Don't writeusing Systems.Windows.Window;andusing Microsoft.Office.Interop.Excel;in the same file. Skip on one of those lines, or both. When a namespace is used, use fully-qualified names, such asMicrosoft.Office.Interop.Excel.Window myWindow =...
28 May 2013 by TnTinMn
I realize that you have already accepted an answer for this, but there is something that you can do to speed things up.Each cell (range) that you set requires a call across the interop boundary; this boundary crossing is the slow part. As you are filling a contiguous range of cells (a...
12 Sep 2013 by ridoy
There will noting be good after such a good answer from Maciej Los.I only extend it with other 2 links containing a sdk and one sample code that can help you:PDF to Excel SDK[^] A vb.net code for PDF to EXCEL conversion?[^]
4 Sep 2014 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
29 Nov 2013 by Sergey Vaselenko
Hello,You may use the following formula on a worksheet:=NOT(ISERROR(MATCH("*";$A$1:$A$10;0)))But, "~" must be specified as "~~". For example:=NOT(ISERROR(MATCH("~~";$A$1:$A$10;0)))VBA functions:Function MyMatch(ByVal lookup_value As Variant, ByVal lookup_range As Variant)...
11 Apr 2014 by Maciej Los
You did not provide enough information about your issue, especially about the reason of that behaviour. You did not provide your code too. Well, we can only guess...First of all, i'd suggest to read about Using early binding and late binding in Automation[^], Early and Late Binding (Visual...
24 Apr 2015 by Maciej Los
I'd suggest to read this: Create a DLL by CSharp or VB.Net for VBA[^]
10 Jul 2015 by Mario Z
Hi, if I understood you correctly you have a problem here:if (ws.Cells["F"+riga.ToString()].Value.ToString() != "")Well the first thing that comes to my mind is that this cell is null, so try the following:ExcelCell cell = ws.Cells["F" + riga.ToString()];if (cell != null &&...
20 Feb 2016 by CHill60
See the comment from Sinisa Hajnal.They have provided a few reasons why a database is better than excel. There are several more, not least the fact that you would have to have Excel drivers installed on your server in order to access the data. That can be an expensive overhead that is just...
10 May 2016 by F-ES Sitecore
Let's say you can hide the close button, I can still ctrl+f4, chose Exit from the file menu, use task manager, and probably 100 other ways to close the app.You can't launch apps that the clients can't close, it would be an incredibly irritating and spammy thing to do.
13 May 2016 by CHill60
Your code will never run because of these two linesif (Path.GetExtension(FileUpload.FileName).ToLower() == ".xlsx"){ if (Path.GetExtension(FileUpload.FileName).ToLower() == ".xls")The file extension cannot be both ".xlsx" AND ".xls" it must be one or the other.I suspect that you...
2 Jul 2016 by Six Hat Solutions
Easily Send Emails From Your Microsoft Applications Using VBA and the SendGrid API
17 May 2017 by Maciej Los
Assuming that you want to copy data from one sheet into another, when specific condition is meet (Level>1), you can achieve that in two ways: Using ADODB.Recordset[^] + Range.CopyFromRecordset method[^] This method is really fast! 'needs reference to Microsoft ActiveX Data Object Library x.x...
23 Jul 2017 by Richard MacCutchan
If Excel cannot repair the file there is not a great deal that you can do. However .xlsx files are zip archives, so you can try and fix it manually. Take a copy of the file but rename it to filename.zip. You can then use Windows "extract" to get all the individual parts of the workbook. The...
21 Aug 2017 by Graeme_Grant
Have a read of these: * c# - Multiple users writing concurrently to shared Excel file using OpenXML - Stack Overflow[^] * One Excel file, multiple editing users, live updates - Super User[^] * How to Make Excel Allow Multiple Users | Chron.com[^]
3 Oct 2017 by Blutfaust
Try this With UserForm1 For i = 2017 To 1960 Step -1 .ComboBoxYear.AddItem (i) Next End With
14 Jul 2019 by OriginalGriff
That isn't an average - it's a sum. The average is calculated by summing the other rows and dividing the sum by the number of elements you added together. In addition, that doesn't do anything particularly useful because it always sums the same row - including the location that you stick the...
28 Oct 2019 by stc.reseller
Helpful tips in labeling Office files or how to make Office file changes statistically visible, in one single step
12 Sep 2019 by CHill60
You can get the last row used (or last column used) with max_row (or max_col) e.g. (NB untested) wb = openpyxl.load_workbook('mypath.xlsx') ws = wb.active mr = ws.max_row mc = ws.max_column MaxU has provided a helper function to do this at Append existing excel sheet with new dataframe using...
9 Dec 2019 by Maciej Los
I'd avoid of using Activate and Select methods, due to several reason. See: excel-vba - Avoid using SELECT or ACTIVATE | excel-vba Tutorial[^] How to Avoid the Select Method in VBA & Why - Excel Campus[^] Power Excel vba secret, avoid using select[^] The main idea to avoid using above methods...
18 Apr 2020 by Saket Pawar
How to delete headers/certain strings in rows from your Excel file
5 May 2020 by MadMyche
You can't; this is due to security/privacy concerns. What you want to do is upload the file and save it to a "temp" location. Then you do your validation routine, if it passes you then send it to the final location. There's a pretty good answer...
18 Jan 2010 by PeterFortuin
I have created a excel template with Visual Studio (c#) to fill the worksheet with some data. On this worksheet I want to add some conditional formatting of the cells. I want the user of the template to fill in a "Yes" or a "No" and make the cell green / red depending on the value of the cell....
9 Mar 2010 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...
3 Jun 2010 by Rajitha Wimalasooriya
There are lot of logical as well as syntax errors in the code you have provided. I have tried to correct those with minimum changes to your original code.The below code should work,function my_function(){ var Excel; Excel = new ActiveXObject("Excel.Application"); ...
5 Aug 2010 by Christian Graus
If you don't have Excel installed, what do you hope to interop with ? You must have it installed, or it plain would not work. The code you write simply controls Excel via COM, it is not Office, or Excel.
25 Sep 2010 by shakil0304003
// you have to download GemBox.Spreadsheet.dllusing GemBox.Spreadsheet;ExcelFile ef = null;ef.LoadXls(_filePath);//for get textstring[] array = new string[ef.Worksheets.Count]; int i = 0; foreach (ExcelWorksheet ws in ef.Worksheets) ...
7 Oct 2010 by Sandeep Mewara
I guess these articles should help you out. Did you had a look at them?Tutorials on creating PDF files using C# 2.0[^]Creating PDF Tables using C# (.NET 2.0) and iTextSharp[^]
19 Dec 2010 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).
20 Dec 2010 by Slacker007
I did a simple search in Google and the first hit is this: See here[^]For future reference, you could have done this yourself. ;)
6 Jan 2011 by Slacker007
Here is a start: Clickety Wickety[^]I don't have much to go on from your original question but you want to research Office Interop and Office Automation as a start. There is a lot on this subject on the Web and here at Code Project.Depending on what version of Visual Studio you have you...
11 Jan 2011 by thatraja
SQL SERVER – Insert Multiple Records Using One Insert Statement – Use of UNION ALL[^]SQL SERVER – 2008 – Insert Multiple Records Using One Insert Statement – Use of Row Constructor[^][Edit]Importing Data to SQL Server from Excel using Bulk Insert[^][/Edit]
14 Jan 2011 by MrNickP
Hello, This would be the first time I've ever posted about a coding problem I have, usually I'm pretty good at researching the problem and finding my solutions but I'm at a loss now. My skills in programming have almost left me, so I guess you could deem me as a beginner for now till it...
6 Feb 2011 by Espen Harlinn
If I understand you correctly you may want to take a look at this:Example of Using Solver in Excel[^]copied from the page:You may want to solve a system of nonlinear equations in your homework. You can do this in a wide variety of ways, but a simple way to find a solution is to use...
13 Mar 2011 by OriginalGriff
AFAIK, you cannot run anything in Excel from Javascript: that would require giving the webpage access to the Client software and data.Not a good idea - you can see what use would be made of it by the script kiddies.