codeunit 50104 LoadExcel { trigger OnRun() begin UploadIntoStream('Load Excel File', '', 'Excel File (.xlsx)|*.xlsx', NombreFicheroLocal, FicheroInStream); Nombrehoja := ExcelBuf.SelectSheetsNameStream(FicheroInStream); ExcelBuf.LOCKTABLE; ExcelBuf.OpenBookStream(FicheroInStream, Nombrehoja); ExcelBuf.ReadSheet(); if ExcelBuf.FindLast() then begin celdasleidas := ExcelBuf.Count; Message('Cells read %1', celdasleidas); end; end; var ExcelBuf: Record "Excel Buffer"; FicheroInStream: InStream; NombreHoja: Text; NombreFicheroLocal: Text; celdasleidas: Integer; }
Answers
Here you have an example to read an Excel File.
Thank you @ftornero