Allow writing line by line using writeSheetHead, writeSheetRow and writeSheetFooter

I splitted the function writeSheet into writeSheetHead, writeSheetRow and writeSheetFooter because I sometimes have a lot of data which is too large to pass it inside one array. This way I can write extremly big files line by line without reaching any memory limit. The function writeSheet still exists and does the same stuff using the new 3 functions.