You cannot through a component diagram, but you can through a deployment diagram : a generated file is supported by an artifact in UML, and a deployment diagram allows to show both the artifact and your components
There is no predefined dependency from a component to an artifact to indicate the component creates/uses the artifact, but may be your tool allows to use the dependencies with the keyword use and the stereotype create

(Warning In BoUML I can have a dependency from an artifact to a component typically for a manifestation, but I do not allow them in the reverse order (probably because I forgot to allow them) so the diagram above cannot be made using BoUML and I edited by hand the picture to reverse the dependencies)