Reading merged cells in excel 2003 and 2007

enak

Member
Joined
Aug 29, 2006
Messages
11
Programming Experience
10+
I have a spreadsheet that I need to read a value from that is in merged cells AA1 to AC2.

When I try to do this with the following code I get Nothing.

Dim oSheet As Excel._Worksheet
Dim oBook As Excel.Workbook

oXL = New Excel.Application()
oBook = oXL.Workbooks.Open(strCurFile)

For Each oSheet In oBook.Worksheets
strTemp = oSheet.Cells(1, 27).value

How can I read the merged cell?

I am using VS 2008 and this is a windows application.
 
Back
Top