private SCLRecord CreateSCLRecord( short numerator, short denominator ) { SCLRecord r = new SCLRecord(); r.SetDenominator( denominator ); r.SetNumerator( numerator ); return r; }
/// <summary> /// Sets the zoom magnication for the sheet. The zoom is expressed as a /// fraction. For example to express a zoom of 75% use 3 for the numerator /// and 4 for the denominator. /// </summary> /// <param name="numerator">The numerator for the zoom magnification.</param> /// <param name="denominator">The denominator for the zoom magnification.</param> public void SetZoom(int numerator, int denominator) { if (numerator < 1 || numerator > 65535) throw new ArgumentException("Numerator must be greater than 1 and less than 65536"); if (denominator < 1 || denominator > 65535) throw new ArgumentException("Denominator must be greater than 1 and less than 65536"); SCLRecord sclRecord = new SCLRecord(); sclRecord.SetNumerator((short)numerator); sclRecord.SetDenominator((short)denominator); Sheet.SetSCLRecord(sclRecord); }