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

Integrating using scipy.integrate.simps
Problems with django and virtualenv
Returning when any Future in a list finishes
Python Django - matching query does not exist when using pk
R translation to Python
Are there downsides to using Python locals() for string formatting? [duplicate]
Compiled Python writing to Program Files
How to synchronize multiple django settings to the DB?
simulate pulling marbles from a bag without replacement (efficiently)
Datetime string doesn't match after strftime() and strptime()
Pandas HDFStore Tables doesn't accept multiindex columns
Two lists, if a common match is found print another list element [closed]
Is it possible to permanently change a variable inside a Python script from the same script?
Tweepy: simple script with 'Bad Authentication data' error
def function python - Help me with syntax
After the installion of django-bootstrap-toolkit, to use the css class in bootstrap, but it didn't work

Categories

HOME
answer-set-programming
dynamics-crm
wmic
ncurses
qpython3
rocketmq
flyway
lotus-notes
lagom
data-analysis
squarespace
sendkeys
sql-tuning
reduction
ada
ios10.3
jive
excel-2010
jquery-waypoints
cgal
bitcoin-testnet
red-black-tree
graph-databases
ifstream
nsurlconnection
xamarin.uitest
mongoexport
common.logging
code-composer
sendgrid-templates
garrys-mod
keycode
build-process
nsfetchedresultscontrolle
picasa
gitweb
json-schema-validator
database-backups
ng2-material
squirrel
fps
codesign
spinlock
portfolio
test-class
self-hosting
divide-by-zero
viper-architecture
apache-mina
xaml-designer
guzzle6
word-2013
obfuscar
tilestache
errorprovider
funq
smartystreets
flash-cc
bignum
bigint
cdata
trimming
javascriptmvc
ftp4j
backbone-relational
shortcuts
fieldset
gdataxml
transitive-closure-table
linkedhashset
point-sprites
law-of-demeter
ajax.beginform
ou
printing-web-page
charts4j
sendfile
email-spec
delegatecommand
act
kpi
self-reference

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