Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Converting Bytes back to file in Python

$
0
0

please how to do i convert a sequence of bytes back to the original file in python(Excel file in my case)?

with open('excel.xlsx', 'rb') as file:content = file.read() This line of code returns a bytes object. After performing

some computations, i would like to turn the bytes returned back into the origninal excel file.

i tried using io.BytesIO(org_data) to convert back but no avail


Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>