-
-
Save jtn-ms/cc19cf4ce577084ac694cff85c4d7e03 to your computer and use it in GitHub Desktop.
This file contains 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 __future__ import print_function | |
import numpy as np | |
from xlwings import Workbook, Range | |
#Deep excel not included please find it here: http://www.deepexcel.net/ | |
def run_test_data(): | |
with open('test.csv','rt') as f: | |
with open('result.csv','wt') as r: | |
headers = f.readline() | |
for line in f: | |
data = line.strip() | |
row = data.split(',') | |
mat = np.reshape(row,(28,28)) | |
wb = Workbook.caller() | |
Range('input','A1:AB28').value = mat | |
fit = Range('input','B31:K31').value | |
fit = [str(i) for i in fit] | |
print(','.join(fit),file = r) |
This file contains 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
Sub MyMacro() | |
RunPython ("import test;test.run_test_data()") | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment