xlrd Questions

12

Solved

I'm currently using pandas to read an Excel file and present its sheet names to the user, so he can select which sheet he would like to use. The problem is that the files are really big (70 columns...
Malleolus asked 3/9, 2012 at 14:44

2

Solved

I have found some other questions that have a similar error to what I am getting, but have not been able to figure out how to resolve this based on the answers. I am trying to import an excel file ...
Banded asked 10/7, 2018 at 15:23

5

I have an xlsx file with 1 sheet. I am trying to open it using python 3 (xlrd lib), but I get an empty file! I use this code: file_errors_location = "C:\\Users\\atheelm\\Documents\\python excel m...
Correction asked 25/5, 2016 at 10:21

13

Solved

The new version of Pandas uses the following interface to load Excel files: read_excel('path_to_file.xls', 'Sheet1', index_col=None, na_values=['NA']) but what if I don't know the sheets that ar...
Garibald asked 31/7, 2013 at 17:57

13

Solved

I'm looking for the best approach for inserting a row into a spreadsheet using openpyxl. Effectively, I have a spreadsheet (Excel 2007) which has a header row, followed by (at most) a few thousand...
Quincey asked 25/6, 2013 at 14:0

7

Solved

I have two xlsx files as follows: value1 value2 value3 0.456 3.456 0.4325436 6.24654 0.235435 6.376546 4.26545 4.264543 7.2564523 and value1 value2 value3 0.456 3.456 0.4325436 6.24654 0.23546...
Sighted asked 9/5, 2016 at 10:14

6

Solved

I have to port an algorithm from an Excel sheet to python code but I have to reverse engineer the algorithm from the Excel file. The Excel sheet is quite complicated, it contains many cells in whi...
Eiffel asked 14/1, 2011 at 11:12

3

Solved

I can read an Excel file from pandas as usual: df = pd.read_excel(join("./data", file_name) , sheet_name="Sheet1") I got the following error: ValueError: Value must be either ...
Fife asked 8/2, 2023 at 14:57

4

I'm trying to read data from a .xlsx file into a MySQL database using Python. Here's my code: wb = openpyxl.load_workbook(filename="file", read_only=True) ws = wb['My Worksheet'] conn = MySQLdb....
Publicness asked 26/6, 2017 at 17:26

3

Solved

What is the conversion syntax to convert a successfully loaded xlrd excel sheet to a numpy matrix (that represents that sheet)? Right now I'm trying to take each row of the spreadsheet and add it ...
Soppy asked 11/1, 2015 at 23:1

24

Solved

My code: import xlrd wb = xlrd.open_workbook("Z:\\Data\\Locates\\3.8 locates.xls") sh = wb.sheet_by_index(0) print sh.cell(0,0).value The error: Traceback (most recent call last): File "Z:\Wi...
Callum asked 8/3, 2012 at 18:43

5

I'm aware of a number of previously asked questions, but none of the solutions given work on the reproducible example that I provide below. I am trying to read in .xls files from http://www.eia.g...
Attractant asked 2/11, 2015 at 3:7

10

Solved

I want to create a dictionary from the values, i get from excel cells, My code is below, wb = xlrd.open_workbook('foo.xls') sh = wb.sheet_by_index(2) for i in range(138): cell_value_class = sh....
Azalea asked 7/1, 2013 at 12:31

4

I've recently upgraded my Pandas version from 0.20.0 to 1.0.5 to be able to use the explode() function. Then when I tried reading an Excel file, it threw an error Pandas requires version '1.1.0' or...
Avan asked 10/7, 2020 at 12:9

2

Solved

I've been scouring the net to find a Python library or tool that can converts an Excel file to/from ODS format, but haven't been able to come across anything. I need the ability to input and outp...
Zayas asked 6/3, 2013 at 20:11

6

Solved

I'm looking to read in an Excel workbook with 15 fields and about 2000 rows, and convert each row to a dictionary in Python. I then want to append each dictionary to a list. I'd like each field in ...
Lardner asked 9/5, 2014 at 15:25

6

Solved

I am using xlrd to process Excel files. I am running a script on a folder that contains many files, and I am printing messages related to the files. However, for each file I run, I get the followin...
Simonasimonds asked 1/10, 2011 at 9:19

5

I was trying to run as ussually my library "pandas" but then I faced a mistake import pandas as pd DF_temp = pd.read_excel("example.xlsx") Output File "/opt/anaconda3/l...
Pitiable asked 12/8, 2020 at 2:41

1

Solved

Hello I'm trying to read an excel file 'myFile.xlsx' using datatable.fread (version 1.0.0) function to speedup data manipulation. The problem is I had an AttributeError: module 'xlrd' has no attrib...
Hamartia asked 19/11, 2021 at 13:56

1

I want to create an excel, which should have cell with multi-select dropdown. e.g. if a cell is given options = [a", "b", "c", "d", "e"]. Editor selects "a", then the value in cell should be "a". ...
Floccule asked 4/4, 2016 at 11:40

4

Solved

I am writing a python script to read data from an excel sheet using xlrd. Few of the cells of the the work sheet are highlighted with different color and I want to identify the color code of the ce...
Magnific asked 3/11, 2011 at 6:56

2

I want to process a large 200MB Excel (xlsx) file with 15 sheets and 1 million rows with 5 columns each) and create a pandas dataframe from the data. The import of the Excel file is extremely slow ...
Whom asked 20/4, 2019 at 22:30

8

Solved

I have been looking at mostly the xlrd and openpyxl libraries for Excel file manipulation. However, xlrd currently does not support formatting_info=True for .xlsx files, so I can not use the xlrd h...
Furan asked 21/5, 2013 at 18:12

8

Solved

I've an Excel File: Arm_id DSPName DSPCode HubCode PinCode PPTL 1 JaVAS 01 AGR 282001 1,2 2 JaVAS 01 AGR 282002 3,4 3 JaVAS 01 AGR 282003 5,6 I want to save a string in the form Arm_id,DSPCode,Pin...
Afresh asked 4/3, 2014 at 10:29

7

Solved

Question 1: How can I check if an entire .xls or .csv file is empty.This is the code I am using: try: if os.stat(fullpath).st_size > 0: readfile(fullpath) else: print "empty file" except OS...
Sybille asked 1/3, 2017 at 16:37

© 2022 - 2025 — McMap. All rights reserved.