Exemplo n.º 1
0
        public void CanReadCsv()
        {
            var stream = GetFileStream("testdata.csv");

            using var reader = new CsvDataReader(new StreamReader(stream, Encoding.UTF8));

            var table = LightweightDataTable.FromDataReader(reader);

            VerifyDataTable(table);
        }
Exemplo n.º 2
0
        public void CanReadExcel()
        {
            var stream = GetFileStream("testdata.xlsx");

            using var reader = new ExcelReader(stream);

            var table = LightweightDataTable.FromDataReader(reader);

            VerifyDataTable(table);
        }
Exemplo n.º 3
0
        public void CanReadCsv()
        {
            IDataTable table;

            using (var csv = new CsvDataReader(new StreamReader(GetFileStream("testdata.csv"), Encoding.UTF8)))
            {
                table = LightweightDataTable.FromDataReader(csv);
            }

            VerifyDataTable(table);
        }
Exemplo n.º 4
0
        public void CanReadExcel()
        {
            IDataTable table;

            using (var excel = new ExcelDataReader(GetFileStream("testdata.xlsx"), true))
            {
                table = LightweightDataTable.FromDataReader(excel);
            }

            VerifyDataTable(table);
        }