there are two Errors came up on the Load-Method for loading Excel-Sheets through Infragistics Components.
First:
This ist because the Excel-Workbook is corrupt. But how can I load the Workbook without validating if its corrupt or not?
Second:
This is because there are Hyperlinks in Worksheets. How can I remove them before Loading?
My Code:
'stuff...
Dim file as String = "test.xls"
xls = New Workbook()
xls = Workbook.Load(file)
'stuff...
The Page from Infragistics is not very helpful: http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Infragistics4.Documents.Excel.v12.2~Infragistics.Documents.Excel.Workbook~Load(Stream).html
Ok guys, Thank you for the Response! Answer ist following:
First Question was:
Answer:
- There is no Option to Load a corrupt Workbook into your App without validating the Workbook or something like this. You need to handle this Errormessage and the User must choose another, valid File!
Second Question was:
Answer:
There were mailto-Links in the Worksheets. Normally this is not a Problem for Infragistics. But the mailto Links were broken like this:
mailto:eric@ domain.com
You see: A space bar in that mailto-Link - so the Link is corrupt. The Invalid Uri came up because of this.