Category "excel"

how to pass a datetime string from strftime() as an excel sheet name using openpyxl?

The purpose of the code below is to check whether or not a sheet already exists in excel workbook. If sheet exists, then set sheet as active sheet with given na

Application-defined or object-defined error when any cell in worksheet is edited

I am relatively new to VBA and have managed to edit a worksheet_change sub from example code found online (Thanks Tim Williams!) that allows multiple selection

.Body & .HTMLBody Indent and Default Signature Issue

I've set up a macro to send an e-mail through Outlook. .Body is read from a cell inside the file with indents. Since the value will change depending on the usag

Outlook Error: user-defined type not defined referring to Excel workbook

I get 50 mails with Excel sheets per day. I want to add the first line of each Excel sheet to an existing Excel sheet located on my computer. I first wrote a sc

How can I save a dataframe into an excel sheet based on number of the worksheet (not a name)?

Here is my DF. data3 = {'DCF Years': ['1st', '2nd', '3rd','4th','5th'], 'DCF Amt': ['8.5', '6.5', '10.5', '4.5', '12.5']} df = pd.DataFrame (data3, columns

Copy table from one workbook to another however does not copy columns with equations properly

I have written code in VBA which copies a dynamic table (dynamic because it could be 20 rows or 200 etc) from one worksheet into another. The issue I am having

export excel rows to individual json files in python

My excel file has 500 rows of data. I am trying to get 500 individual JSON files. Each file should have data only from 1 row. Thank you in advance. import json

how to add rows in excel according to cell value

how can I add rows in excel according to the cell value (as per example below). https://i.stack.imgur.com/q8MQG.png i want to add column D if column A contain '

Convert xls to xlsx with excess headers

junior dev here. Goal: Using python, convert file type from xls to xlsx that contains a clean header. Desired header: My attempt: My first attempt was to use w

How do I save changes made to data within a Userform back to the same row where the data came from?

I have found code to search a table and load cell values into the form. I need to be able to make changes and save the form data back to the table to update th

Return filename with wildcard

sFile = Dir(sPath & sFile) Debug.Print sFile 2022.txt is returned if sFile (the active cell) contains 2022.txt; how can I return the same if sFile contains

Data Mismatch error while using the Update query

I am using the Update query inside VBA to Update one particular column. But I am getting the Data Mismatch in criteria expression error. Please find below the c

Excel VBA - Set timer goes faster after each loop

I am trying to create a timer that when reaching zero, it calls from the "Database" script, and then repeats the timer again from 30 seconds. Problem is, every

VBA Runtime error 6: overflow on one calculation, but other calculations work

I'm trying to run the following code, but I'm getting a runtime error 6: overflow for the last calculation that I am trying to do. The program stops when it rea

VBA UserForm Frame ScrollTop function not working from class function

This should be a simple task and I've been coding in VBA for 10+ years but I cannot seem to get this to work. I have a UserForm with a MultiPage (with 2 pages)

Batch removing the second sheet from many excel sheets in R?

I have many excel sheets that I need to remove the second sheet before importing them. All files are .xlsx type in one folder and have same format. What kind of

Polyfill for Excel HSTACK and VSTACK array functions

Microsoft has announced many new array functions (https://techcommunity.microsoft.com/t5/excel-blog/announcing-new-text-and-array-functions/ba-p/3186066), inclu

Range with Cells Function (Runtime Error - 1004 --> Application-defined or object Defined error)

Could you please help on the below code. I have 2 workbooks and i want to copy the columns from one to another with the matching header. It shows an error in th

Microsoft.ACE.OLEDB.16.0 upgrade SSIS Unexpected termination

We have SSIS package installed in SSIS catalog server. In the catalog server, Microsoft.ACE.OLEDB.12.0 is installed. The jobs were running fine without issues.

I am trying to reference a cell in a closed workbooks

I have a sheet where column B contains a list of Folders in R:\Jobs. The folder name is also the 'Job Name'. I use VBA to create a formula in Column F that look