I am trying to copy a list in a specific spot of an Excel file, and I want it line by line. I am not sure where to start. Any ideas?
import pyperclip
# this makes the list from a txt file.
blof = open("blacklist_list.txt", "r")
list_of_sn = []
for line in blof:
stripped_line = line.strip()
line_list = stripped_line.split()
list_of_sn.append(line_list)
blof.close()
# i can use print(list_of_sn) to see what the txt file shows
# this will put this in the clipboard very handy when i need
# to copy something but need to paste it later tho.
pyperclip.copy(str(list_of_sn))
paste = pyperclip.paste()
with open("test.xlsx", "w") as g:
g.write(paste)