Maclean Liu(刘相兵 发表于 2012-5-1 13:26:39

The UPS and DOWNS of loading external data via APEX

The UPS and DOWNS of loading external data via APEX

Abstract
The APEX development environment provides powerful tools to enable one to upload and download data from Excel, Access and other file formats. This paper will demonstrate how to add this powerful upload functionality to your own APEX applications to enrich your user experience.
Introduction
An Oracle database can serve as a repository for all sorts of data including images, word processor documents, spreadsheets, videos and pretty much anything you can store on a computer. The developer has the choice of saving such files in a default table or a custom table. APEX also provides an easy means to exchange data using comma separated values (.csv) files that are readily viewed in spreadsheet applications such as Excel or .XML files that can carry all sorts of information and are visible to many different applications. Most of the details are readily available in APEX documentation and forum posts, so this paper will attempt to catalog APEX file upload and download techniques without providing every detail.
The basics
Creating tables from a spreadsheet
To get a quick start on your applications, use APEX’s import tools (Figure 1) to create tables and load data. If you can provide data in the form of a spreadsheet you can easily create a new table or populate an existing table.

Figure 1
Text data to be imported should be in comma separated values (.csv) or tab delimited. If the data is less than 30KB, you can simply copy and paste from a spreadsheet, otherwise save the spreadsheet as .csv. Next review and adjust the attributes Oracle suggests for you using the screen in Figure 2. A few more clicks and your table is built and loaded with data.

页: [1]
查看完整版本: The UPS and DOWNS of loading external data via APEX