Sets or returns the value for the top margin in inches. This is the space between the worksheet data and the top edge of the printed page. This is set to 1 by default. The valid range of values are 0 through 100, and is also limited by paper size.

<p> public double TopMargin{ get; set; }</p>
<p>Public Property TopMargin() As Double</p>

          //--- Get TopMargin
          double tpMargin = ps.TopMargin;

          //--- Set TopMargin
          ps.TopMargin = 1.5;
        
          '--- Get TopMargin
          Dim tpMargin As Double = ps.TopMargin

          '--- Set TopMargin
          ps.TopMargin = 1.5