08-12-2015, 08:22 AM
Greetings,
I have written the below code to check if the cell font colour in excel is red then do some routine. However, I am stuck on how to check the colour in excel via QM.
Macro NC VCC Release Corrections
I have written the below code to check if the cell font colour in excel is red then do some routine. However, I am stuck on how to check the colour in excel via QM.
Macro NC VCC Release Corrections
;;Declare Variables
ARRAY(str) removeNamesList, SANamesCheckList
int counter1, counter2, SANamesCheckListCnt
int w1=act(win("Microsoft Excel - LR Sales" "XLMAIN")) ;;Obtain the particular sales file handle and activate it.
ExcelSheet esData.Init("Data") ;;Initialize an ExcelSheet object
ExcelSheet esVCC.Init("VCC Release Spool") ;;Initialize an ExcelSheet object
;;Initialize all variables to be sure
counter1=0
counter2=0
SANamesCheckListCnt=0
;Obtain SA Name list(dynamic ranges) into arrays from 'VCC Rlease Sheet' - To obtain count of dynamic records
esVCC.CellsToArray(SANamesCheckList "G:G") ;;Obtain list of SA name from 'VCC Release Sheet'
SANamesCheckList.ubound
;arrayCheckRoutine
;;Obtain count of actual records - not counting the blanks
for counter1 1 SANamesCheckList.len
,if SANamesCheckList.len<>0 ;;Skips checking of empty cells
,,SANamesCheckListCnt=SANamesCheckListCnt+1
counter1 = 0 ;; Reset counter for re-use
;obtainSANameFromAL
;;Check Autoline system for the correct SA Name and replace in Excel
esVCC.SelectCell("G1") ;;Select Header Cell of SA Names
for counter1 1 SANamesCheckListCnt
,esVCC.CellsToArray(SANamesCheckList "G" counter1)
,if esVCC.
Best Regards,
Philip
Philip