/// <summary> /// Writes a record to the Excel file. /// </summary> /// <param name="record">The record to write.</param> /// <exception cref="ObjectDisposedException"> /// Thrown is the serializer has been disposed. /// </exception> public virtual void Write(string[] record) { CheckDisposed(); for (var i = 0; i < record.Length; i++) { range.AsRange().Cell(currentRow + RowOffset, i + 1 + ColumnOffset).Value = ReplaceHexadecimalSymbols(record[i]); } currentRow++; }
/// <summary> /// Reads a record from the Excel file. /// </summary> /// <returns> /// A <see cref="T:String[]" /> of fields for the record read. /// </returns> /// <exception cref="ObjectDisposedException">Thrown if the parser has been disposed.</exception> public virtual string[] Read() { CheckDisposed(); var row = range.AsRange().Row(Row + RowOffset); if (row.CellsUsed().Any()) { var result = row.Cells(1 + ColumnOffset, FieldCount + ColumnOffset) .Select(cell => cell.Value.ToString()) .ToArray(); Row++; return(result); } return(null); }
public XLAutoFilter Set(IXLRangeBase range) { Range = range.AsRange(); Enabled = true; return(this); }
public void Add(IXLRangeBase range) { Count++; _ranges.Add(range.AsRange() as XLRange); }
public XLAutoFilter Set(IXLRangeBase range) { Range = range.AsRange(); Enabled = true; return this; }
public void Add(IXLRangeBase range) { Add(range.AsRange() as XLRange); }