Beispiel #1
0
        private List <CSVColumn> getColumns(string[] headers)
        {
            int index = 0;
            List <CSVColumn> columns = new List <CSVColumn>();

            foreach (string header in headers)
            {
                CSVColumn column = new CSVColumn();
                column.Header = header;
                column.Index  = index;
                columns.Add(column);
                index += 1;
            }
            return(columns);
        }
Beispiel #2
0
        private CSVRow createHeaderRow(string[] headers)
        {
            CSVRow headerRow = new CSVRow
            {
                IsHeaderRow = true
            };

            foreach (string header in headers)
            {
                CSVColumn column = new CSVColumn
                {
                    Header = header
                };
                headerRow.Columns.Add(column);
            }
            return(headerRow);
        }