Edited for excel and pdf part.