| 14 |
|
from win32com.client import Dispatch |
| 15 |
|
|
| 16 |
|
if __name__ == '__main__': |
| 17 |
< |
outputFileName = r"C:\Test_Dir\serverToExcel-SNOW.txt" |
| 17 |
> |
outputFileName = r"C:\Test_Dir\serverToExcel-Aux-SRAS.txt" |
| 18 |
|
|
| 19 |
|
#xlSpreadSheetFileName = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_otherInformation\ServiceNow Change Requests Jan 30 2020 to July 28 2022 - Copy.xlsx" |
| 20 |
< |
xlSpreadSheetFileName = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_otherInformation\Legacy SNOW Change Request data dump Dec 2007 to Jan 2020.xlsx" |
| 21 |
< |
win2kServersFile = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_csv\Win8Servers_NOFilter.csv" |
| 22 |
< |
#win2kServersFile = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_csv\Test.csv" |
| 20 |
> |
#xlSpreadSheetFileName = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_otherInformation\Legacy SNOW Change Request data dump Dec 2007 to Jan 2020.xlsx" |
| 21 |
> |
xlSpreadSheetFileName = r"C:\Test_Dir\Auxilium System Retirement and Archival Signoff.xlsx" |
| 22 |
> |
#win2kServersFile = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_csv\Win8Servers_NOFilter.csv" |
| 23 |
> |
win2kServersFile = r"C:\Users\eborges\Documents\Cases\Endo\20220715 - IG Projects\4 - Develop Identification Process to Inventory NCDS stored in Endo IT\_fromEndo\_csv\Test.csv" |
| 24 |
|
|
| 25 |
|
serverNamesMatrix = {} |
| 26 |
|
contents = open(win2kServersFile).readlines() |
| 52 |
|
uniqueRows.sort() |
| 53 |
|
for uniqueRowNumb in uniqueRows: |
| 54 |
|
#outputFile.write("%s|%s|%s|%s|%s|%s\n"%(serverName,sht.Cells(uniqueRowNumb,1).value, sht.Cells(uniqueRowNumb,2).value, sht.Cells(uniqueRowNumb,12).value, sht.Cells(uniqueRowNumb,36).value, sht.Cells(uniqueRowNumb,114).value)) |
| 55 |
< |
outputFile.write("%s|%s|%s\n"%(serverName,sht.Cells(uniqueRowNumb,2).value, sht.Cells(uniqueRowNumb,3).value)) |
| 55 |
> |
#outputFile.write("%s|%s|%s\n"%(serverName,sht.Cells(uniqueRowNumb,2).value, sht.Cells(uniqueRowNumb,3).value)) |
| 56 |
> |
outputFile.write("%s|%s|%s\n"%(serverName,sht.Cells(uniqueRowNumb,1).value, sht.Cells(uniqueRowNumb,6).value)) |
| 57 |
|
else: |
| 58 |
|
#outputFile.write(serverName + "|||||\n") |
| 59 |
|
outputFile.write(serverName + "||\n") |