Skip to content

Commit

Permalink
Update spreadsheet_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PointlessUser committed Aug 23, 2023
1 parent 25de466 commit 0aefac9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mecsimcalc/spreadsheet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def print_dataframe(

# if the file type does not match an alias of excel, convert the DataFrame to a csv file
else:
df.to_csv(buf, index=False)
csv_str = df.to_csv(index=False)
buf.write(csv_str.encode())
buf.seek(0)

encoded_data = "data:text/csv;base64," + base64.b64encode(buf.read()).decode()
Expand Down

0 comments on commit 0aefac9

Please sign in to comment.