I am trying to do something like grabbing all values in each cell while they are referencing one by one. Maybe an example help illustration.
Example:
| A | B | C | 
|---|---|---|
| =B2 | ='I am' & C2 | 'Peter | 
Example2 - in term of number:
| A | B | C | D | 
|---|---|---|---|
| =B2 | =C2*D2 | 12 | 56 | 
So I want to get a concat string 'I am Peter' or 672 (from 12*56) when I reading the cell A2
Code I tried:
from openpyxl import load_workbook
import pandas as pd
wb = load_workbook(filename = 'new.xlsx')
sheet_names = wb.get_sheet_names()
name = sheet_names[0]
sheet_ranges = wb[name]
df = pd.DataFrame(sheet_ranges.values)
print(df)
The formula will become 'NaN'
Any suggestion to achieve it? Thanks!