Oracle SQL Developer 查询结果导出向导默认输出文件名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29513527/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:48:32  来源:igfitidea点击:

Oracle SQL Developer query result Export Wizard default output file name

sqloracleoracle-sqldeveloper

提问by Matt

In Oracle SQL Developer when you right click into a query result and select export it brings up the Export Wizard.

在 Oracle SQL Developer 中,当您右键单击查询结果并选择导出时,它会显示导出向导。

After selecting the format you want (in this case .xls) the default save as target is (for me)C:\Documents and Settings\XXXXX\export.xls

选择您想要的格式(在本例中为 .xls)后,默认另存为目标是(对我而言)C:\Documents and Settings\XXXXX\export.xls

What i would like is to change the default output file name from always being exportto something that is dynamic, a timestamp perhaps?

我想要的是将默认输出文件名从始终更改export为动态的名称,也许是时间戳?

I would even be happy to implement a 3rd part extension to handle this.

我什至很乐意实现第三部分扩展来处理这个问题。

采纳答案by Matt

As discovered this is not currently possible but is currently down as a feature request with Oracle to be implemented if it gets enough attention from users.

正如发现的那样,这目前是不可能的,但目前作为 Oracle 的一项功能请求,如果它得到用户的足够关注,就会被实施。

Feature request:

功能要求:

https://apex.oracle.com/pls/apex/f?p=43135:7:114031166834052::NO:RP,7:P7_ID:41561

https://apex.oracle.com/pls/apex/f?p=43135:7:114031166834052::NO:RP,7:P7_ID:41561

回答by glentos

I know this is an old thread but I was looking for an answer to this, and wanted to share some information for anyone else who comes along.

我知道这是一个旧线程,但我一直在寻找答案,并希望与其他任何人分享一些信息。

As far as I know you still can't set the exacttext of the file name or add a timestamp to it, but if you change the "Save As" setting in the Export Wizard window (this can be made permanent through the Tools - Preferences menu) to "Separate Files" then each export will be given a different file name in the specified folder automatically. This works even if the export is the same query. SQL Dev names each file "TABLE_EXPORT_DATA.xls" and will amend a number at the end after each export. So for example:

据我所知,您仍然无法设置文件名的确切文本或为其添加时间戳,但是如果您更改导出向导窗口中的“另存为”设置(这可以通过工具永久设置 -首选项菜单)到“单独的文件”,然后每个导出将在指定的文件夹中自动获得不同的文件名。即使导出是相同的查询,这也有效。SQL Dev 将每个文件命名为“TABLE_EXPORT_DATA.xls”,并将在每次导出后修改末尾的数字。例如:

TABLE_EXPORT_DATA_4.xls
TABLE_EXPORT_DATA_3.xls
TABLE_EXPORT_DATA_2.xls
TABLE_EXPORT_DATA_1.xls

TABLE_EXPORT_DATA_4.xls
TABLE_EXPORT_DATA_3.xls
TABLE_EXPORT_DATA_2.xls
TABLE_EXPORT_DATA_1.xls

回答by Phil Sumner

As @markleiber said, it isn't possible to change the default file name, but if you go to Tools/Preferences/Database/Utilities/Export/<Export Type>, you can change the default folder for this type of export.

正如@markleiber 所说,无法更改默认文件名,但如果您转到Tools/Preferences/Database/Utilities/Export/<Export Type>,则可以更改此类导出的默认文件夹。

You can also change default worksheet names and choose to include or remove headers for Excel format exports.

您还可以更改默认工作表名称并选择包括或删除 Excel 格式导出的标题。