VBA Code to read the structure & data of an excel
I am currently working on an excel sheet . That excel sheet will contain merged cells rowwise and columnwise but not both.
I have to determine the structure as well the data of the excel file . Can any one tell me the code for doing it . I am doing my coding in visual basic text editor of excel file. so please send the appropriate code.
Currently i have developed the macro for reading 10 unmerged rows & columns.Here it is :-
'Taufiq Alam Khan
Dim Selectedvalue As Double
Dim Counter As Double
Dim Row As Double
Row = 0
Do Until Row = 10
For Counter = 1 To 10
Selectedvalue = Selection.Value
'Selection.Value = 0
Row = Row + 1
This will only read the first 10 columns and first 10 rows of the excel file having unmerged cells . if this code is used for merged cells then it will throw an exception . so kindly suggest some solution for it .............