Skip to content

BUG: pandas.read_excel方法,在读取有公式的格子时,读取值为0 #54551

Open
@wangxiya

Description

@wangxiya

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

pandas.read_excel(
            'test.xlsx'
            , sheet_name=0
            , header=None
            , usecols='A:E'
            , skiprows=1
            , names=['A', 'B', 'C', 'D', 'E']
        )

Issue Description

当excel文件中含有公式时,则对应格子的值,在dataframe中是0

Expected Behavior

openpyxl.load_workbook(file_name , data_only=True)
才能解决读取excel时,将公式计算的结果提取出来
建议将loadexcel的参数,加入read_excel方法中

Installed Versions

pandas v2.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions