Hi Mostafa -
Sorry for the wait. To the first part of your question, I would suggest the
ReadFromExcel() function, implemented using it's two additional optional arguements. I'm attaching an example file that shows the formatting for the Excel file (appropriate for importing into the Freedonia dataset).
ReadFromExcel(path\tofile\book1.xlsx, years, tsnames, values)
Note that this form of the function is only readable using one of LEAP's time-slices variables, such as the System Peak Load Shape. In any case, I'd suggest experimenting with it manually by entering the expressions using the builder, making sure you've got it right before trying to do it via the API.
To the second part of your question: reading the value of a variable in a specific time slice is a very good question, and it's something that I haven't done. I will continue to muse on this, and if I come up with a solution, I'll post it here. Likewise, feel free to post any of your progress on this question too. I'm sure the community would benefit! What I can say is that there isn't a built-in way to do this using a LEAP function, so you would need to do something clever yourself.
Good luck,
Taylor
Attachments:
Book1.xlsx [4]