0

I would like know the procedure to read xer file

I have tried the below snippet of code to read the file

UniversalProjectReader reader = new UniversalProjectReader();
InputStream f = Core.getFileDocumentContent(getContext(), __ProjectPlan);
ProjectFile projectObj = reader.read(f);
projectObj.getTasks();
Core.getLogger("Size").info(projectObj.getTasks().size());

D.Stella
  • 1
  • 1
  • Your code looks correct. Are you encountering an error, or are you not seeing the number of tasks you expect? One thing to watch with XER files is that it is quite easy to generate one which doesn't contain any project data. I'd recommend opening the file in a text editor and searching for `%T` which will show you the start of each table. You can skip through the file using this search to find the `TASK` table to see if there are any rows listed after it. – Jon Iles Nov 17 '22 at 08:39

0 Answers0