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

Two kivy Images in an BoxLayout
IOError: [Errno 2] No such file or directory, even though the file is existed
Get all objects from foreign key
Python HTMLParser - stop parsing
Interactive menu based exe in Python
How to get the rect() of a dynamic circle
Building logic gates
Return all tuple only from list
Reassign rows and columns in Python csv
How to check raw_input answers inside if-statements
how does one define a nullary function in python?
Sympy, plotting geometric entities yields either ImportError: no module named 'plot' or AttributeError: 'Circle' object has no attribute 'is_3D'
Select first row that meets certain condition
Splitting longer patterns using regex without losing characters Python 3+
Using python sdist to create a package that includes generated files in the build directory
Any elegant way to add a method to an existing object in python?

Categories

HOME
swift
semantic-ui
admin-on-rest
amazon-swf
blockchain
uibutton
deep-linking
jscript
rocketmq
orientation
phonegap-cli
histogrammar
quill
spring-cloud-contract
data-science-experience
sudo
qt-installer
rebol2
vs2017
nmf
onesignal
ab-initio
owl-api
i3
aurelia-binding
blackboard
bxslider
geomesa
sidr
openshift-enterprise
jboss-esb
mms
concrete5-5.7
nsexception
apiary
php-ews
floor
amazon-machine-learning
web-deployment-project
spell-checking
greenhills
pluck
google-maps-ios
mcrypt
autoresize
rsqlite
slam-algorithm
dojox.charting
kendo-combobox
spring-lemon
project-online
freefem++
handlebars.java
optionbutton
sem
anti-patterns
webhdfs
mptcp
base32
castle-windsor-3
digits
subversion-edge
low-level
chaining
moai
sysctl
named-ranges
em
sortable
log4cplus
roxygen
asp.net-mvc-scaffolding
sql-server-2012-web
multiple-login
appfog
prng
pascals-triangle
android-contextmenu
mozart-mvc
applicationcontext
maven-ant-tasks
goliath
collect
server-error
pivotal-crm
gethashcode
asp.net-routing
msf
associativity

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