[Streamlit] [Handle Excel with file in merged cell ]

Summary

Dear team, can someone help me on streamLit please?

it’s brilliant and I love it.

But I have an excel file and which has sheet with merged cells , and this merged cells have a tar file inserted as an object i want to get the cell value name but it always shows as None. Can some one help please?

Steps to reproduce

Code snippet:

from openpyxl import Workbook,load_workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
import openpyxl

wb = Workbook()
ws = wb.active
lw = load_workbook
input_excel = open('some_excel.xlsx', 'rb')
workbook_read = load_workbook(filename=input_excel)

sheet_names = workbook_read.sheetnames


for sheet_name in sheet_names:
    sheet = workbook_read[sheet_name]
    merge_dict = {}
    merge_ranges = sheet.merged_cells.ranges
    for merged_cells_range in sheet.merged_cells.ranges:
        top_left_cell = merged_cells_range.start_cell
        cell_value = top_left_cell.value
        print(cell_value)

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.

Links

  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Hey @pandu_raju,

Thanks for sharing this question! Is this code snippet taken from a Streamlit app? It doesn’t look like Streamlit is used in the snippet