如何导出结果到蟾蜍的Excel不同的标签进行数据分析? [英] How to export the result into different tabs of Excel in Toad for Data Analyst?

查看:237
本文介绍了如何导出结果到蟾蜍的Excel不同的标签进行数据分析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何从多个查询结果导出到使用自动化报告蟾蜍数据分析师同一Excel工作簿的不同表?
谢谢

Does anyone know how to export results from more than one query into different sheets of the same Excel workbook using the report automation in TOAD for data analyst? Thank you

推荐答案

我不知道你能做到这一点与蟾蜍自动,但有一个小窍门,你可以用Excel做的。

I'm not sure that you can do that with Toad automatically but there is a little trick that you can do with Excel.

写第一个查询和蟾蜍执行它,在查询结果数据网格,右击后选择导出数据集...,在Excel格式中选择Excel的实例,然后单击确定。它会打开Excel和从查询中添加一个表的数据。

Write first query and execute it in Toad, after that right click on query result data grid and choose "Export dataset...", under Excel format choose "Excel instance" and click OK. It will open Excel and add one sheet with data from your query.

重复同样的过程,第二个查询,它会添加其他片相同的文件,并填写与来自第二查询数据。

Repeat same process for second query and it will add another sheet to same document and fill with data from second query.

在你执行的​​所有查询,并把它添加到Excel中保存Excel文档。

After you executed all queries and added it to Excel save excel document.

如果你想完全自动地做到这一点,还有另一种解决方案,你可以用它来创建与装入来自不同查询的数据多张纸单Excel文档。购买第三方PL / SQL包,ORA_EXCEL。

If you want to do that completely automatically, there is another solution which you can use to create single Excel document with multiple sheets which are loaded with data from different queries. Purchase the third party PL/SQL package, ORA_EXCEL.

下面的例子是如何做到这一点:

Here is example how to do that:

BEGIN  
    ORA_EXCEL.new_document;  

    ORA_EXCEL.add_sheet('Employees');  
    ORA_EXCEL.query_to_sheet('select * from employees');  

    ORA_EXCEL.add_sheet('Departments');  
    ORA_EXCEL.query_to_sheet('select * from departments', FALSE);  

    ORA_EXCEL.add_sheet('Locations');  
    ORA_EXCEL.query_to_sheet('select * from locations');  

    -- EXPORT_DIR is an Oracle directory with at least  
    -- write permission  
    ORA_EXCEL.save_to_file('EXPORT_DIR', 'example.xlsx');  
END;

它可以生成Excel文件,并将其存储到Oracle目录,或者你可以得到生成Excel文件到PL / SQL BLOB变量,因此你可以将其存储到表或创建自己的过程中分发文件一样把它发送到电子邮件。

It can generate Excel file and store it to Oracle directory, or you can get generated Excel file into PL/SQL BLOB variable so you can store it to table or create your own process to distribute file like sending it to email.

更多细节,你可以找到产品的文档/示例页面: http://www.oraexcel.com/examples

More details you can find on products documentation/examples page: http://www.oraexcel.com/examples

干杯

这篇关于如何导出结果到蟾蜍的Excel不同的标签进行数据分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆