From a VBS script I need to work with an Excel workbook in the format:
| A | B | C |
----|-----------|-----------|-----------|
1 | Header1 | Header2 | Header3 |
----|-----------|-----------|-----------|
2 | FOLDER1 | | |
----|-----------|-----------|-----------|
3 | Item1 | 111 | 222 |
----| |-----------|-----------|
4 | | Item1Info | Item1Data |
----| |-----------|-----------|
.. | | ... | ... |
----| |-----------|-----------|
11 | | 333 | 444 |
----|-----------|-----------|-----------|
12 | Item2 | 555 | 666 |
----|-----------|-----------|-----------|
13 | FOLDER2 | | |
----|-----------|-----------|-----------|
14 | Item1 | 777 | 888 |
----|-----------|-----------|-----------|
.. | ... | ... | ... |
So: Column A has categories of 1st level and 2nd level (folders / items), and columns B and C contain data for the items. The problem is that a single element can span multiple lines, as shown; Element 1 is a merged cell from rows 3 through 11).
I need to create .csv from this data, which looks like this:
Header1,Header2,Header3
111,Item1,FOLDER1
Item1Info,Item1,FOLDER1
...
555,Item2,FOLDER1
777,Item1,FOLDER2
...
The data in column C may be discarded.
Basically, I need to know how to determine if a cell is merged (i.e. more than one row of information for each element) and how many rows are merged. Any idea?
Albert Mata