move form creation in function declaration + add xlsx lib in export