xlrd package¶
Submodules¶
xlrd.biffh module¶
-
xlrd.biffh.biff_count_records(mem, stream_offset, stream_len, fout=<open file '<stdout>', mode 'w'>)[source]¶
-
xlrd.biffh.biff_dump(mem, stream_offset, stream_len, base=0, fout=<open file '<stdout>', mode 'w'>, unnumbered=False)[source]¶
-
xlrd.biffh.hex_char_dump(strg, ofs, dlen, base=0, fout=<open file '<stdout>', mode 'w'>, unnumbered=False)[source]¶
-
xlrd.biffh.unpack_cell_range_address_list_update_pos(output_list, data, pos, biff_version, addr_size=6)[source]¶
xlrd.book module¶
-
class
xlrd.book.Book[source]¶ Bases:
xlrd.biffh.BaseObject-
biff2_8_load(filename=None, file_contents=None, logfile=<open file '<stdout>', mode 'w'>, verbosity=0, use_mmap=1, encoding_override=None, formatting_info=False, on_demand=False, ragged_rows=False)[source]¶
-
biff_version= 0¶
-
codepage= None¶
-
colour_map= {}¶
-
countries= (0, 0)¶
-
datemode= 0¶
-
encoding= None¶
-
font_list= []¶
-
format_list= []¶
-
format_map= {}¶
-
load_time_stage_1= -1.0¶
-
load_time_stage_2= -1.0¶
-
name_and_scope_map= {}¶
-
name_map= {}¶
-
name_obj_list= []¶
-
nsheets= 0¶
-
palette_record= []¶
-
style_name_map= {}¶
-
user_name= u''¶
-
xf_list= []¶
-
-
class
xlrd.book.Name[source]¶ Bases:
xlrd.biffh.BaseObject-
binary= 0¶
-
book= None¶
-
builtin= 0¶
-
complex= 0¶
-
func= 0¶
-
funcgroup= 0¶
-
macro= 0¶
-
name= u''¶
-
name_index= 0¶
-
raw_formula= ''¶
-
result= None¶
-
scope= -1¶
-
vbasic= 0¶
-
xlrd.compdoc module¶
-
class
xlrd.compdoc.CompDoc(mem, logfile=<open file '<stdout>', mode 'w'>, DEBUG=0)[source]¶ Bases:
object
xlrd.formatting module¶
-
class
xlrd.formatting.Font[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
bold= 0¶
-
character_set= 0¶
-
colour_index= 0¶
-
escapement= 0¶
-
family= 0¶
-
font_index= 0¶
-
height= 0¶
-
italic= 0¶
-
name= u''¶
-
outline= 0¶
-
shadow= 0¶
-
struck_out= 0¶
-
underline_type= 0¶
-
underlined= 0¶
-
weight= 400¶
-
-
class
xlrd.formatting.Format(format_key, ty, format_str)[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
format_key= 0¶
-
format_str= u''¶
-
type= 0¶
-
-
class
xlrd.formatting.XF[source]¶ Bases:
xlrd.biffh.BaseObject-
alignment= None¶
-
background= None¶
-
border= None¶
-
font_index= 0¶
-
format_key= 0¶
-
is_style= 0¶
-
parent_style_index= 0¶
-
protection= None¶
-
xf_index= 0¶
-
-
class
xlrd.formatting.XFAlignment[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
hor_align= 0¶
-
indent_level= 0¶
-
rotation= 0¶
-
shrink_to_fit= 0¶
-
text_direction= 0¶
-
text_wrapped= 0¶
-
vert_align= 0¶
-
-
class
xlrd.formatting.XFBackground[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
background_colour_index= 0¶
-
fill_pattern= 0¶
-
pattern_colour_index= 0¶
-
-
class
xlrd.formatting.XFBorder[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
bottom_colour_index= 0¶
-
bottom_line_style= 0¶
-
diag_colour_index= 0¶
-
diag_down= 0¶
-
diag_line_style= 0¶
-
diag_up= 0¶
-
left_colour_index= 0¶
-
left_line_style= 0¶
-
right_colour_index= 0¶
-
right_line_style= 0¶
-
top_colour_index= 0¶
-
top_line_style= 0¶
-
-
class
xlrd.formatting.XFProtection[source]¶ Bases:
xlrd.biffh.BaseObject,xlrd.formatting.EqNeAttrs-
cell_locked= 0¶
-
-
xlrd.formatting.fmt_bracketed_sub()¶ sub(repl, string[, count = 0]) –> newstring Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
xlrd.formula module¶
-
xlrd.formula.decompile_formula(bk, fmla, fmlalen, fmlatype=None, browx=None, bcolx=None, blah=0, level=0, r1c1=0)[source]¶
xlrd.info module¶
xlrd.licences module¶
Portions copyright © 2005-2009, Stephen John Machin, Lingfo Pty Ltd All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. None of the names of Stephen John Machin, Lingfo Pty Ltd and any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
xlrd.sheet module¶
-
class
xlrd.sheet.Cell(ctype, value, xf_index=None)[source]¶ Bases:
xlrd.biffh.BaseObject-
ctype¶
-
value¶
-
xf_index¶
-
-
class
xlrd.sheet.Colinfo[source]¶ Bases:
xlrd.biffh.BaseObject-
bit1_flag= 0¶
-
collapsed= 0¶
-
outline_level= 0¶
-
width= 0¶
-
xf_index= -1¶
-
-
class
xlrd.sheet.Hyperlink[source]¶ Bases:
xlrd.biffh.BaseObject-
desc= None¶
-
fcolx= None¶
-
frowx= None¶
-
lcolx= None¶
-
lrowx= None¶
-
quicktip= None¶
-
target= None¶
-
textmark= None¶
-
type= None¶
-
url_or_path= None¶
-
-
class
xlrd.sheet.MSODrawing[source]¶ Bases:
xlrd.biffh.BaseObject
-
class
xlrd.sheet.MSObj[source]¶ Bases:
xlrd.biffh.BaseObject
-
class
xlrd.sheet.MSTxo[source]¶ Bases:
xlrd.biffh.BaseObject
-
class
xlrd.sheet.Note[source]¶ Bases:
xlrd.biffh.BaseObject-
colx= 0¶
-
rich_text_runlist= None¶
-
rowx= 0¶
-
show= 0¶
-
text= u''¶
-
-
class
xlrd.sheet.Rowinfo[source]¶ Bases:
xlrd.biffh.BaseObject-
additional_space_above¶
-
additional_space_below¶
-
has_default_height¶
-
has_default_xf_index¶
-
height¶
-
height_mismatch¶
-
outline_group_starts_ends¶
-
outline_level¶
-
xf_index¶
-
-
class
xlrd.sheet.Sheet(book, position, name, number)[source]¶ Bases:
xlrd.biffh.BaseObject-
book= None¶
-
cell_note_map= {}¶
-
col_label_ranges= []¶
-
colinfo_map= {}¶
-
default_additional_space_above= None¶
-
default_additional_space_below= None¶
-
default_row_height= None¶
-
default_row_height_mismatch= None¶
-
defcolwidth= None¶
-
gcw= (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)¶
-
has_pane_record= 0¶
-
horizontal_page_breaks= []¶
-
horz_split_first_visible= 0¶
-
horz_split_pos= 0¶
-
hyperlink_list= []¶
-
hyperlink_map= {}¶
-
merged_cells= []¶
-
name= ''¶
-
ncols= 0¶
-
nrows= 0¶
-
rich_text_runlist_map= {}¶
-
row_label_ranges= []¶
-
rowinfo_map= {}¶
-
split_active_pane= 0¶
-
standardwidth= None¶
-
vert_split_first_visible= 0¶
-
vert_split_pos= 0¶
-
vertical_page_breaks= []¶
-
visibility= 0¶
-
xlrd.xldate module¶
-
exception
xlrd.xldate.XLDateAmbiguous[source]¶ Bases:
xlrd.xldate.XLDateError
-
exception
xlrd.xldate.XLDateBadDatemode[source]¶ Bases:
xlrd.xldate.XLDateError
-
exception
xlrd.xldate.XLDateBadTuple[source]¶ Bases:
xlrd.xldate.XLDateError
-
exception
xlrd.xldate.XLDateNegative[source]¶ Bases:
xlrd.xldate.XLDateError
-
exception
xlrd.xldate.XLDateTooLarge[source]¶ Bases:
xlrd.xldate.XLDateError
-
xlrd.xldate.xldate_as_datetime(xldate, datemode)[source]¶ Convert an Excel date/time number into a datetime.datetime object.
xlrd.xlsx module¶
-
class
xlrd.xlsx.X12Book(bk, logfile=<open file '<stdout>', mode 'w'>, verbosity=False)[source]¶ Bases:
xlrd.xlsx.X12General-
tag2meth= {u'sheet': <function do_sheet at 0x7fdfbd83a9b0>, u'definedNames': <function do_defined_names at 0x7fdfbd83a938>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}definedNames': <function do_defined_names at 0x7fdfbd83a938>, u'workbookPr': <function do_workbookpr at 0x7fdfbd83aa28>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}sheet': <function do_sheet at 0x7fdfbd83a9b0>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}workbookPr': <function do_workbookpr at 0x7fdfbd83aa28>}¶
-
-
class
xlrd.xlsx.X12SST(bk, logfile=<open file '<stdout>', mode 'w'>, verbosity=0)[source]¶ Bases:
xlrd.xlsx.X12General
-
class
xlrd.xlsx.X12Sheet(sheet, logfile=<open file '<stdout>', mode 'w'>, verbosity=0)[source]¶ Bases:
xlrd.xlsx.X12General-
tag2meth= {u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}row': <function do_row at 0x7fdfbd999140>, u'row': <function do_row at 0x7fdfbd999140>}¶
-
-
class
xlrd.xlsx.X12Styles(bk, logfile=<open file '<stdout>', mode 'w'>, verbosity=0)[source]¶ Bases:
xlrd.xlsx.X12General-
tag2meth= {u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}numFmt': <function do_numfmt at 0x7fdfbd83ad70>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}cellXfs': <function do_cellxfs at 0x7fdfbd83acf8>, u'cellXfs': <function do_cellxfs at 0x7fdfbd83acf8>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}xf': <function do_xf at 0x7fdfbd83ade8>, u'xf': <function do_xf at 0x7fdfbd83ade8>, u'cellStyleXfs': <function do_cellstylexfs at 0x7fdfbd83ac80>, u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}cellStyleXfs': <function do_cellstylexfs at 0x7fdfbd83ac80>, u'numFmt': <function do_numfmt at 0x7fdfbd83ad70>}¶
-
-
xlrd.xlsx.cell_name_to_rowx_colx(cell_name, letter_value={u'1': 0, u'3': 0, u'2': 0, u'5': 0, u'4': 0, u'7': 0, u'6': 0, u'9': 0, u'8': 0, u'A': 1, u'C': 3, u'B': 2, u'E': 5, u'D': 4, u'G': 7, u'F': 6, u'I': 9, u'H': 8, u'K': 11, u'J': 10, u'M': 13, u'L': 12, u'O': 15, u'N': 14, u'Q': 17, u'P': 16, u'S': 19, u'R': 18, u'U': 21, u'T': 20, u'W': 23, u'V': 22, u'Y': 25, u'X': 24, u'Z': 26})[source]¶
-
xlrd.xlsx.get_text_from_si_or_is(self, elem, r_tag=u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}r', t_tag=u'{http://schemas.openxmlformats.org/spreadsheetml/2006/main}t')[source]¶ Returns unescaped unicode