Ejemplo n.º 1
0
        public static void export(IEnumerable <T> resultData, Stream stream)
        {
            DataTableMapper <T> mapper   = new DataTableMapper <T>();
            DataTable           retTable = mapper.Map(resultData.ToList());

            export(retTable, stream);
        }
Ejemplo n.º 2
0
        private static List <T> import(Workbook workbook)
        {
            //Initialize worksheet
            Worksheet sheet = workbook.Worksheets[0];
            // get the data source that the grid is displaying data for
            var resultData = sheet.ExportDataTable();

            DataTableMapper <T> mapper    = new DataTableMapper <T>();
            List <T>            resultObj = mapper.Map(resultData);

            return(resultObj);
        }