I have The states below which are being called with Input(‘submit-button_table’, ‘n_clicks’)] button,
and the first 2 outputs are executed,
but the issue is that my 2nd input [Input(‘btn_xlsx’, ‘n_clicks’),
and the 3rd output Output(‘download-dataframe-xlsx’, ‘data’)], # download excel
are being called when I press on the 1st Input submit-button_table as well, altogether.
How to set my download excel Output to get called only when I press on Input(‘btn_xlsx’, ‘n_clicks’)
@app.callback(
[Output('table','columns'), # 1st Output, excel columns
Output('table', 'data'), #2nd Output, excel table
Output('download-dataframe-xlsx', 'data')], #3rd Output, download
#excel
[Input('btn_xlsx', 'n_clicks'), #2nd Input, click on download
Input('submit-button_table', 'n_clicks')], #1st Input, click submit
#for the states below to call
[State('symbol', 'value'),
State('yes_no', 'value'),
State('my_date_picker_table', 'start_date'),
State('my_date_picker_table', 'end_date'),
State('delete', 'value'),
State('percentage', 'value'),
State('points', 'value')],
prevent_initial_call=True,
)