Initialize() public method

public Initialize ( Stream fileStream ) : void
fileStream Stream
return void
Example #1
0
        public static IExcelDataReader CreateOpenXmlReader(Stream fileStream)
        {
            IExcelDataReader reader = new ExcelOpenXmlReader();
            reader.Initialize(fileStream);

            return reader;
        }
Example #2
0
        public static IExcelDataReader CreateOpenXmlReader(Stream fileStream)
        {
            IExcelDataReader reader = new ExcelOpenXmlReader();

            reader.Initialize(fileStream);

            return(reader);
        }
Example #3
0
        public static IExcelDataReader CreateReader(Stream fileStream, ExcelFileType excelFileType) {
            IExcelDataReader reader=null;

            switch (excelFileType) {
                case ExcelFileType.Binary:
                    reader=new ExcelBinaryReader();
                    reader.Initialize(fileStream);
                    break;
                case ExcelFileType.OpenXml:
                    reader=new ExcelOpenXmlReader();
                    reader.Initialize(fileStream);
                    break;
                default:
                    break;
            }

            return reader;
        }
Example #4
0
        public static IExcelDataReader CreateReader(Stream fileStream, ExcelFileType excelFileType)
        {
            IExcelDataReader reader = null;

            switch (excelFileType)
            {
            case ExcelFileType.Binary:
                reader = new ExcelBinaryReader();
                reader.Initialize(fileStream);
                break;

            case ExcelFileType.OpenXml:
                reader = new ExcelOpenXmlReader();
                reader.Initialize(fileStream);
                break;

            default:
                break;
            }

            return(reader);
        }