'Emacs org-agenda Export agenda -how to?

I'am new with Emacs and certainly with lisp. I know that we can save an agenda (view?) with C-x C-w. Fine but can we do that with the (setq org-agenda-custom-commands) ? I would like to save the weekly agenda to a .txt file (like agenda.txt).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source