This project has moved and is read-only. For the latest updates, please go here.

Worksheets.Worksheet(Sheetname) , Sheetname must be exacly the name of the sheet(lowercase and uppercase also)

Oct 27, 2011 at 12:05 PM
Edited Oct 27, 2011 at 12:05 PM

I've an .xlsx file with a worksheet name : Pepito

Accessing to that worksheet using lWorkBook.Worksheets.Worksheets("Pepito") works ok

But accessing to that worksheet using lWorkBook.Worksheets.Worksheets("PEPITO") throws an exception.

If you try, in excel 2007, to create a sheet with name "Pepito" and another with "PEPITO" it says that name "Pepito" cannot be used again.

Why cannot access to a cell without seeing uppercase or lowercase matches?

Oct 27, 2011 at 5:25 PM

I changed it so it doesn't require proper case from now on...