Questions tagged [xlrd]

xlrd is a python library to extract data from Microsoft Excel spreadsheet files

xlrd is a python library to extract data from Microsoft Excel spreadsheet files.

xlrd can extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform, is written in pure Python and is Unicode-aware.

1366 questions
-2
votes
1 answer

Error reading excel file using XLRD and Python

I'm reading from an excel file every 30 seconds using XLRD. However I keep getting error messages from XLRD... File "C:\Users\Administrator\Desktop\New Folder\final_30sec.py", line 22, in odds book = open_workbook('excel.xls') File…
DavidJB
  • 2,272
  • 12
  • 30
  • 37
-2
votes
4 answers

Is it possible to push data from Excel sheet using Python into a database?

I have a requirement where using Python I need to write into excel cell , the data which i will be collecting from web page. But not getting an option how to do that. any idea from you people? As per @Marcin comments here is the more clear…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
-3
votes
0 answers

convert formula to value in xls file using python in linux OS

Does anybody know how to convert formula to value in xls file using python ? openpyexcel cannot process xls files and all the online resources are pointing to use of win32 module which cannot be used in a Linux Env.
-3
votes
1 answer

How to set the text color in an Excel cell via?

I knew how to set the color of a cell, but now ,what I need is to set color of the text,not the whole cell
Mcu
  • 11
  • 1
  • 3
-3
votes
1 answer

Code is not running when i try to compare two sheets using xlrd in python

I am trying to compare two sheets from my excel and list the row that is not matching from sheet1 using xlrd in python. Sheet1: Name Gender Age John M 30 Moses F 28 Sheet2: Name Gender Age John M 30 Moses F 29 import…
-3
votes
1 answer

How i can convert a list to a dictionary in python 3.4

How i can convert a list of, >> print(row) >> [text:'Data 1', text:'Data 27'] # this is list but i want a dic to something like >> print(row) >> {'text':'Data 1', 'text':'data 27'} # this is how i want my list to be i tried like every possible…
Ayyoub
  • 4,581
  • 2
  • 19
  • 32
-3
votes
2 answers

python xlrd, read from last sheet in a workbook

I am writing a code which should compare values from 2 xls files. One of the files has more than 1 sheet and I always have to read the data only from the last sheet. I really don't know how manage with this. Below is my code: #!…
-3
votes
1 answer

Problems whith columns in Python xlrd

I am a Python Beginner and I'm trying to make a script to sum all values in a column of a excel spereadsheet, and then write this value. I'm using xlrd and xlwt python packages. It works well for the first columm, but it doesn't works to the second…
-4
votes
1 answer

Python else condition prints several times

Here I wrote the following code to search for headers from an excel sheet, it can search for the headers, but for each successful iteration, it prints success separately and also same for the error. for i in sheet_data: if (i[0] == "BN")…
sami
  • 10
  • 2
-4
votes
1 answer

Search for a specific string in excel sheet with number of index Python

Here I want search in an excel sheet with several strings where the excel sheet contains more than one index. If any one of the index of excel file contains those strings then it have to print true. for i in sheet_data: if search_string= "string1"…
Learner
  • 23
  • 1
  • 8
-4
votes
1 answer

how to extract rows from excel file

I have an excel file. How can I extract data so that in python it looks like: list = [['Igor', '20', 'SSU]'], ['Sergay', '19', 'SSTU'], ['Nadya', '21', 'SSAU']] using import xlrd
-4
votes
3 answers

get Header in excel file

My excel data looks like this: A B C 1 RAM 53.44 576 2 MOHAN 74.34 345 3 KISHAN 76.65 285 How can I extract headers contents from spreadsheets?
soheshdoshi
  • 594
  • 3
  • 7
  • 24
-4
votes
1 answer

Copying a column from a csv file to a xls file

I am trying to copy a column from a csv file to a spreadsheet in an excel file. However, for some reason the values from csv files aren't getting copied in the spreadsheet. The program compiles without any errors and all the statements are getting…
user3262537
  • 127
  • 1
  • 1
  • 7
-4
votes
1 answer

Using python and xlrd to a word in excel sheet and output sentence to txt file

I'm wondering how to use xlrd with python to find a specific word in an excel file and then output the sentence that contains that word.
Haldamir
  • 115
  • 2
  • 10
-5
votes
2 answers

Can't read xlsx file in python

code: import pandas as pd import os dirname = 'D:\SYun\BigData\DataScience-master\DataScience-master\data' filename = '05. draw_korea_raw.xlsx' path = os.path.join(dirname, filename) f = pd.read_excel(path) print(f) error: raise…
zoai
  • 1
  • 1
  • 1
  • 2
1 2 3
91
92