Questions tagged [xlwt]

Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform.

xlwt is a Python library for modifying and generating spreadsheet files that are compatible with Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric.

xlwt does not (yet) support Excel 2007 (.xlsx, .xlsm) writing.

xlwt has full support for Unicode. Excel spreadsheets can be generated on any platform without needing Excel or a COM server. The only requirement is Python 2.3 or higher. xlwt is a fork of pyExcelerator.

http://pypi.python.org/pypi/xlwt

640 questions
4
votes
2 answers

Django/python and issues with xlwt locale formatting

I am using django-excel-view which uses django-excel-response which in turn uses xlwt. I have a scenario where users can switch locale which lets them view floats with a standard decimal point or in some languages a comma decimal point. When…
7wonders
  • 1,639
  • 1
  • 17
  • 34
4
votes
0 answers

How could I set up the height of cell to auto with Python xlwt

I would like to put the variable length text to an Excel file - some text are shorten, and another are longer. These cells are one above the other, so the width of cells are equal. I'm trying to do this: sheet.row(rownr).height = 0 with combination…
airween
  • 6,203
  • 1
  • 14
  • 20
4
votes
1 answer

Python xlwt - Convert column integer into excel cell references. Eg (3,6) to C6

I'm automating formula's using pythons XLWT library. I have column indexs, eg, 1,2,3,99, etc and would like to convert to A,B,C,D, AA,AB, etc. Is there anything built into xlwt for this? Or should I just write my own function?
Humphrey
  • 4,108
  • 2
  • 28
  • 27
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
1 answer

Python Excel date/time read in issue

I am trying to read dates/time off an excel sheet using Python, but I only want to read in the time so I can perform computations on it. For example if I have a date in the format: 3/11/2003 4:03:00 AM on my excel sheet how can I read in just the…
terence vaughn
  • 521
  • 2
  • 11
  • 23
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
4
votes
1 answer

text orientation on excel(individual cell) in python

I am trying to write some data on excel file, and want to keep first row text orientation as 90 degree. style = xlwt.easyxf('font: bold 0, color black, underline 0,height 250; alignment: horizontal left')
Deepak Dubey
  • 309
  • 1
  • 3
  • 12
4
votes
1 answer

How to read all text file contents in a folder and copy those contents as rows into one excel file

I have 100 txt files in a folder (named as pos). I would like to copy all the file contents and paste them as rows in an excel file. I found some codes from stackoverflow, but they are not working. Please help me. import xlwt import os import…
kevin
  • 1,914
  • 4
  • 25
  • 30
4
votes
1 answer

Change Int64Index to Index and dtype=int64 to dtype=object

I am trying to write pandas DataFrame and Series to xlwt Worksheet objects. All goes well except if I try to write numpy.int64 data, in which case xlwt gasps. Changing int64 to float64 in my data and single-level indexes is simple, but what would be…
dmvianna
  • 15,088
  • 18
  • 77
  • 106
4
votes
2 answers

right to left excel page layout in python xlwt

How can set the sheet layout ( right-to-left ) by using xlwt ? i am using xlwt for writing an excel sheet, but my data is right to left and i want to set sheet layout right to left ( same as microsoft excel's Page layout tab)
happy Sun
  • 579
  • 8
  • 15
4
votes
1 answer

Reading an Excel object retrieved using urllib2

I am getting an Excel file using urllib2 and saving into response below. I want to be able to process this excel file using xlrd or similar. I included some info below, let me know if I can provide more info. How can I have response object…
Ulas Keles
  • 1,681
  • 16
  • 20
4
votes
0 answers

Python xlwt module: Inserting images and controlling the dimensions

Are there other ways to insert images in an Excel worksheet other than worksheetName.insert_bitmap using Python xlwt module?
infoadmin12345
  • 211
  • 1
  • 4
  • 10
4
votes
1 answer

Are xlrd and xlwt compatible?

I'm trying to create a workbook with python and I need to test the values of different cells to fill it but I'm having some troubles. I use xlrd and xlwt to create and edit the excel file. I've made a little example of my problem and I don't…
Leo
  • 1,129
  • 4
  • 23
  • 38
4
votes
1 answer

writing mixed data from a .csv file to an .xls with xlwt - how to format numbers?

I'm trying to read a bunch of mixed data (strings & numbers) from a csv & write everything to an excel file. unfortunately, everything is written as text since in csv text is the only format. how can i write the numerical data in the correct format?…
Brobot
  • 43
  • 1
  • 5
3
votes
2 answers

Easily write formatted Excel from Python: Start with Excel formatted, use it in Python, and regenerate Excel from Python

I have to create Excel spreadsheet with nice format from Python. I thought of doing it by: I start in Excel as it is very easy to format: I write in Excel the model I want, with the good format I read this from Python I create from Python an Excel…
Exevior
  • 101
  • 1
  • 5