Obtaining the Name, Type, and Size of an Uploaded File

  • Last update:April 14, 2025
  • Overview

    Version

    Report Server VersionFunctional Change
    11.0/

    Function Description

    In data entry reports, you can use formulas to obtain the name, type, and size of a file uploaded by a file widget.

    FunctionNotes
    filename(file)Returns the file name.
    filetype(file)Returns the file type.
    filesize(file)Returns the file size.

    The type of the returned value by each formula is an array, regardless of how many files are uploaded.

    iconNote:

    1. You can only use these functions for files uploaded by file widgets. Files stored in the database are not supported.

    2. These functions do not support simulation calculation. For details about simulation calculation, see section "Operator Syntax."

    Example

    filename(file)

    You can use this function to obtain the file name. The parameter file represents the cell number where the file widget is located.

    Create a template, add a file widget to cell B2, and enter =filename(B2) in cell C2. Select Data Entry Preview, click the file widget, and upload a PNG file. The following figure shows the effect.

    filetype(file)

    You can use this function to obtain the file type. The parameter file represents the cell number where the file widget is located.

    Enter =filetype(B2) in cell D2 of the template created in the former step. Select Data Entry Preview, click the file widget, and upload a PNG file. The following figure shows the effect.

    filesize(file)

    You can use this function to obtain the file size with the unit of KB. The parameter file represents the cell number where the file widget is located.

    Enter =filesize(B2) in cell E2 of the template created in the former step. Select Data Entry Preview, click the file widget, and upload a PNG file. The following figure shows the effect.

    Template Download

    For details, you can download the template Getting the Name, Type, and Size of an Uploaded File.cpt.

    Attachment List


    Theme: Data Entry
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy