Hi, I have a report where you can choose an Excel file to import. The Excel file contains several sheets. So the user has the possibility to select one of the sheets.
I use the function SelectSheetsName from the table 370 Excel Buffer.
The C/AL code XlWrkBkReader := XlWrkBkReader.Open(FileName) gives the following error:
A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookReader.Open failed with this message: The Microsoft Excel workbook cannot be opened. This may be caused by one of the following reasons:
1. The path to the file is a web address. You must navigate to the file by using the Open File dialog box, or you can save the file locally and then open it.
2. The workbook is not saved in the Open XML file format. In Microsoft Excel, save the workbook as an Excel workbook (.xlsx file), and then try your request again.
The following error occurred: Invalid Hyperlink: Malformed URI is embedded as a hyperlink in the document..
The Excel file contains different kind of e-mail adresses on some other worksheets. Unfortunately it is not possible to delete these worksheets. The customer needs them.
Who has an idea how to solve this issue, by using other code, perhaps with an excel dotnet variable.
0
Answers
Any solution ?
Thx