销售查询

from streamlit_option_menu import option_menu
import pandas as pd
import streamlit as st
from st_aggrid import AgGrid
from st_aggrid.grid_options_builder import GridOptionsBuilder
from st_aggrid.shared import ColumnsAutoSizeMode
from st_aggrid import GridOptionsBuilder, AgGrid, GridUpdateMode
import streamlit.components.v1 as components

custom_css = {
    ".ag-row-hover": {"background-color": "#98FB98 !important"},
    ".ag-row-odd": {"background-color": "#FFF8DC"},
    ".ag-row-even": {"background-color": "#D2B48C"},
    ".ag-root-wrapper": {"border": "3px solid #98FB98"},
    ".ag-header": {"background-color": "#2c2d30"},
    ".ag-status-bar": {"background-color": "#232323"},
    ".ag-right-cols-container": {"background-color": "#98FB98"},
    ".ag-side-buttons": {"background-color": "#2c2d30"},
    ".ag-paging-panel": {"background-color": "#98FB98"},
    ".ag-root": {"background-color": "#98FB98"},
    ".ag-cell-focus .ag-cell-value": {"background-color": "#4895ef !important"},
    ".ag-root": {"background-color": "#98FB98"},
    ".ag-cell-focus .ag-cell-value": {"background-color": "#4895ef !important"},
    ".ag-row-selected": {"color": "#4895ef !important"},
    ".ag-theme-streamlit": {'transform': "scale(0.8)", "transform-origin": '0 0'}
}

components.iframe("https://www.mixdiy.com/",650,800)


df = pd.read_excel(r"C:\Users\1\Downloads\ab.xls")

#gb = GridOptionsBuilder.from_dataframe(df, min_column_width=100)
#AgGrid(df, gridOptions=gb.build(), fit_columns_on_grid_load=True)

other_options = {'suppressColumnVirtualisation': True}
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_pagination(paginationAutoPageSize=True)
gb.configure_grid_options(**other_options)
gridOptions = gb.build()
AgGrid(df,gridOptions,columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS,custom_css=custom_css)
hide_streamlit_style = """
                        <style>
                        #MainMenu {visibility: hidden;}
                        footer {visibility: hidden;}
                        </style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)