excel

Index Enumeration doesn't seem to be operating properly. Where am I messing up?

Index Enumeration doesn't seem to be operating properly. Where am I messing up? Question: I’m trying to figure out how to enumerate an index properly into specified cells on an Excel spreadsheet using Python. Following a tutorial video, I thought I had it figured out, but it doesn’t seem to be pulling each index value …

Total answers: 1

Merge all excel files into one file with multiple sheets

Merge all excel files into one file with multiple sheets Question: i would like some help. I have multiple excel files, each file only has one sheet. I would like to combine all excel files into just one file but with multiple sheets one sheet per excel file keeping the same sheet names. this is …

Total answers: 1

Error concatenating specific sheet from multiple workbooks into one df

Error concatenating specific sheet from multiple workbooks into one df Question: I am trying to separate out a specific sheet from about 300 excel workbooks and combine them into a single dataframe. I have tried this code: import pandas as pd import glob import openpyxl from openpyxl import load_workbook pd.set_option("display.max_rows", 100, "display.max_columns", 100) allexcelfiles = …

Total answers: 1

Python Openpyxl – Append many excel files into 1 file

Python Openpyxl – Append many excel files into 1 file Question: I have 10 Excel files (they have same number of columns, and varying number of rows) I need to append data from those 10 files into one single Excel file using Openpyxl Python library Read data from File1, append it to new_file Read data …

Total answers: 1

Error when writting image from python to Excel

Error when writting image from python to Excel Question: I am trying to run this code: wb=openpyxl.load_workbook(‘Output_Report_v16.xlsm’,read_only=False,keep_vba=True) sheets=wb.sheetnames sheet_InputData_Overview=wb [sheets[7]] img=openpyxl.drawing.image.Image(‘Eink_Liq.png’) sheet_InputData_Overview.add_image(ws.cell(2,28)) wb.save(‘Output_Report_v16.xlsm’) When python runs the last line of code this error arises: ‘Cell’ object has no attribute ‘_id’ The excel file contains VBA which should not be changed or deleted. Do you have …

Total answers: 2

How to normalise a date columnin pandas dataframe to the same format

How to normalise a date columnin pandas dataframe to the same format Question: I have a dataframe made from pulling in different excel sheets. I am trying to normalise the date_time column to just a standard DD/MM/YYY format. Is that possible? 1 DATE Column 3 Column 4 Column 5 Column 6 2 01/03/2021 00:00 3 …

Total answers: 1

Importing multiple excel files and combining into dataframe

Importing multiple excel files and combining into dataframe Question: I am trying to import many excel files (around 400) into one dataframe from a folder but I seem to be running into an error. The files I want from my folder are names filename followed by a date – "filename_yyyy_mm_dd.xlsx". I want to keep the …

Total answers: 2

ValueError: could not convert string to float: '$2,464.34'

ValueError: could not convert string to float: '$2,464.34' Question: I am trying to convert the data to float in order make it as numerical format in excel to sort the data i am getting error.wherever the float in mentioned i did it now but previously there was no float . def get_output_value(self, key, value, neutral=None): …

Total answers: 1

Filter and group list of duplicate names

Filter and group list of duplicate names Question: How do I change the shape of this data so that the subject column becomes a top row header containing all unique values. Name and Surnames are listed in the 1st and 2nd column as unique values. Then in each cell I need a true or false …

Total answers: 2