Skip to content

Instantly share code, notes, and snippets.

@Ratheshprabakar
Created April 1, 2021 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ratheshprabakar/4c8c86ba8787738a95e7653aeb94eda2 to your computer and use it in GitHub Desktop.
Save Ratheshprabakar/4c8c86ba8787738a95e7653aeb94eda2 to your computer and use it in GitHub Desktop.
def view():
test_append = str(request.form['folder_name'])
session['test_append']=test_append
teacher_name = str(session.get('user'))
excel_dir = APP_ROOT+"/excel/"+test_append+"/"+teacher_name+"/"
excel_date = request.form['fname']
time = request.form['ftime']
time = time[:2]
print(time)
final_excel=glob(excel_dir + "/" + excel_date+ "@" + time +"*.xlsx")[0]
print(final_excel)
df = pd.read_excel(final_excel)
df.index += 1
return render_template("files.html",msg=final_excel,df=df,date=excel_date+"@"+time+"hrs")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment