I already know how to read from txt file with 2 columns. But, I don't know how to read if the txt file is excel.
This is myfile.txt:
1 8
2 15
3 125
0 12
54 0
15 125
54 54
15 25
485 78
This is code if I used the txt file for python read:
import requests
with open("myfile.txt", "r") as a_file:
for line in a_file:
values = line.rstrip().split()
CurrentRow = int(values[0]), int(values[1]) # << -----
url = "url"
headers = {headers}
data = {"MyPayload": f"Will-be{CurrentRow[0]}-is{CurrentRow[1]}-ndwiqb"}
Hasil = requests.post(url, headers=headers, data=data)
What the extra code if the file is excel with sheet name "Sheet 1"?