This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadUnreadEmails() { | |
var sheet = SpreadsheetApp.create('Unread Emails'); | |
sheet.appendRow(['Sender', 'Subject']); | |
var threads = GmailApp.search('is:unread'); | |
for (var i = 0; i < threads.length; i++) { | |
var messages = threads[i].getMessages(); | |
for (var j = 0; j < messages.length; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteEmails() { | |
var sheet = SpreadsheetApp.openById('SHEET ID').getSheetByName('Sheet1'); | |
var data = sheet.getDataRange().getValues(); | |
for (var i = 1; i < data.length; i++) { | |
var sender = data[i][0]; | |
var subject = data[i][1]; | |
var threads = GmailApp.search('is:read from:' + sender + ' subject:' + subject); | |
Logger.log('Deleted' + i + ' emails') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.edge.service import Service | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.common.exceptions import TimeoutException | |
import time | |
import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlwings as xw | |
# Paths | |
source_workbook_path = r"source workbook path" # Change to your source workbook path | |
target_folder_path = r'targer folder' # Change to the folder containing your target workbooks | |
# Names of the worksheets you want to copy | |
sheets_to_copy = ['Sheet1', 'Sheet2'] # Change to your sheet names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlwings as xw | |
# Define the path to the folder containing the Excel files | |
folder_path = r"source folder" # <-- MODIFY THIS PATH | |
# Define the formulas to be inserted | |
formula1 = "=C14" # <-- Your Formula1 | |
# formula2 = "=MAX(G16,H16)" # <-- Your Formula2 | |
# formula3 = '=IF(I4="Your Criteria",J13,J14)' # <-- Your Formula3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlwings as xw | |
# Setup the application | |
app = xw.App(visible=False) | |
app.display_alerts = False | |
# Create a new workbook | |
new_wb = app.books.add() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import pyautogui | |
def count_files(folder_path): | |
return sum(file.endswith('.alw') and not file.startswith('~$') for file in os.listdir(folder_path)) | |
# Path to the file you want to open |