Repository: OpenBB-finance/OpenBBTerminal
File: openbb_terminal/econometrics/econometrics_controller.py (Python)

Code before:
                self.files.append(alias)
                self.datasets[alias] = data
                self.update_runtime_choices()
                self.update_loaded()

    @log_start_end(log=logger)
    def call_export(self, other_args: List[str]):
        """Process export command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            formatter_class=argparse.ArgumentDefaultsHelpFormatter,
            prog="export",
            description="Export dataset to Excel",
        )

        parser.add_argument(
            "-n",
            "--name",
            dest="name",
            help="The name of the dataset you wish to export",
            type=str,
        )

        export_group = parser.add_mutually_exclusive_group(required=True)
        export_group.add_argument(
            "-f",
            "--file",
            dest="file",
            help="The name of the file you wish to export to",
            type=str,
        )
        export_group.add_argument(
            "-t",
            "--type",
            help="The file type you wish to export to",
            dest="type",
            choices=common_model.file_types,
            type=str,
            default="xlsx",
        )

        if other_args and "-" not in other_args[0][0]:
            other_args.insert(0, "-n")
        ns_parser = self.parse_known_args_and_warn(
            parser, other_args, export_allowed=NO_EXPORT
        )

        if ns_parser:
            if not ns_parser.name or ns_parser.name not in self.datasets:
                console.print("Please enter a valid dataset.")
            else:

Review comment (suggestion):
The `--help`, `-h` flags do not work now.

The way that this works across the rest of the Terminal is: `command --export filename.xlsx`, or `command --export xlsx`.  The main difference here is that the dataset must be selected as a choice, and the command name is called `export`.  There should, however, only be one argument which covers both situations, with a way to write to a specific `--sheet-name`.

```
(🦋) /econometrics/ $ export --help

usage: export [-n NAME] (-f FILE | -t {xlsx,csv}) [-h]
export: error: one of the arguments -f/--file -t/--type is required


(🦋) /econometrics/ $ export -h

usage: export [-n NAME] (-f FILE | -t {xlsx,csv}) [-h]
export: error: one of the arguments -f/--file -t/--type is required
```


Code after:
                self.files.append(alias)
                self.datasets[alias] = data
                self.update_runtime_choices()
                self.update_loaded()

    @log_start_end(log=logger)
    def call_export(self, other_args: List[str]):
        """Process export command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            formatter_class=argparse.ArgumentDefaultsHelpFormatter,
            prog="export",
            description="Export dataset to Excel",
        )

        parser.add_argument(
            "-n",
            "--name",
            dest="name",
            help="The name of the dataset you wish to export",
            type=str,
        )

        export_group = parser.add_mutually_exclusive_group(required=False)
        export_group.add_argument(
            "-f",
            "--file",
            dest="file",
            help="The name of the file you wish to export to",
            type=str,
        )
        export_group.add_argument(
            "-t",
            "--type",
            help="The file type you wish to export to",
            dest="type",
            choices=common_model.file_types,
            type=str,
            default="xlsx",
        )

        if other_args and "-" not in other_args[0][0]:
            other_args.insert(0, "-n")
        ns_parser = self.parse_known_args_and_warn(
            parser, other_args, export_allowed=EXPORT_ONLY_RAW_DATA_ALLOWED
        )

        if ns_parser:
            if not ns_parser.name or ns_parser.name not in self.datasets:
                console.print("Please enter a valid dataset.")
            else: