How to call function ExcelBuffer.UpdateBookStream ?

Please explain the parameters used in the above function!

What changes required in code of older versions for using excel export functionality in Business Central?