Hi Anik -
Though it's possible to modify the nx1 files with an appropriate editor, we strongly discourage you from doing so. I see you're already found the LEAP API (https://leap.sei.org/help24/API/Yearly_Shapes_API.htm), as that's where we would have pointed you.
Otherwise, you could try using the
ReadFromExcel() function, instead of
YearlyShape(), and point it to a range within an Excel workbook that contains values for each time slice. These values could be manipulated in Excel using whichever tool you want, before re-running LEAP.
Hope this helps,
Taylor