Ejemplo n.º 1
0
        private CellPosition FindLastRow(CellRange range, CellPosition headerStart)
        {
            var result = headerStart;
            for (int row = headerStart.Row; row <= range.LastRow + 1; row++)
            {
                var currentCell = range[row, headerStart.Column].Value;
                if (string.IsNullOrWhiteSpace(currentCell))
                {
                    result.Row = row;
                    break;
                }
            }

            return result;
        }
Ejemplo n.º 2
0
        //public void OpenPdf()
        //{
        //    Process.Start(this.PdfFullFileRoot);
        //}
        private CellPosition FindHeader(CellRange range, string startValue)
        {
            var headerStart = new CellPosition(0, 0);
            for (int row = range.Row; row <= range.LastRow; row++)
            {
                for (int col = range.Column; col <= range.LastColumn; col++)
                {
                    var currentCell = range[row, col].Value;
                    if (currentCell == startValue)
                    {
                        headerStart = new CellPosition(row, col);
                        break;
                    }
                }
            }

            return headerStart;
        }