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
-1
votes
1 answer

How to convert MS Excel numbers in general format (e.g 43422) to date in python?

After fetching data from Excel to Python, the dates have been fetched into python as '43422' format. How do I convert this integer to date format in python now?
-1
votes
1 answer

How to write exact wordings of unicode characters into a file?

when I want to write "සිවු අවුරුදු පාටමාලාව" with the exact wording into a json file using python3.6, but instead \u0dc3\u0dd2\u0dc3\u0dd4\u0db1\u0dca\u0da7 \u0dc3\u0dd2\u0dc0\u0dd4 is written into the json file. I read an excel using xlrd and write…
erandi
  • 317
  • 1
  • 7
  • 18
-1
votes
1 answer

How to check if a header/footer exists in an excel sheet using xlrd/openpyxl or anyother package

I have a requirement where I need to check if header/footer exists in an excel page. If yes, I need to remove them. To remove I used openpyxl package and manipulated in a way that i copied the contents of excel to a new sheet and deleted the master…
-1
votes
1 answer

transpose row by row in excel using python

Is there any solution in python to transpose EXCEL multiple rows into one column and store it in the new Excel file,without DataFrame? COL1 COL2 COL3 A B C D E F G H I TRANSPOSE COL1 A COL1 D COL1 …
paul
  • 519
  • 6
  • 13
-1
votes
1 answer

How to extract data from excel in specific format & how to store in Database

I have excel file shown bellow from that i need to extract data in different format using python. so please help i tried the bellow code: import xlrd book = xlrd.open_workbook("excel.xlsx") sheet = book.sheet_by_index(0) year=[] # for print the…
-1
votes
1 answer

How do I extract variables that repeat from an Excel Column using Python?

I'm a beginner at Python and I have a school proyect where I need to analyze an excel document with information. It has aproximately 7 columns and more than 1000 rows. Theres a column named "Materials" that starts at B13. It contains a code that we…
-1
votes
1 answer

How to remove strange characters while using regex and xlrd module Python

I am trying to read the second column of an excel file using xlrd module. But the issue is the second column also has blank rows . I need to select only the values but not the rows . Below is my code for it: import xlrd import sys import…
Subhayan Bhattacharya
  • 5,407
  • 7
  • 42
  • 60
-1
votes
2 answers

python3 can't run tokenize

I run this program.Called [Keitaisokaiseki]. but I get the error Traceback (most recent call last): File "C:\Users\Mao\Desktop\形態素解析 ランキング(栃木県).py", line 23, in tokens = t.tokenize(val) File…
-1
votes
1 answer

Unicode-strings from xlrd

I'm trying to read some information from an excel-file using the xlrd-module. This works fine most of the time, but when the script encounters any scandinavian letters the script stops. I've been reading several posts about unicode and encoding, but…
-1
votes
1 answer

Comparing 2 imported python unicode lists from excel

I'm trying to compare 2 python unicode lists which are imported from an excel file to count their variables. This is my code import xlrd import tkFileDialog excel_file = tkFileDialog.askopenfilename(filetypes=[('excelfile', '*.xslx')], title =…
Iqbal Pratama
  • 139
  • 1
  • 5
  • 14
-1
votes
1 answer

get data behind " , " to take phrase by python

I want to get data in Column D behind " , " in the end of the sentence from left to right to get phrase in link bio: [1]:( http://prntscr.com/fye9hi) "here" Someone cant help me please .... This is my code but it cant go like i want. import xlrd…
-1
votes
1 answer

read and write in excel file with python

I am trying to read the cell of a excel file in python, change its value and save it. If I do not have the line from xlutils.copy import copy in code, it recognizes workbook.sheeets(), but otherwise it says AttributeError: 'Workbook' object has…
Pegah
  • 672
  • 2
  • 13
  • 23
-1
votes
1 answer

xlrd reading cell with text when empty

I don't understand why xlrd is reading a cell with value u'' as containing some text. All throughout the column it reads empty cells as having text although a couple of times it recognises as them not having it. If anyone has ever encountered this…
Antonia Calvi
  • 127
  • 1
  • 3
-1
votes
1 answer

Python Xlrd to import .xslx Template, the use Openpyxl to Edit and Re-save .xslx File

I have an .xslx file with specific formatting and objects that I am using for reports that I plan on producing on a large scale using Python. I originally was openpyxl to load a copy of the template (openpyxl.load_workbook()), write a Pandas…
Abootman
  • 63
  • 1
  • 10
-1
votes
1 answer

how to delete excel rows using python

I want to delete top 20 rows from my excel sheet.Please suggest the solution.Tried many methods as mentioned below but not working.Installed all openpyxl ,xlrd so please help workbook = xlrd.open_workbook('myfile.xlsx') worksheet =…
Gouri
  • 1
  • 2
  • 7