+ 3

I download epplus library to use it in visual studio.How to add it to visual studio?

I download EPPlus.dll then copy it to the project solution folder and make it as a reference in the project, then writing using (OfficeOpenXml; using OfficeOpenXml.Style;), but still donot create the excel file. I use console application

3rd Mar 2017, 12:58 PM
Doaa Mohamed
Doaa Mohamed - avatar
2 Answers
+ 1
U need to access the root directory of visual studio to add the library file by using the console application.
5th Mar 2017, 9:28 AM
Sourav Dutta
Sourav Dutta - avatar
0
I found the excel sheet in the folder of project after writing this code StringBuilder sb = new StringBuilder(); IEnumerable<string> columnNames = stat.Columns.Cast<DataColumn>(). Select(column => column.ColumnName); sb.AppendLine(string.Join(",", columnNames)); foreach (DataRow row in stat.Rows) { IEnumerable<string> fields = row.ItemArray.Select(field => field.ToString()); sb.AppendLine(string.Join(",", fields)); } File.WriteAllText("pre.csv", sb.ToString()); }
5th Mar 2017, 11:33 AM
Doaa Mohamed
Doaa Mohamed - avatar