Addon:
It seems to be a bug with the Uri class.
See
http://connect.microsoft.com/VisualStudio/feedback/details/475897/uri-trycreate-throws-uriformatexception
Exception "Invalid URI: The hostname could not be parsed." thrown when reading Excel file.
Reproducible on 3.0.02 and 3.1 Beta.
DataSource:
Create a new Excel file (xlsx).
Key in the value
1@1.com;2@2.com into cell A1
Save (c:\file1.xlsx)
Source:
//SourceFileInfo = new FileInfo(@"c:\file1.xlsx");
using (ExcelPackage package = new ExcelPackage(SourceFileInfo))
{
int idx=0;
foreach (ExcelWorksheet wks in package.Workbook.Worksheets)
{
result.Add(new BEWorksheetDetails(SourceFileInfo.Name, wks.Name, idx++, FetchData(wks.Name)));
}
}