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

Python comparing integers and using if
pandas dataframe reshape / pivot
Avoiding “Too broad exception clause” warning in PyCharm
Built-in data types of python
How does one install librets on Mac OSX Yosemite?
Unhashable type error trying to pass list to function in python
Similarity Measure/Matrix for data (recommender system)- Python
How can you add movement to shapes in pygame?
Extract integer from list using python
Having trouble using “in” function to check for containment of one array in another
Getting next two indexes regardless of current index
How to apply custom maya manipulator with user defined context
Issue with parsing a function in Python (optionally with pyparsing)
Function that iterates through a linked list
convert pandas dataframe column to np.datetime64
How can I embed django code in html?(pagination)

Categories

HOME
arrays
spring
ssas-2012
reverse-engineering
warnings
webrtc
csvhelper
dropbox
ssr
equalizer
uisplitviewcontroller
titan
phpbb
session-timeout
google-api-java-client
backpropagation
scalaz7
cocoa-touch
iup
source-maps
cronet
net-snmp
rhmap
web-frontend
edge-detection
cgal
dpi
weinre
ivy
twitter-bootstrap-2
pljson
transient
rhino
windows-10-iot-core
wfp
vsts-package-management
xamarin.uitest
sonarqube-scan
jquery-multidatespicker
soundjs
twiki
lexical-analysis
html-agility-pack
tango
chunked-encoding
jags
livefyre
decompress
fontconfig
quintus
opencpu
rxvt
autoresize
laravel-query-builder
coremidi
cfeclipse
multiple-file-upload
qregexp
pagekit
squirrel
gradle-release-plugin
distribute
asynccallback
throughput
direct3d12
affix
unity5.3
graphical-logo
pylearn
shift-jis
hg-git
pl-i
jai
django-1.6
utf-32
alphablending
ultrawingrid
jstat
ember-addon
mfmailcomposeviewcontroll
zipalign
opensocial
edit-in-place
modeshape
osx-snow-leopard
nimrod
astyanax
nscolor
surveyor-gem
transitive-closure-table
zend-framework-modules
radchart
wcf-web-api
getstring
responsetext
hinstance
associative
collect
server-error
clause
pantheios
handheld
data-execution-prevention

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App