Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

Sets or returns the horizontal (x) position of the workbook window's upper left corner when displayed in Excel.

Excel 2003 and 2007 use different scales for determining position.  The HorizontalPosition will not be the same when using ExcelApplication for the two file types.

Signature
C#
C#
 public int HorizontalPosition{ get; set; }
Signature
vb.net
vb.net
Public Property HorizontalPosition() As Integer
Remarks

Excel 2003 and 2007 use different scales for determining position.  The HorizontalPosition will not be the same when using ExcelApplication for the two file types.

Example
Code Block
csharp
csharp
titleC#

          //--- Get the horizontal position of the workbook window's upper left corner
          int winHoriz = wb.HorizontalPosition;

          //--- Set the horizontal position of the workbook window's upper left corner
          wb.HorizontalPosition = 100;
        
Code Block
vb.net
vb.net
titlevb.net

          '--- Get the horizontal position of the workbook window's upper left corner
          Dim winHoriz As Integer = wb.HorizontalPosition

          '--- Set the horizontal position of the workbook window's upper left corner
          wb.HorizontalPosition = 100