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
0 answers

How to set the 'Angle of first slice' on a doughnut chart in Python openpyxl

How to set the 'Angle of first slice' on a doughnut chart in Python openpyxl? For a simple doughnut chart like: chart = DoughnutChart() labels = Reference(WorkSheet, min_col=1, min_row=2, max_row=5) data = Reference(WorkSheet, min_col=1,…
Mattman85208
  • 1,858
  • 2
  • 29
  • 51
0
votes
1 answer

Can't create custom labels with XlsxWriter

I am trying to add custom data Labels into a "column chart" with the XlsxWriter version: 1.2.1. No matter what, it never displays custom labels but always the current values. Like this chart with current values: I already tried to copy some example…
Vladzzz
  • 31
  • 7
0
votes
0 answers

Xlsxwriter clear filter in protected sheet

Im trying for hours to find out how to enable clearing the filter with xlsxwriter in a protected sheet. Microsoft says that it won't work, but there are macros in VBA which are allowing it to do. Since we are in python I wanted to ask if someone…
CodeoDE
  • 93
  • 6
0
votes
2 answers

How to export a Dataframe to Excel with divider lines using XlsxWriter

I would like to export my df to excel using xlswriter but with format depending on the value of specific cells ie i have a df that look like that : Date Data1 data2 01/01/1979 50.0. 10.0 01/01/1979 50.0. 11.0 02/01/1979 50.0. 11.0 02/01/1979 50.0.…
0
votes
2 answers

How to export Excel from Pandas with custom style - alternate row colors - xlsxwriter

I'm looking in the XLSXwriter documentation but I can't find a simple way to export dataframes to excel according to the format I use. I tried the code below. However, it is changing the values ​​instead of just formatting. My code with Foo…
Andre Nevares
  • 711
  • 6
  • 21
0
votes
2 answers

Merge Multiple Excel Files when there is missing ones

I'm trying to merge three different workbooks (one sheet in each one) into a single one, transforming each in a new sheet. Code works like a charm when there is 'a', 'b, and 'c', but sometimes there won't be one or two of the three files, and I…
0
votes
1 answer

Change angle of gradient chart bars in xlxswriter

Hi how do I change the angle of the angle in the bars - is there an option like 'angle' : 90?
0
votes
1 answer

How to make the content written to Excel in a loop not overwritten by the previous one

Extract data from multiple word tables and write them into the same sheet in Excel. path = 'folder path' worddocs_list = [] for filename in os.listdir(path): wordDoc = Document(path+'\\'+filename) worddocs_list.append(wordDoc) writer =…
lalala
  • 3
  • 1
0
votes
1 answer

how can i have conditional formatting for a graph if the bar number is negative and another colour for positive bar? xlxswriter

Hi I am looking for a way to do a conditional formatting for a graph if the number is negative and another positive. Is this possible to do with xlxswriter in python
0
votes
2 answers

How do I group by the outcome and severity header in xlsxwriter

can anybody help me categorize the header of outcome and severity to show the FAIL and HIGH values highlighted in red at the top while the rest will be in descending order using xlsxwriter. I really can't understand how the structure works. To an…
Ahsu21
  • 21
  • 4
0
votes
0 answers

How to use looping to Autofit columns for a different workbooks using python

I've a master sheet contains some data for many departments employees, i tried to use python for extracting every department data in another single sheet with a specific format. i've tried after a long searching and working on the below code to do…
Mahmoud Badr
  • 61
  • 2
  • 8
0
votes
0 answers

XlsxWriter - How to write a string on a specific sheet

I would like to create an excel file where one of the sheets is filled with calculated values and titles that are associated with them that would look like this : In my case I have already inserted 2 previous worksheets that are files with a df…
Mikel Alba
  • 25
  • 5
0
votes
1 answer

How count duplicates in one file and output it beautiful Python

I have data with 3 columns. I need to compare this fields and if they are similar count them. If they are not similar then output information. I need to get this1. In below I put my code, but it doesn't count right and I don't know how to do this…
0
votes
0 answers

xlsxwriter set_custom_property to an existing workbook without creating a new one

To my understanding, xlsxwriter can only create new workbooks, not modify existing ones--or can it? I would like to simply add some custom properties to an already-existing workbook by using the workbook.set_custom_property()…
likethevegetable
  • 264
  • 1
  • 4
  • 17
0
votes
1 answer

Python xlsxwriter. Header_format sub-property of columns parameter not working as expected

I need to set a table header in Excel with the next date format: 'mmm-yy'. Formatting I've set: title_date_format = workbook.add_format({ 'text_wrap': True, 'font_size': 11, 'num_format': 'mmm-yy' }) Column settings: column_settings =…
EugLP
  • 33
  • 5