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

Merge CSV files into one EXCEL file with different sheets with Python

I have multiple CSV files and I want to move them to one excel file with different sheets. So, I am looking to add each CSV file to a sheet of excel. If there are 3 CSV files, it should be one Excel file with 3 sheets, and sheet names must be the…
codewithawais
  • 551
  • 1
  • 6
  • 25
0
votes
1 answer

xlsxwriter does not apply format to the header row in xlsx file instead applies formatting to empty cells

I have a xlsx file, for all of its sheet I need to change the formatting of the header row to apply background color to it. But when I am adding fomratting to the row, instead of the columns which contain my data, it gets applied to all other empty…
Himanshu Poddar
  • 7,112
  • 10
  • 47
  • 93
0
votes
0 answers

How do use local variables when passing in strings from a text file?

I'm using xlsxwriter to build an excel sheet. I'd like to have a text file that contains formulas I can iterate through. Instead of writing the formula_line to output.xlsx, I want formula_line to pick up row_as_str to complete the formula before it…
0
votes
1 answer

How to download excel file that is generated by xlsxwriter in browser with using fastapi?

I am using xlsxwriter for python to generate excel files. The file is generated in my root folder. I want to download the file with the browser when the url is hit. I am using the following code. import xlsxwriter workbook =…
0
votes
1 answer

Merge cells using python

In the process of a loop that Reads each workbook (I have like 4 separate excel files), and copy each column, cell by cell, to the new spreadsheet, Could not get the formatting for the title which was merged cells and centered AND the line/cell…
Poptropica
  • 21
  • 4
0
votes
1 answer

Quotation issues while writing formulas in xlsxwriter

I need to write SUMIFS formulas in Excel using xlsxwriter. I think this may be more of a quotations in strings question but I'm not sure. Example =SUMIFS('datasheet'!N:N,'datasheet'!D:D,'Sch B'!B:B,'datasheet'!J:J,"G") I took the documentation code…
0
votes
2 answers

Writing multiple sheets in same workbook using for loop

Scenario: Read an excel file with multiple sheets For each sheet at input read a few specific columns and manipulate the existing data Create an output dataframe Save this dataframe in one existing output file as a new sheet Below is the snippet…
RSM
  • 645
  • 10
  • 25
0
votes
1 answer

Is there a way to not show scientific notation in pandas for numeric values?

I queried my postgres database to retrieve information from a table: SQLResults = cursor.execute('SELECT x.some_12_long_integer from test as x;') Now when I run this query in database, I get 1272140958198, but when I dump this in a dataframe: The…
Fehr Faber
  • 35
  • 6
0
votes
1 answer

Put multiple pandas dataframes into one excel sheet in grid format

So, I have one very large Dataframe that is composed of over 70 smaller dataframes, of ten rows each. I want to use xlsxwriter to write them into an excel sheet; however, I want the dataframes to be displayed in a grid format, so that they do not…
0
votes
1 answer

Python Module is already installed but ModuleNotFound

I am still a beginner in Python. I use Jupyter Notebook and want to import XlsxWriter, but it doesnt seem to work. This is what I do in the Notebook which i usually open through the pycharm terminal: import numpy as np import pandas as pd import…
0
votes
1 answer

Loop over 2 lists to create seperate dfs from multiple excel worksheets

I've read in the below excel workbook which has 40 sheets. The below reads in all the worksheets: df = pd.read_excel(file_path, sheet_name = None) All the worksheets have identical columns, but the relevant columns start at different rows in each…
Tickets2Moontown
  • 117
  • 1
  • 10
0
votes
1 answer

Splitting Excel Data by Groupings into Separate Workbook Sheets

Background:I have a large 40MB XLSX file that contains client data which is Grouped over multiple levels, like so: Expanded - Not Expanded (sorry about the terrible dummy data!) - Objective:I would like to split Client A, B C etc... and all their…
William
  • 191
  • 5
  • 32
0
votes
2 answers

XlsxWriter how to set opening sheet

Currently I'm working on generating a calender in Python using XlsxWriter. I've created an Excel document with 52 sheets (1 for every week in a year). Generating the entire document works perfectly fine but when opening the document, it always opens…
DGBMenno
  • 77
  • 9
0
votes
1 answer

Write to multiple worksheets

I need to write to multiple sheets with sheets name stored in a list. Below is my code for row_num, obj in enumerate(list,1): sheet = workbook.add_worksheet(obj.Attribute1) sheet.write(row_num, 0, obj.Attr1) sheet.write(row_num, 1,…
0
votes
0 answers

File download function not working in Django views.py

[supporting.html] [supporting/urls.py] from django.urls import path from . import views urlpatterns =[ path('supporting/download/',views.download), ... …
leesuccess
  • 141
  • 10
1 2 3
99
100