-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyUnique.py
33 lines (29 loc) · 997 Bytes
/
copyUnique.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import time
import math
import xlsxwriter
import openpyxl
from openpyxl import Workbook
from openpyxl.compat import range
from openpyxl.cell import get_column_letter
from openpyxl import load_workbook
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, WebDriverException
from selenium.webdriver.common.keys import Keys
wb=openpyxl.load_workbook('Freqdat.xlsx')
sheet = wb.get_sheet_by_name('Sheet1')
col = 1
while (col<60):
for i in range(3, 350):
k=i+1
for j in range(i+1, 352):
if sheet.cell(row=j,column=col).value != ' ':
temp1 = sheet.cell(row=j,column=col).value
temp2 = sheet.cell(row=j,column=col+1).value
print(temp2)
sheet.cell(row=j,column=col).value = ' '
sheet.cell(row=j,column=col+1).value = ' '
sheet.cell(row=k,column=col).value = temp1
sheet.cell(row=k,column=col+1).value = temp2
k=k+1
col = col+2
wb.save('Freqdat.xlsx')