Search the Community
Showing results for tags 'Ms excel'.
-
Hi everybody, I'm newbie to learn AutoIt, need some help... The process/ work that I'd like to automate is just for testing purpose for my job. Searching high and low, I found no script example for writing any random data into excel file.
-
Dear Team, I am creating one script it should read the content of Ms excel cell if content is there script should process .If content is not there in cell script should exit with msg box . Here is the code .could you please help me in the same . #include <Excel.au3> #include <MsgBoxConstants.au3> Local $oExcel = _ExcelBookOpen("d:\ani.xls",0) ;Local $oExcel = _ExcelBookNew() ;Create new book, make it visible ;For $i = 1 To 5 ;Loop ; _ExcelWriteCell($oExcel, $i, $i, 1) ;Write to the Cell ;Next Local $sCellValue, $sCellValue1 ,$splitsrname1,$splitsrnameyear,$splitsrnamedate,$splitsrnamemonth,$splitsrnamemonth1 For $i = 2 To 3 ;Loop $sCellValue = _ExcelReadCell($oExcel, $i, 1) $sCellValue1 = _ExcelReadCell($oExcel, $i, 2) $splitsrname1 = StringLeft($sCellValue1, 8) $splitsrnameyear = StringLeft($splitsrname1,4) $splitsrnamedate = Stringright($splitsrname1,2) $splitsrnamemonth =Stringright($splitsrname1,4) $splitsrnamemonth1 =StringLeft($splitsrnamemonth,2) dim $DOB =$splitsrnamedate&$splitsrnamemonth1&$splitsrnameyear MsgBox($MB_SYSTEMMODAL, "", "The Cell Value is: " & @CRLF & $sCellValue, 2) MsgBox($MB_SYSTEMMODAL, "", "The Cell Value is: " & @CRLF & $splitsrnameyear , 2) MsgBox($MB_SYSTEMMODAL, "", "The Cell Value is: " & @CRLF & $splitsrnamedate , 2) MsgBox($MB_SYSTEMMODAL, "", "The Cell Value is: " & @CRLF & $splitsrnamemonth1 , 2) MsgBox($MB_SYSTEMMODAL, "", "The Cell Value is: " & @CRLF & $DOB, 2) if $sCellValue =" " then MsgBox($MB_SYSTEMMODAL, "test", "there is no data in cell now exit") Exit EndIf Next