Obtaining Excel worksheet reference by worksheet name via C

0 votes

I'm currently obtaining a handle for an Excel worksheet by using the below C# code:

Excel.Worksheet worksheet = (Excel.Worksheet)sheets.get_Item(15);
//Get the worksheet "SubSignOff" number

Is there any way that I can obtain the same by using the worksheet name "SubSignOff"?

Nov 10, 2022 in Others by Kithuzzz
• 38,010 points
379 views

1 answer to this question.

0 votes

Instead of using Excel.Workbook.Sheets collection, it's easier to access Excel.Workbook.Worksheet collection, that way you can utilize early binding.

I hope this helps you.

answered Nov 10, 2022 by narikkadan
• 63,420 points

Related Questions In Others

0 votes
1 answer

can somebody explain me what does "passing by value" and "Passing by reference" mean in C#?

To answer your question, “passing by value” ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,670 points
598 views
0 votes
1 answer

Absolute worksheet reference in excel cell formulas

Try this: =INDIRECT("Sheet1!C"&ROW()) READ MORE

answered Oct 10, 2022 in Others by narikkadan
• 63,420 points
372 views
0 votes
1 answer

Activate last excel worksheet on worksheetlist with closedxml in c#

This will answer your question :  Changing sheet ...READ MORE

answered Nov 5, 2022 in Others by narikkadan
• 63,420 points
1,281 views
0 votes
1 answer
0 votes
1 answer

How to Freeze Top Row and Apply Filter in Excel Automation with C#

Try this: // Fix first row workSheet.Activate(); workSheet.Application.ActiveWindow.SplitRow = 1; workSheet.Application.ActiveWindow.FreezePanes ...READ MORE

answered Oct 22, 2022 in Others by narikkadan
• 63,420 points
2,164 views
0 votes
1 answer

Microsoft.Office.Interop.Excel for Office 2007

Each client must install the  2007 Microsoft ...READ MORE

answered Nov 5, 2022 in Others by narikkadan
• 63,420 points
1,088 views
0 votes
1 answer

Using c# to select a worksheet in excel

Try this: Excel.Worksheet xlWorkSheetFocus = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2); xlWorkSheetFocus.Activate(); I hope this ...READ MORE

answered Nov 14, 2022 in Others by narikkadan
• 63,420 points
437 views
0 votes
1 answer

Microsoft Open XML Read Excel file using SAX method row by row and finding cell data

I faced a comparable challenge. A bespoke ...READ MORE

answered Jan 6, 2023 in Others by narikkadan
• 63,420 points
1,066 views
0 votes
1 answer

Excel worksheet multi-criteria function (like Index-Match array) to fetch last value of an item, looking up by item name and date

Use: =SUMIFS(C:C,B:B,E12,A:A,MAXIFS(A:A,B:B,E12)) It will return the value at the ...READ MORE

answered Apr 6, 2023 in Others by narikkadan
• 63,420 points
446 views
0 votes
1 answer

Excel offset where reference is to another worksheet

Solution:  =OFFSET((INDIRECT(ADDRESS(1,1,,,"Sheet2")),ROW(),0,,) References: OFFSET(starting point, num of rows, num ...READ MORE

answered Oct 8, 2022 in Others by narikkadan
• 63,420 points
1,797 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP