python


python: converting corrupt xls file


I have downloaded few sales dataset from a SAP application. SAP has automatically converted the data to .XLS file. Whenever I open it using Pandas library I am getting the following error:
XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '\xff\xfe\r\x00\n\x00\r\x00'
When I opened the .XLS file using MSEXCEL it is shows a popup saying that the file is corrupt or unsupported extension do you want to continue when I clicked 'Yes' its showing the correct data. When I saved the file again as .xls using msexcel I am able to use it using Pandas.
So, I tried renaming the file using os.rename() but it dint work. I tried opening the file and removing \xff\xfe\r\x00\n\x00\r\x00, but then also it dint work.
The solution is to open MSEXCEL and save the file again as .xls manually, is there any way to automate this. Kindly help.


Related Links

Purpose of pyVim within pyVmomi
Formatting string to certain character limit in Python
Python Django return unique save dates and filter model objects
Moved time zones now datetime.utcnow() is incorrect
Pybind11 Type Error
Problems with the screen manager of Kivy Python
python selenium get asp-classic element
pip install requirements.txt issue when deploying Django app on Heroku
How to run a Python shell in azure app service
When does Python decode a byte string while reading a file?
Wordnet synset - strange list index out of range Error
python subprocess, No such file or directory
c mmap write long to mmaped-area
ModelForm has no model class specified when use model forms
python scipy load mat file error
How can i make a time counter using QTime()

Categories

HOME
sharepoint
dotnetrdf
angular-cli
wildcard
zend-framework2
couchdb-2.0
apache2
rebol
bro
schemacrawler
avl-tree
currency
gimp
goutte
pca
vuex
powershell-v3.0
xamarin-studio
android-source
uiscrollview
public-key-encryption
nuxt.js
cratedb
multiple-monitors
mod-pagespeed
lenskit
chocolatey
jsonserializer
plupload
distance
tortoisegit
rails-activerecord
hhvm
go-cd
npm-install
pdfsharp
scalajs-react
data-cleansing
geopandas
ab-initio
cgal
partial-application
jackson-dataformat-csv
ios-ui-automation
threshold
autocompletetextview
discord.net
mongoexport
freetts
agent
alchemy.js
ddms
react-native-router-flux
crop
archer
drawingarea
defold
jags
crystal-reports-8.5
rpostgresql
info
search-box
python-hypothesis
pdflib
pydio
aescryptoserviceprovider
freetype2
django-filer
linkageerror
nssplitview
achievements
picking
financial
usb-drive
except
galaxy
void
vips
evo
programming-paradigms
visual-studio-code
ibm-data-studio
lexicographic
pgagent
cloudpebble
ogr2ogr
bsp
lumx
magic-numbers
exiv2
cling
confusion-matrix
dllexport
cgpath
cbcentralmanager
socketstream
mpmovieplayer
jpf
galaxy-tab
gethashcode
exitstatus
graph-layout
castle-validators
gears
writing





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android


MS Developer
developer works
python
ios
c
html
jquery


RDBMS discuss