-
Notifications
You must be signed in to change notification settings - Fork 0
/
Doc.cs
39 lines (38 loc) · 1.36 KB
/
Doc.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*using ClosedXML.Excel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ImportExcelUsingClosedXml
{
public class Doc
{
*//* static void Main(string[] args)
{*//*
//Create workboook and sheet inside it
*//* var wbook = new XLWorkbook();
var wsheet1 = wbook.AddWorksheet("Table_Sheet");*/
/*
//DataTable
var dataTable = new DataTable();
dataTable.Columns.Add("Name", typeof(string));
dataTable.Columns.Add("Sold", typeof(int));
dataTable.Rows.Add("Cheesecake", 14);
dataTable.Rows.Add("Medovik", 6);
dataTable.Rows.Add("Muffin", 10);
//wsheet1.Cell("B3").InsertData(dataTable);
//With array List
var data = new List<object[]>
{
new object[] { "Cheesecake", 15 },
new object[] { "Medovik", 16 },
new object[] { "Muffin", 10 }
};*//*
//wsheet1.Cell("B3").InsertData(data);
//wbook.SaveAs("Excel_Table.xlsx");
}
}
}
*/