Donate

Get Microsoft Excel Cell Value Using C# And Office.Interop.Excel

Hello,

In this article, I'll show you two options to get the cell value of excel using C#. Given that you are using VSTO and have referenced the assembly Microsoft.Office.Interop.Excel.
1
2
3
var cellValue = (string)(xlWorkSheet.Cells[3, 6] as Excel.Range).Value2;
//or this
var cellValue = xlWorkSheet.get_Range("F3", Type.Missing).Value2;

Note: xlWorkSheet is an Excel Worksheet object.

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.