Questions tagged [xlutils]

xlutils allows you to copy and modify Excel files writing Excel 2003 files.

xlutils is based on and and allows for modifying (not in place, complete files are written) Excel files. It is limited by the underlying libraries and therefore can read Excel 2007, but cannot write that format (.xlsx, .xlsm).

Documentation: http://pythonhosted.org/xlutils/

88 questions
21
votes
1 answer

python xlutils : formatting_info=True not yet implemented

I've got simple code to copy files with xlutils, xlrd, xlwt (downloaded new libraries from python-excel.org) with not loosing formatting. I've got an error as below: from xlwt.Workbook import * from xlwt.Style import * from xlrd import…
user1891854
  • 211
  • 1
  • 2
  • 4
8
votes
1 answer

Format individual characters in a single Excel cell with python

I am using xlrd, xlwt, and xlutils on the Windows Vista OS with Python 2.7. I have a set of DNA sequences in an excel worksheet that are 100 characters long, with each sequence in a single cell. I am trying to highlight characters at specific…
Brett Hanson
  • 83
  • 1
  • 4
7
votes
1 answer

Python Excel (xlrd, xlwt) - How to copy a style from one cell and put it on another

Specifically I'm trying to open an existing workbook, and write some data to it. However whenever I write the data it obliterates the borders on those cells. So I'm wondering if there's a way to copy the style of that cell before writing to it and…
Greg
  • 45,306
  • 89
  • 231
  • 297
7
votes
1 answer

Python Excel template read and re-write, maintaining formulae and formatting

I've run the gamut and can't seem to find what I'm looking for. All threads I found here end up in dead ends for me. xlrd, xlwt, and xlutils almost do what I need, but… The basic idea is that I need to use Python to write simple data (strings) to a…
user2141817
  • 71
  • 1
  • 1
  • 3
5
votes
1 answer

datemode error using xlutils

I am trying to modify Excel files using Python, but I can't get the xlutils package to work correctly. When I try an example (from this thread): from xlutils.copy import copy w =…
user3265339
  • 51
  • 1
  • 3
4
votes
2 answers

ValueError: row index was 65536, not allowed by .xls format

Currently, I am trying to edit an existing excel file using xlwt. I do not want to edit directly on the excel, so I first make a copy. new_wb = xlutils.copy(file_location) From this copy, I used the xlwt module to write a new column into the newly…
Brian Kim
  • 65
  • 1
  • 2
  • 8
4
votes
1 answer

How can I edit Excel Workbooks using XLRD or openpyxl while preserving charts?

I have a workbook that has some sheets in it. One of the sheets has charts in it. I need to use xlrd or openpyxl to edit another sheet, but, whenever I save the workbook, the charts are gone. Any workaround to this? Is there another python…
rocket_raccoon
  • 187
  • 3
  • 9
4
votes
3 answers

In python removing rows from a excel file using xlrd, xlwt, and xlutils

Hello everyone and thank you in advance. I have a python script where I am opening a template excel file, adding data (while preserving the style) and saving again. I would like to be able to remove rows that I did not edit before saving out the new…
user2105494
  • 51
  • 1
  • 1
  • 3
3
votes
3 answers

python : Get Active Sheet in xlrd? and help for reading and validating excel file in Python

2 Questions to ask: Ques 1: I just started studying about xlrd for reading excel file in python. I was wondering if there is a method in xlsrd --> similar to get_active_sheet() in openpyxl or any other way to get the Active sheet…
dollardhingra
  • 303
  • 4
  • 14
3
votes
3 answers

Deleting Entire blank row in an existing Excel Sheet using Python

How to remove the entire blank row from the existing Excel Sheet using Python? I need a solution which DOES NOT : Include reading the whole file and rewriting it without the deleted row. IS THERE ANY DIRECT SOLUTION?
Jd16
  • 387
  • 1
  • 3
  • 11
3
votes
2 answers

Write to a specific Excel worksheet using python

I want to overwrite specific cells in an already existing excel file. I've searched and found this answer, writing to existing workbook using xlwt. I've applied it as the following, def wrtite_to_excel (self): #first I must open the…
Dania
  • 1,648
  • 4
  • 31
  • 57
3
votes
1 answer

create a copy of xlsx file having all formula's within removed

can't copy xlsx and xlsm files with xlrd as it says "formatting info= True" not yet implemented and openpyxl runs out of memory when doing the following: import xlrd from xlutils.copy import copy from openpyxl import load_workbook if file_format ==…
gaurav gurnani
  • 2,789
  • 3
  • 19
  • 18
3
votes
0 answers

python xlrd/xlwt create new workbook using sheets from 2 different workbooks preserving formatting

First let me explain my terminology. An Excel workbook has sheets. E.g. a new Excel workbook contains by default 3 sheets. Now, using xlrd, xlwt and xlutils, my purpose is to output a new workbook (say: file3) with as input 3 sheets from file1 and 1…
Jellema
  • 1,912
  • 1
  • 12
  • 15
3
votes
1 answer

xlutils.copy [python 2.7 - excel]

I'm new to python (and to programming in general). I am having a problem using xlrd, xlwt and xlutils for accessing an xlsx workbook (it is a common question but i did not find any solution for me). Should I change my package for py-excel? In that…
Krasto
  • 41
  • 4
3
votes
3 answers

Accessing worksheets using xlwt 'get_sheet' method

I would like to access worksheets of a spreadsheet. I've copied the main workbook to another workbook using xlutils.copy(). But don't know the right way to access worksheets using xlwt module. My sample code: import xlrd import xlwt from…
user2001139
  • 49
  • 1
  • 2
  • 7
1
2 3 4 5 6