Entering content frameProcess documentation Using the Spreadsheet Interface Locate the document in its SAP Library structure

Purpose

The spreadsheet interface allows you to load data from the R/3 System into a spreadsheet and return it from the application to the R/3 System. The desktop office application must support this interface (see the method has_spreadsheet_interface).

Prerequisites

You must create the instance document for document management before you can use the interface.

Process flow

1. Declare an instance with reference to the interface i_oi_spreadsheet.

DATA spreadsheet TYPE REF TO i_oi_spreadsheet.

2. Use the method get_spreadsheet_interface on the document instance for document management to create the instance for the spreadsheet interface.

3. Use the spreadsheet interface methods:

Methods of the Spreadsheet Interface

Method

Function

get_active_sheet

Active worksheet

get_dimension

Size of a range

get_protection

Protection of a range

get_sheets

Existing worksheets

get_ranges_data

Data in particular ranges

get_ranges_name

Names of existing ranges

get_cell_format

Format of a particular cell

get_cell_formats_table

Format of a set of cells

get_selection

Selection within a worksheet

get_selected_areas

Multiple selections within a worksheet

select_range

Selects a range

set_selection

Selects any area within a worksheet

select_sheet

Activates a worksheet

set_color

Changes the colors

set_font

Changes the font

set_format

Changes the format

set_format_string

Changes the format (only in Microsoft Excel)

set_frame

Changes the line format

set_ranges_format

Changes the format of a set of ranges

cell_format

Changes the format of a cell

protect

Protects worksheet

protect_range

Protects a range

add_sheet

Adds a worksheet to the current workbook

set_sheet_name

Sets the name of a worksheet

delete_sheet

Deletes a worksheet

insert_range_dim

Adds a range

change_range

Changes a range

insert_range

Inserts a range at the selected point

insert_one_table

Inserts a data table into a range

set_ranges_data

Inserts data into a range

clear_range

Deletes a range

clear_all_ranges

Deletes the contents and formatting of all ranges

delete_content_ranges

Deletes the contents of all ranges

delete_ranges

Deletes all of the range definitions

hide_columns

Hides columns

show_columns

Shows columns

hide_rows

Hides rows

show_rows

Shows rows

set_hierarchy

Sets a hierarchy in the worksheet

set_hierarchy_table

Sets multiple hierarchies in the worksheet

clear_hierarchy

Clears the hierarchies in the worksheet

print

Prints a worksheet

set_zoom

Change the zoom

fit_widest

Adjust the column width

screen_update

Switches the screen update on or off

load_lib

Loads an additional DLL that can improve performance

version

Returns the version of the spreadsheet interface

Note

Remember that you should include error handling after each method call.

Note

Any parameters not contained in the individual method descriptions are listed under Generic Parameters.

 

 

Leaving content frame