title: How to get schedule element data in revit using C#
body: <p>I am new to Revit API and am working in C#. I want to get the schedule element parameters value using C#. I used the below code to get the view schedule.</p>
  
  <pre><code>var viewSchedule = new FilteredElementCollector(document)
                                      .OfClass(typeof(ViewSchedule))
                                      .FirstOrDefault(e =&gt; e.Name == "MyScheduleName") as ViewSchedule;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/po9X3.png" rel="nofollow noreferrer">Schedule Element Data</a></p>
  
  <p>From the above schedule, I used the below code to get the element data (please refer the above screenshot link) but it taking long time to reflect the output (10 to 15 seconds).</p>
  
  <pre><code>var rowCount = viewSchedule.GetTableData().GetSectionData(SectionType.Body).NumberOfRows;
              var colCount = viewSchedule.GetTableData().GetSectionData(SectionType.Body).NumberOfColumns;
  
              for (int i = 0; i &lt; rowCount; i++)
              {
                  for (int j = 0; j &lt; colCount; j++)
                  {
                      data += viewSchedule.GetCellText(SectionType.Body, i, j);
                  }
              }
  </code></pre>
  
  <p>Please let me know is there any alternate approach to get the schedule data using C#.
  Thanks in advance.</p>