using OfficeOpenXml.FormulaParsing.LexicalAnalysis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OfficeOpenXml.FormulaParsing
{
///
/// This class should be implemented to be able to deliver excel data
/// to the formula parser.
///
public abstract class ExcelDataProvider : IDisposable
{
///
/// A range of cells in a worksheet.
///
public interface IRangeInfo : IEnumerator, IEnumerable
{
bool IsEmpty { get; }
bool IsMulti { get; }
int GetNCells();
ExcelAddressBase Address { get; }
object GetValue(int row, int col);
object GetOffset(int rowOffset, int colOffset);
ExcelWorksheet Worksheet { get; }
}
///
/// Information and help methods about a cell
///
public interface ICellInfo
{
string Address { get; }
int Row { get; }
int Column { get; }
string Formula { get; }
object Value { get; }
double ValueDouble { get; }
double ValueDoubleLogical { get; }
bool IsHiddenRow { get; }
bool IsExcelError { get; }
IList Tokens { get; }
}
public interface INameInfo
{
ulong Id { get; set; }
string Worksheet {get; set;}
string Name { get; set; }
string Formula { get; set; }
IList Tokens { get; }
object Value { get; set; }
}
///
/// Returns the names of all worksheet names
///
///
public abstract ExcelNamedRangeCollection GetWorksheetNames(string worksheet);
///
/// Returns all defined names in a workbook
///
///
public abstract ExcelNamedRangeCollection GetWorkbookNameValues();
///
/// Returns values from the required range.
///
/// The name of the worksheet
/// Row
/// Column
/// The reference address
///
public abstract IRangeInfo GetRange(string worksheetName, int row, int column, string address);
public abstract INameInfo GetName(string worksheet, string name);
public abstract IEnumerable