I am using Epplus for uploading the data to database.When i am tring to convert my csv file to xlsx using LoadFromTest, extra null rows is also loaded into xlsx.I want to know,how we should restrict LoadFromText method not to Load Null empty Rows.
This is the code that helps to Convert CSV to XLSX format
private void ConverCSVtoXlsx(ExcelPackage Package,string FileName)
{
var format = new ExcelTextFormat();
format.Delimiter = ',';
Package.Workbook.Worksheets["Believer List"].Cells["A1"].LoadFromText(new FileInfo(Server.MapPath(@"~\BelieverUploadFiles\" + FileName)), format, OfficeOpenXml.Table.TableStyles.Medium27, true);
Package.Save();
}
I have a screen shot in this link enter image description here
If see that image csv as only 2 rows with record and one heading Row.But after Converting 2 Record loaded with one Null row.Can anyone help on this
Thanks in advance