An Oracle form method for importing report data to excel

Source: Internet
Author: User

Currently, after you print a report in pdf format in Oracle form, you cannot modify the data. Therefore, you plan to import the data in the report to an Excel table, however, make sure that the Excel format is exactly the same as the report format designed in the report. My strategy is as follows:

1. in Excel, design the document templates to be output in the future based on the reports. Pay attention to the strict consistency with the reports during the design process, including the Row Height, column width, number of columns, Title name, font size, and so on. 2. save the designed template as an XML file. 3. design a Java applet to read text files line by line, add some form code and write it into another text file, that is, quickly generate program code; form calls the built-in function text_io.putf to build XML files row by row. 4. Copy the generated program code in segments to the appropriate position in the program. Here, pay attention to the uncopied program text snippets and the location in the program. 5. the program will compress the generated xls file to Facilitate network transmission and download to the local, so that you can directly open the XML file in Excel, because the format is set in XML, therefore, a complete Excel file is displayed. 6. Considering that the report has the paging function, I set the print title in the Excel page settings and save it as an XML template. Note: because the number of rows in the final Excel table is changed and cannot be determined, you must delete the row attribute (SS: expandedrowcount) related to sheet in the XML template, otherwise, if the actual number of rows is greater than the number of rows set here, an error will be reported when you open the Excel file.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.