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

Insert image in Excel using xlwt in GAE

I tried: sheetLoopParam.insert_bitmap(os.path.abspath("static/PLL_diagram2_small.bmp"), 12, 0) but it says: IOError: [Errno 13] file not accessible: 'C:\Users\rest_of_path\static\PLL_diagram2_small.bmp' The path it displays is correct, I don't…
carlosgg
  • 321
  • 1
  • 3
  • 8
0
votes
1 answer

Python xlwt module, hide grid

I'm trying to hide grid on successfully generated .xls with 2 sheets included. I read the xlwt doc and among other properties that can be set on xlwt-related objects, there is show_grid function included. I was trying following, but it doesn't…
Mali Makh
  • 33
  • 6
0
votes
1 answer

Python: Import graphic into to Excel and export whole sheet as EPS

For a current project I need advanced access to Excel via Python. I found the xlwt project on http://www.python-excel.org/ that allows me to create Excel files and store data into the cells. That's fine. Unfortunately I need also the following…
grisu48
  • 18
  • 2
0
votes
1 answer

number of columns in xlwt worksheet

I can't seem to find a way to return the value of the number of columns in a worksheet in xlwt.Workbook(). The idea is to take a wad of .xls files in a directory and combine them into one. One problem I am having is changing the column position…
gm70560
  • 140
  • 11
0
votes
1 answer

xlwt can't parse IF statement in formula

i'm trying to write a formula to a series of cells by building the string. for instance i want to display the word "true" in a cell if the corresponding cell in column G contains the word "monkey" in it. for rowi in range(totalRows): thisRow =…
Brobot
  • 43
  • 1
  • 5
0
votes
4 answers

How to delete an existing worksheet in excel file using xlutils, xlwt, xlrd with python

I tried to search many places but dit not see any example snippet of code about how to delete an existing worksheet in excel file by using xlutils or xlwt with python. Who can help me, please?
JinFy
  • 9
  • 1
  • 1
  • 3
0
votes
2 answers

Python xlutils copies over incorrect year

I've written a script that changes values for a certain date in an excel sheet. When I create a new excel file using copy, it copies everything over correctly except for the year portion of the date. For example, it will go from 4/5/2012 to…
westbyb
  • 171
  • 5
  • 15
-1
votes
1 answer

Pull data from a json and create an excel file with the data

I'm trying to write a python script to: Grab a JSON file. Pull specific header from the json file. (couldn't figure this out) Create the headers in the excel file as columns. Parse through the json and put the data in the appropriate column. I'm…
-1
votes
2 answers

Add int value in a cell of excel file from python code

My excel file contains multiple sheets, I am trying to add value(int:5) in cell("C5") in sheet("sheet_1") of excel file("testexcel.xlsx"). I tried many ways, but none of the functions are able to edit the excel file. Excel File either gets corrupted…
Ash
  • 63
  • 8
-1
votes
2 answers

xlwt writing excel file python problem

So I have to two separate lists of data, wordlist and digitlist. And both sets have related sets of data so wordlist[1] is related to digitlist[1]. The data sets are shown below: seglist = ['aaa111', 'bbb222', 'ccc333'] wordlist = ['aaa', 'bbb',…
kr21
  • 5
  • 1
  • 4
-1
votes
3 answers

Converting string to float with "," as thousands separator.. "123,000.12" to 123,000.12

I can't perform any math operations on these values that I had exported. I'm using xlwt library to do this. Any way to convert these values in the format so that I can be able to perform math operations on it.
Marcus
  • 15
  • 1
  • 5
-1
votes
1 answer

i've gone throug various questions but my case is different in excel sheet auomation

I need a program to take input from an xlsv file and modify them according to the requirements and them that modified output should be printed in another excel sheet Up to now, I've done by giving input manually p=input ("Enter ingredients") q=input…
-1
votes
1 answer

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

I can run it as a python script,but it's wrong after used pyinstaller. Anyone knows,Thanks! Errorlog shows: File "test_func.py", line 130, in merged self.worksheet.write_merge(j[0], j[1], idx, idx, value) File…
Henry
  • 1
  • 1
-1
votes
1 answer

Python excel generation failing in windows

Below code is working fine in Unix and while trying to make it work in windows it's failing - I am trying to create excel after joining multiple csv files in a directory . Tab names in excel should be the csv filename - Below is the code def…
Pratik Rudra
  • 37
  • 1
  • 7
-1
votes
1 answer

Excel file is corrupted

After read and write an excel file using python modules xlrd and xlwt, my excel file is corrupted. I faced following prompt while opening using excel 2016. But, the file is opening perfectly in google sheets... The error excel 2016 throwing…