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

Using one PhantomJS browser for each worker rather than creating new instance for each URL in queue slows performance dramatically
Extract OneToOne Field in django model
In python solve for a matrix with restrictions
Setting up the EB CLI - error nonetype get_frozen_credentials
Saving a csv with excel so python can append rows correctly
PyCharm module importing stopped working properly (OS X)
string in index out of range grok learning
How to scrape a url having no of pages
Multiple foreign key fields in abstract Django class
How to convert the value_list to list in Django
Implicit Differentiation Sympy
Why does pygame stop working when I remove a print statement?
Interact with an interactive shell script on python
Need help connecting to SQL Server from Python Flask-Appbuilder
pyspark : Convert DataFrame to RDD[string]
Docker and single python file

Categories

HOME
crystal-reports
blockchain
webrtc
wms
google-sheets-api
ubuntu-12.04
phpstorm
flyway
quill
spring-cloud-contract
onenote-api
cpanel
viber
equalizer
spring-cloud-config
sql-tuning
pyyaml
jsonserializer
ejbca
statusbar
os161
pdfsharp
java-ee-7
widevine
mef2
dss
dpi
vegan
polymorphism
hashcat
readfile
magiczoomplus
viewgroup
knockout-3.0
microdata
facebook-chatbot
startapp
email-parsing
rapidweaver
ideone
seamless-immutable
shutdown
dwarf
volume
etherpad
butterknife
selenium-firefoxdriver
gmt
onresume
cjson
slam-algorithm
angularjs-ng-pattern
foxit
coordinate-transformation
except
galaxy
data-import
hyperthreading
ninject.web.mvc
matcaffe
uialertview
fabric-twitter
calibration
sparse-file
swift2.1
jazz
jython-2.7
utf-32
google-admin-audit-api
ogr2ogr
csplit
yahoo-boss-api
aquafold
mfmailcomposeviewcontroll
jstack
ksoap2
winrt-httpclient
visual-c++-2010-express
nimrod
trimming
localtime
android-contextmenu
tridion2009
moq-3
n-layer
pstree
responsetext
text-services-framework
visual-web-gui
supersized
nagle
sitemappath
external-assemblies
scala-2.8
graniteds
grooveshark
filetime
swfloader
gears

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