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

Only ImportError when running file directly [duplicate]
Python Stringcompare
Unable to install packages using pip in virtualenv
Django Render function: template not printing variable
Fastest way to set a dictionary value in python when greater than current key value
Returning values from dictionary in python
How do I print a range of lines after a specific pattern into separate files when this pattern appears several times in an input file
Get more result from Github search
Python : Speed up Reverse DNS lookup
Clean way of structuring ctypes class
Django: How to setup Apache for a memory demanding application with very few users?
Animate a python pyplot by moving a point plotted via scatter
Get_all_values from Google Spreadsheet
Accelerating matplotlib figure update
Python not finding installed packages through pip on Linux
How to append 3D numpy array to file?

Categories

HOME
sas
udp
webrtc
jasmine
d
wms
command
bibtex
automated-tests
checksum
algorithmic-trading
file-io
android-viewpager
outlook-web-addins
qt-installer
typeahead
datagrip
sendkeys
rhapsody
ng-show
primes
zoho
plupload
cruisecontrol.net
apple-tv
binutils
header-files
tflearn
java-ee-7
hanami
fetch-api
pentaho-report-designer
cortex-m3
xor
freebase
pljson
google-drive-realtime-api
precedence
text-files
parse-android-sdk
initializer
topic-modeling
cross-entropy
flex4.5
distributed-transactions
pdftk
pytest-django
rich-text-editor
worker
nstouchbar
mouseclick-event
crystal-reports-8.5
jcreator
communication-protocol
keycode
verbose
cfeclipse
com-interop
nssplitview
mongoskin
image-editing
string-parsing
scriptlet
group-concat
fortran90
function-fitting
vips
code-readability
js-cookie
futuretask
paypal-nvp
pyrocms
manjaro
criteria-api
pylearn
google-hadoop
hiera
virus
django-1.6
jquery-autocomplete
snmp4j
sid
jstack
zipalign
initialization-vector
db4o
internal
operations
hamsterdb
trimming
threadx
ng-pattern
android-contextmenu
mozart-mvc
returnurl
sunspot-rails
pstree
rose-db-object
responsetext
hinstance
charts4j
zend-form-element
open-graph-beta
carbide
osx-leopard
rd

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