Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;  
  3.  
  4. public class Program
  5. {
  6.     public static void Main()
  7.     {
  8.         var customer_list = new ExcelDocumentReader().Load<CustomerList>(file).Customers;
  9.     }
  10.    
  11.     [ExcelSheet("Customers")]
  12.     public class CustomerList : ExcelDocument
  13.     {
  14.         [ExcelTable("CustomerList", true)]
  15.         public List<Customer> Customers { get; set; }
  16.     }
  17.  
  18.     public class Customer
  19.     {
  20.         [ExcelColumn("A")]
  21.         public string Name { get; set; }
  22.  
  23.         [ExcelColumn("B")]
  24.         public string ContactName { get; set; }
  25.  
  26.         [ExcelColumn("C")]
  27.         public string Address { get; set; }
  28.  
  29.         [ExcelColumn("D")]
  30.         public string Phone { get; set; }
  31.  
  32.         [ExcelColumn("E")]
  33.         public string Fax { get; set; }
  34.  
  35.         [ExcelColumn("F")]
  36.         public string Email { get; set; }
  37.  
  38.         [ExcelColumn("G")]
  39.         public string AccountType { get; set; }
  40.  
  41.         [ExcelColumn("H")]
  42.         public string Delivery { get; set; }
  43.  
  44.         [ExcelColumn("I")]
  45.         public string FinishedTopDiscount { get; set; }
  46.  
  47.         [ExcelColumn("J")]
  48.         public string GenerateBlank { get; set; }
  49.  
  50.         [ExcelColumn("K")]
  51.         public string DeliveryNotes { get; set; }
  52.     }
  53.    
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement