Hi Experts,
In NAV 2009R2 table I could Import data from any type of format files(i.e. .CSV, .XLS, XLSX).
But coming to NAV 2016 I can't Import data from .CSV, .XLS files.
While importing I got following error in NAV 2016 when i click Select Sheet name
---->>>>
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: File contains corrupted data..
----->>>>
I am using following Standard functions
FileName:=FileMgt.UploadFile('Import Excel File','xls'); //(419 File Management Codeunit)
SheetName := ExcelBuf.SelectSheetsName(FileName); //(370 Excel Buffer table)
ExcelBuf.OpenBook(FileName,SheetName);
ExcelBuf.ReadSheet;
Can anyone suggest me, How to Import data from .CSV, .XLS Format Files in NAV 2016 Table.
Thanks in Advance...
*This post is locked for comments