title: How do I find start and end rows of merged cells in Excel with VBSCript?
body: <p>From a VBS script I have to work with an Excel book with the format:</p>
  
  <pre><code>    |     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    |
  ----|-----------|-----------|-----------|
   .. |    ...    |    ...    |    ...    |
  </code></pre>
  
  <p>So: Column A has 1st level and 2nd level categories (Folders/Items), and Columns B and C hold the data for the items. The trouble here is that one item can span several rows, as shown; Item1 is a merged cell from rows 3 to 11).</p>
  
  <p>I need to create a .csv from this data that looks as follows:</p>
  
  <pre><code>Header1,Header2,Header3
  111,Item1,FOLDER1
  Item1Info,Item1,FOLDER1
  ...
  555,Item2,FOLDER1
  777,Item1,FOLDER2
  ...
  </code></pre>
  
  <p>The data in Column C can be discarded.</p>
  
  <p>Basically, what I need to know is how to detect if a cell is merged (that is; more than one row of information per item) <strong>and</strong> how many rows are merged together. Any idea?</p>