PB export data Excel format dw2xls

Source: Internet
Author: User

PB export data Excel format dw2xls

Use the dw2xls Control

Syntax

Uf_save_dw_as_excel (DW, filename)

Parameters

DW a reference to the datawindow object
Filename a string whose value is the name of the file you want to create. If filename is not on the operating system's search path, you must enter the fully qualified name.

Return Value

Integer. Returns 1 if it succeeds and-1 if an error occurs.

Example

integer li_retli_ret = uf_save_dw_as_excel(dw_1, 'c:\doc\report.xls')if li_ret = 1 then   //success   //...else   //fail   //...end if

My actual example

 

First, migrate dw2xls

 

Interface

Related code

Export result

 

What's more

 

Uf_save_dw_as_excel_parm () function

Converts datawindow into Excel file. Allows to specify some options for process of converting.

Syntax

Uf_save_dw_as_excel_parm (DW, filename, parm)

Parameters

DW a reference to the datawindow object
Filename a string whose value is the name of the file you want to create. If filename is not on the operating system's search path, you must enter the fully qualified name

Parm a reference to the n_dwr_service_parm object which contain a set of parameters for process of converting

Return Value

Integer. Returns 1 if it succeeds and-1 if an error occurs.

Example

 

// Export using parametersinteger condition = create condition = false // skip header band has no header line lnvo_parm.ib_summary = false // skip summary band lnvo_parm.ib_footer = false // skip footer band Limit = false/ /skip all group headers lnvo_parm.ib_group_trailer = false // skip all group trailers li_ret = uf_save_dw_as_excel_parm (dw_1, 'C: \ doc \ report.xls ', lnvo_parm) If li_ret = 1 then // success //... else // fail //... end if

The test is not successful. The version may be incorrect.
Is_header_text does not have this method

// adding a header to generated XLSinteger li_retn_dwr_service_parm lnvo_parmlnvo_parm = create n_dwr_service_parmlnvo_parm.is_header_text = "Report"lnvo_parm.ib_header_font_underline = Trueli_ret = uf_save_dw_as_excel_parm(dw_1, 'c:\doc\report.xls', lnvo_parm)if li_ret = 1 then   //success   //...else   //fail   //...end if

 

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.