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

How to get the 1st, 3rd and 5th element from an array in Python?
Unexpected unindent
Obscurity in “lambda” function in python
Having trouble getting “more like this” to return any results in Haystack using Elastic Search backend
Linear interpolation within groups
Is it possible to turn a widget [Kivy]
Want to create a thumbnail(25,25) of an Image of size (181,256) using python
python code to get values from json data
Math domain error when trying to graph equation of circle with polar coordinates in python
Converting base 6 to decimal and vice versa in Python? [closed]
Labelling Segments in Turtle
How to test that functools.partial produces the expected function object
Django CreateView Auto Login
Dictionary comprehension to build list of lists: referencing the current value for a key during comprehension
Python:Errno 22 Invalid argument
Class initialisation issue python

Categories

HOME
cil
ncurses
boost-thread
translation
smartphone
formal-verification
wms
cocos2d-x-3.0
computer-vision
pygame
ng-admin
android-viewpager
uiactivityviewcontroller
hosts
iso
public-key-encryption
viber
nuxt.js
multiple-monitors
riak-ts
apache-karaf
aptana
atlassian-plugin-sdk
chocolatey
primes
zoho
multicore
binutils
rworldmap
jquery-scrollify
bootstrap-typeahead
http-method
web-frontend
vcard
pentaho-report-designer
chrome-native-messaging
nesc
thinking-sphinx
vertex-buffer
pygooglechart
websauna
svnkit
fabric-digits
threshold
service-locator
precedence
vsts-package-management
liquid-xml
dql
declare
ntfs-mft
ical-dotnet
sendgrid-templates
mod-fcgid
windows-firewall
cgcontext
ruby-on-rails-2
forerunnerdb
mcrypt
iphone-developer-program
polar-coordinates
coremidi
vst
git-annex
tuxedo
database-backups
nssplitview
image-editing
fps
codesign
dac
logcat
sonarqube5.3
intellitest
apigee-baas
team-build
castle-windsor-3
apache-mina
adobe-indesign
java-melody
mser
ember-components
ogr2ogr
suffix-array
picat
ng-hide
leptonica
html-form-post
backbone-relational
appfog
phpsh
transitive-closure-table
mozart-mvc
cosm
hobo
goliath
phpcrawl
pantheios
drawtext
hadoop-plugins
communicationexception
mvvm-foundation
microsoft.ink
nt4
writing
divx

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