Questions tagged [xlsxwriter]

XlsxWriter is a python module for creating Excel XLSX files

XlsxWriter is a Python module for creating Excel XLSX files.

It can be used to write text, numbers, and formulas to multiple worksheets and it supports features such as formatting, images, charts, page setup, autofilters, conditional formatting and many others.

This module cannot be used to modify or write to an existing Excel XLSX file.

1959 questions
0
votes
1 answer

format to bold a specific cell in a column by multiple condition using xlsxwriter

i got the following .xlsx file. I would like to enter the yellow marked string in bold in the following image. The condition is that there is a string in the "Name1" column and there must be no string in the "Name2" column -> then change the string…
mika
  • 173
  • 2
  • 16
0
votes
0 answers

how to display quarter column and its sub column after each quater based on month selection using xlsxwriter and django?

I want to display Quarter column (QTD) and its sub columns(BP,RE or RE(3+9) or RE(6+6) or RE(9+3),and Actuals) after each quarter based on month selection in date picker.Currently, QTD is displayed after each month.Now, I want to display it after…
Abin Benny
  • 125
  • 2
  • 10
0
votes
0 answers

Python filtering on a Excel table

Hi I am trying to figure out how to filter in an Excel table. import xlsxwriter import pandas as pd df = pd.DataFrame({'Region' : ['East', 'West', 'South', 'North'], 'Item' : ['Pear', 'Grape', 'Peach', 'March'], …
0
votes
0 answers

Save a workbook created with xlsx R package in AWS S3 is not working

I created a workbook, named workbook_1, using the xlsx R package, like this: workbook_1 = xlsx::createWorkbook() It has the next class: I need to upload this file to a bucket path in AWS, S3. I tried with this code that worked for me previously…
Valeria Arango
  • 287
  • 1
  • 2
  • 8
0
votes
0 answers

How to upload a workbook object created using xlsxwriter to google cloud storage using python

I have the working knowledge for uploading/creating objects in google cloud storage, but when trying to do same with Workbook created using xlxswriter it throws exception and won't allow to create object. Tried converting workbook to bytes/string as…
0
votes
1 answer

Change color of background with xlswwriter in an existing sheet

I want to change color of background with xlsxwritter : for row in range(rowCount, 200): if (row % 2) == 0: for col in range(10): worksheet.write_string(row, col, "", cell_format_odd) else: …
0
votes
1 answer

Transform lines from .txt file into .xls columns pandas

i have a text file that contains datas on lines like his: Total usage 2022-09-17T06:02:50+02:00 for vob "/Tmobile_Cro/TMobileCro" is 7868.0 Mb Total usage 2022-09-17T06:04:18+02:00 for vob "/XpressCM/SX-BASE" is 25265.7 Mb Total usage…
Champs
  • 121
  • 7
0
votes
1 answer

'Worksheet' object has no attribute 'set_column'

I am trying to auto adjust the length of every header in my dataframe while converting it to an excel file like the following: from pandas import ExcelWriter for k,v in final_1.items(): v.to_excel(writer, sheet_name=k, index=False) …
Rahul Sharma
  • 2,187
  • 6
  • 31
  • 76
0
votes
1 answer

Creating named range for with Python based on the string inside the cells

I am not really sure where to begin with this question. I know that I have two options for Pandas to_excel engines, either openpyxl or XlsxWriter. I'm new to both. I would like to created named range that will export to the Excel output based on the…
0
votes
2 answers

Python creating excel files

im trying to generate a excel while not deleting the user configuration. For example you can create here a new view. And save it. But when im reading the excel file with pandas or anything else and generate the excel 'the view' would be deleted. Is…
CodeoDE
  • 93
  • 6
0
votes
1 answer

pandas auto adjust column width upon file open xlsxwriter?

I have a pandas dataframe like below df1 = pd.DataFrame({'sfassaasfsa_id':…
The Great
  • 7,215
  • 7
  • 40
  • 128
0
votes
0 answers

XLSXwriter Filtering

Trying to filter a column, im doing multi value contains in my filter which works fine, how do I get this to hide anything that doesn't contain those names? (max_row, max_col) = df_routers.shape worksheet1.autofilter(0,0,max_row, max_col…
Calarian
  • 41
  • 4
0
votes
1 answer

Set_column breaks on date formats in xlsxwriter for python

I am a new python user and I am trying to understand why set_column and conditional_format work differently when I feel they should work the same. Here is an example of my code for set column. **Coloring does not work for dates** elif name == 'MTM…
ARE
  • 99
  • 9
0
votes
0 answers

How to set column to the Excel file generated in Python?

This is the project to compare two excel sheets and generate another excel file called Excel_diff.xlsx to show the difference. I have written the following script and I wish to set the width of Column A to 30 using a function called…
CJ. T
  • 1
  • 2
0
votes
1 answer

collapse columns not working with xlswriter Python

I try to group somes columns using xlswriter but it doesn't work. I tried the same with 'hidden' function and it's work. Works ( hide columns from the 90th to the 130 th) worksheet.set_column(90, 130, None, None, {'hidden': 1}) Doesn't…
Malou
  • 141
  • 8