Where the range is multiple cells:
Excel.Worksheet sheet = workbook.ActiveSheet;
Excel.Range rng = (Excel.Range) sheet.get_Range(sheet.Cells[1, 1], sheet.Cells[3,3]);
Where range is one cell:
Excel.Worksheet sheet = workbook.ActiveSheet;
Excel.Range rng = (Excel.Range) sheet.Cells[1, 1];
More Related Contents:
- Excel Interop – Efficiency and performance
- Fastest way to interface between live (unsaved) Excel data and C# objects
- How to open an Excel file in C#?
- How to reference Microsoft.Office.Interop.Excel dll?
- BUG: Can’t choose dates on a DatePicker that fall outside a floating VSTO Add-In
- Excel error HRESULT: 0x800A03EC while trying to get range with cell’s name
- Please explain why I am able to instantiate the “Application” interface in Excel VSTO
- How to know if a cell has an error in the formula in C#
- Excel CustomTaskPane with WebBrowser control – keyboard/focus issues
- Reading Excel files from C#
- How do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?
- Write Array to Excel Range
- How to read data of an Excel file using C#?
- Using Excel OleDb to get sheet names IN SHEET ORDER
- export to Excel from a list with EPPLUS
- Import and Export Excel – What is the best library? [closed]
- Exception from HRESULT: 0x800A03EC Error
- Fastest method to remove Empty rows and Columns From Excel Files using Interop
- unable to cast COM object of type ‘microsoft.Office.Interop.Excel.ApplicationClass’ to ‘microsoft.Office.Interop.Excel.Application'”
- How to export a JQgrid data to Excel using c#?
- How to use Microsoft.Office.Interop.Excel on a machine without installed MS Office?
- Is there any simple way to convert .xls file to .csv file? (Excel)
- Export DataTable to Excel with Open Xml SDK in c#
- Microsoft Office Excel cannot access the file ‘c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx’
- Microsoft.Office.Interop.Excel really slow
- The quest for the Excel custom function tooltip
- How to save workbook without showing save dialog with Excel interop?
- how to solve Exception:Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) in C#?
- Cell styles in OpenXML spreadsheet (SpreadsheetML)
- Exception (HRESULT: 0x800AC472) when using Excel.Worksheet.Select after calling Excel.Workbook.SaveAs