コード例 #1
0
ファイル: CursorExcel.cs プロジェクト: sxkote/ReportGrabber
        /// <summary>
        /// Gets the index of first row to be grabbed
        /// </summary>
        /// <param name="range">The Range of the schema that defines the first row index</param>
        /// <returns>Inde of the first row to be grabbed</returns>
        protected int FirstRowIndex(Range range)
        {
            if (String.IsNullOrEmpty(range.InitPosition))
                return 0;

            int row = 0;
            if (Int32.TryParse(range.InitPosition, out row))
                return row;

            return 0;
        }
コード例 #2
0
ファイル: CursorExcel.cs プロジェクト: sxkote/ReportGrabber
        public override bool MoveNext(Range range)
        {
            _row = _row < 0 ? this.FirstRowIndex(range) : _row + 1;

            int column = 0;
            if (Int32.TryParse(range.FinishCondition, out column))
            {
                // if in Condition field Column number to check is entered
                return !String.IsNullOrEmpty(this.GetValue(_row, column));
            }

            return !this.CheckCondition(range.FinishCondition);
        }