-
Posts
14 -
Joined
-
Last visited
Everything posted by VinMe
-
Dear all, I am working on automation of ms word, on which my scripts runs with multiple word document at a time. But I wanted all the word to be running in the background. do we have any UDF available? Please help. BR, VinMe
-
HELLO All, is there any function in Auto it to Remove the repeating strings separated by "," which is present in the array. ex. Available state a[0]= D97,D96,,D85,D86,D85,D86,D85,D86,D85,,D86,D85,D86,D85,D86 a[1]=D85,D24,,,,,D85 Required state a[0]= D97,D96,D85,D86, a[1]=D85,D24 thank you in advance! vin!
-
$aTdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $LastRow) $aTDSLOC = _Excel_RangeRead($oWorkbook1, Default, "H1:H" & $LastRow) MsgBox(0, "TAKSY OUTPUT LAST ROW", $LastRow) _ArrayTrim($aTDSLOC, 1, 1) _Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, $aTDSLOC, "H2") $oWorkbook1.Sheets("DS_List").Activate $mLastRow = $oWorkbook1.ActiveSheet.UsedRange.Rows.Count $aMdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $mLastRow) MsgBox(0, "MASTER OUTPUT LAST ROW", $mLastRow) _Excel_RangeReplace($oWorkbook1, Default, "F2:F" & $mLastRow, "N/A", "n/a") ;check the requiremetn $aMLOC = _Excel_RangeRead($oWorkbook1, Default, "F1:F" & $mLastRow) ;LOC NUMBER NEEDS TO BE REPLACED WITH.. _ArrayDisplay($aTDSLOC) _ArrayDisplay($aMLOC) _ArrayDisplay($aMdslist) ;DATA COMPARISION BETWEEN TAKSY LIST WITH LOC FROM SAP TO MASTER LIST WITH LOC. $oWorkbook1.Sheets("OUTPUT").Activate For $i = 1 To $LastRow - 1 For $j = 1 To $mLastRow - 1 If $aTdslist[$i] == $aMdslist[$j] And $aTDSLOC[$i] <> $aMLOC[$j] Then $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 3 EndIf If $aTdslist[$i] == $aMdslist[$j] And $aMLOC[$j] == "n/a" And _Excel_RangeRead($oWorkbook1, Default, "I" & ($i + 2)) == "NO KIT" Then $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 2 _Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, "*", "H" & ($i + 2)) EndIf Next Next MsgBox($MB_SYSTEMMODAL, "Status", "Loc extraction, comparision and consolidation is Done", 2) DEAR TEAM, I am facing issue w.r.t subscript errors kindly help me in solving... 456.xlsx
-
thank you Subz that really worked!!
-
$oWorkbook = _Excel_BookAttach($sWorkbook) $oWorkbook.sheets("Sheet1").activate Local $sMSN = InputBox("MSN NO", "Enter MSN in XX FORMAT", "") _Excel_FilterSet($oWorkbook, $oWorkbook.activesheet, "AF1", 32, $sMSN) can anyone help me here, excel filer is not working with the above code.. attached excel input: 12 Thank you in advance!! to check.xlsx
-
Dear all, i am unable to open a xml file to excel in the "xml table format" Please help me out in where i am missing Local $strFileToOpen = _WinAPI_OpenFileDlg('Select xml file', @WorkingDir, 'All Files(*.*)', 1, '', '', BitOR($OFN_PATHMUSTEXIST, $OFN_FILEMUSTEXIST, $OFN_HIDEREADONLY)) Global $xlXmlLoadImportToList = 2 ; Places the contents of the XML data file in an XML table $oExcel = _Excel_Open() $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList) If $strFileToOpen <> False Then Local $oWorkbook1 = _Excel_BookOpen($oExcel, $strFileToOpen) EndIf Error i am getting is: ......\81e_Compare_v1.au3" (46) : ==> The requested action with this object has failed.: $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList) $oWorkbook1=$oExcel.Workbooks^ ERROR >Exit code: 1 Time: 7.338
-
oh Nine thank you! i did used this logic anyways your code is better
-
thank you nine for the reply, i have tried with that but the issue still exist with the below part of code. #include <Excel.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <StringConstants.au3> Local $sWorkbook = FileOpenDialog("Choose file loc Extract file", @ScriptDir, "ALL Excel Files (*.xlsx), *.xls") Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) ;~ $oWorkbook = _Excel_BookAttach($sWorkbook) Local $sMSN = InputBox("MSN NO", "Enter MSN in XX FORMAT", "") _Excel_FilterSet($oWorkbook, $oWorkbook.activesheet, "AF1", 32, "*" & $sMSN & "*") Local $LastRow1= $oExcel.ActiveSheet.AutoFilter.Range.Rows.SpecialCells($xlCellTypeVisible).Count-1 MsgBox(0, "lastrow1", $LastRow1) Local $oLocDS = $oWorkbook.ActiveSheet.Range("S1:S" & $LastRow1).SpecialCells(12) ;not getting complete filtered list Local $oLocNr = $oWorkbook.ActiveSheet.Range("A1:A" & $LastRow1).SpecialCells(12) ;not getting complete filtered list Local $aLocDS1 = _Excel_RangeRead($oWorkbook, Default, $oLocDS) Local $aLocNr1 = _Excel_RangeRead($oWorkbook, Default, $oLocNr) _ArrayDisplay($aLocDS1) _ArrayDisplay($aLocNr1) Attached input excel for your reference. Result which i need is set of filtered array set in variable $aLocDS1 and $aLocNr1 thank you in advance!! BR vin vLOC_.XLSX
-
Dear all, I am unable to get the right result after applying the filter to the excel. please let me know on the same. issue: After applying the filter the output $lastRow11 not giving the right output of complete visible rows. (its breaking at row skips) ;DATA EXTRACTION FROM LOC EXCEL ;============================================================================= $oWorkbook = _Excel_BookAttach($sWorkbook) Local $sMSN = InputBox("MSN NO", "Enter MSN in XX FORMAT", "") ;~ Local $LastRow1 = ($oWorkbook.ACTIVESHEET.Range("A1").SpecialCells($xlCellTypeLastCell).Row) $LastRow1 = $oWorkbook.ActiveSheet.UsedRange.Rows.Count MsgBox(0, "lastrow1", $LastRow1) _Excel_FilterSet($oWorkbook, $oWorkbook.activesheet, "AF1", 32, "*" & $sMSN & "*") Local $oLocDS = $oWorkbook.ActiveSheet.Range("S1:S" & $LastRow1).SpecialCells($xlCellTypeVisible) Local $LastRow11 = $oLocDS.rows.count ;error output MsgBox(0, "lastrow11", $LastRow11) Local $aLocDS1 = _Excel_RangeRead($oWorkbook, Default, $oLocDS) Local $oLocNr = $oWorkbook.ActiveSheet.Range("A1:A" & $LastRow1).SpecialCells($xlCellTypeVisible) Local $aLocNr1 = _Excel_RangeRead($oWorkbook, Default, $oLocNr) _ArrayDisplay($aLocDS1) _ArrayDisplay($aLocNr1) _ArrayTrim($aLocDS1, 6, 1) _ArrayTrim($aLocNr1, 6, 1) _ArrayTrim($aLocNr1, 6, 0) _ArrayDisplay($aLocDS1) _ArrayDisplay($aLocNr1)
-
Array copy from active excel - (Moved)
VinMe replied to VinMe's topic in AutoIt General Help and Support
Do you get an error? No Do youget wrong results? NOWhat is the value of $LastRow2? range value issue is i am not getting the result of array display... -
I am unable to execute the below script, my requirement is to copy the content from active excel sheet and to display the same. Please let me know where i am missing! #include <Excel.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <StringConstants.au3> Local $oExcel = _Excel_Open() $LastRow2 = $oExcel.UsedRange.Rows.Count $Tissue = _Excel_RangeRead($oExcel, Default, "E1:E" & $LastRow2) $TshNr = _Excel_RangeRead($oExcel, Default, "F1:F" & $LastRow2) _ArrayDisplay($Tissue) _ArrayDisplay($TshNr)
-
ceratainly yes mLipok!! that was my stupid mistake. updated code looks like this. Local $aDSloc1[1] = [""] For $i = 1 To $LastRow For $j = 1 To $LastRow1-1 If $aDSlist1[$i] == $aLocDS1[$j] Then $aDSloc1[$i] = $aDSloc1[$i] + "," + $aLocNr1[$j] EndIf Next ReDim $aDSloc1[$LastRow] _Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aDSloc1[$i], "H" & ($i)) Next But one more question here, is the below code line is good? i am not getting the right result so.. $aDSloc1[$i] = $aDSloc1[$i] + "," + $aLocNr1[$j]