import re
import openpyxl as op
from decimal import Decimal

lines = []
tp = []
with open ('EMDMA_Throughput_pfb_enabled.txt', 'rt') as in_file:  
	for line in in_file: 
		if (line.find('Throughput') != -1):
			#lines.append(line) 
			tp.append(re.findall("\\d+\\.\\d+", line))			
print (tp)

wb=op.load_workbook('EMDMA_Throughput_1.xlsx')  
sh=wb['Sheet1']      
r=2
for j in range (0, 100):
	tc = sh.cell(row = r, column = 1).value
	if tc is None:
		break
	stream = sh.cell(row = r, column = 2).value
	sm	= sh.cell(row = r, column = 3).value
	dm = sh.cell(row = r, column = 4).value
	count = sh.cell(row = r, column = 5).value
	msize = sh.cell(row = r, column = 6).value
	
	sh.cell(row = r, column = 7).value = Decimal(tp[r-2][0])
	
	r=r+1;
	
wb.save('EMDMA_Throughput_1.xlsx')
