Exemplo n.º 1
0
        /**
         * Write a row to the file
         *
         * @param rownum 0-based row number
         * @param row    a row
         */
        public void WriteRow(int rownum, SXSSFRow row)
        {
            if (NumberOfFlushedRows == 0)
            {
                LowestIndexOfFlushedRows = rownum;
            }

            NumberLastFlushedRow          = Math.Max(rownum, NumberLastFlushedRow);
            NumberOfCellsOfLastFlushedRow = row.LastCellNum;
            NumberOfFlushedRows++;
            BeginRow(rownum, row);
            var cells       = row.AllCellsIterator();
            int columnIndex = 0;

            while (cells.HasNext())
            {
                WriteCell(columnIndex++, cells.Next());
            }
            EndRow();
        }
Exemplo n.º 2
0
        /**
         * Write a row to the file
         *
         * @param rownum 0-based row number
         * @param row    a row
         */
        public void WriteRow(int rownum, SXSSFRow row)
        {
            BeginRow(rownum, row);

            using (var cells = row.AllCellsIterator())
            {
                int columnIndex = 0;
                while (cells.MoveNext())
                {
                    WriteCell(columnIndex++, cells.Current);
                }
                EndRow();
            }

            if (LowestIndexOfFlushedRows == -1 || LowestIndexOfFlushedRows > rownum)
            {
                LowestIndexOfFlushedRows = rownum;
                NumberOfFlushedRows++;
            }
        }