Microsoft Excel devices

You can define devices that allow you to print reports to an MS Excel spreadsheet.

注意

Printing reports to an MS Excel device is not supported in WorkTop.

Defining a Microsoft Excel device

To create a Microsoft Excel device:

  1. Start the 设备数据 (ttaad3500m000) session.
  2. Add a device. The 设备数据 (ttaad3100s000) session starts.
  3. Complete these steps:
    1. Specify the name and description for the device.
    2. In the 设备类型 field, select 外部报表服务.
    3. Leave the 4GL Program empty.
    4. In the Argument field, specify -excel, optionally followed by other parameters. For example:
      • -excel

        Print the data to an Excel file. The file is stored in a folder on your computer. This folder is specified in the 路径 field. The filename has this format: [report name]_[company number]_[yyyymmdd-hhmmss].xlsx

        This is a sample filename: ttaad340001000_000_20130626-202842.xlsx

      • -excel -open

        Similar to -excel. The Excel file is automatically opened.

      • -excel -nodatetimestamp

        Similar to -excel. The Excel file has no date- and timestamp.

        The filename has this format: [report name]_[company number].xlsx

        This is a sample filename: ttaad340001000_000.xlsx

      • -excel -server

        Similar to -excel. The file is stored in a folder on the server. This folder is specified in the 路径 field.

    5. In the 路径 field, specify the folder where the Excel file will be stored.

      注意

      • If you use the -server option in the Argument field, specify a folder on the LN server. For example, /home/jdoe/tmp (Unix).
      • If you do not use the -server option in the Argument field, specify a folder on your computer. For example, c:\temp.
    6. Specify the remaining device properties and save the device. For details, see the online help of the 设备数据 (ttaad3100s000) session.
Printing reports to a Microsoft Excel device

To print a report to a Microsoft Excel device:

  1. Start the print session to which the report is linked.
  2. Print the report.

    Points of attention:

    • In the Device tab in the print session, select Advanced Device.
    • In the Printer tab in the 选择设备 (ttstpsplopen ) session, select the Microsoft Excel device.

    A flat file with all input fields of the report is generated.