Quantcast
Channel: npoi Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 690

Commented Unassigned: Crash when opening a file with a broken link [12727]

$
0
0
I have an .xlsx file with a cell containing "a@" - kind of a broken email address. When I try to open it using new XSSFWorkbook(file).

Exception: UrlFormatException
Invalid URI: The hostname could not be parsed.
Comments: ** Comment from web user: khamulete **

This is happening to me as well with a xlsx file to create a XSSFWorkbook.

The problem occurs when the cell has hyperlink format, which is given automatically by Excel when the '@' character is writen. Otherwise, when the information is kept without URI format (not hyperlink), the constructor works fine:

```
using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
{
try
{
XSSFWorkbook xssfworkbook = new XSSFWorkbook(file);
return xssfworkbook;
}
catch (Exception ex)
{
//error stuff
}
}
```


Viewing all articles
Browse latest Browse all 690

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>