Excel COM

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zuzu_kuc
Posts: 76
Joined: 30 Mar 2016, 12:36

Excel COM

Post by zuzu_kuc » 18 Aug 2022, 08:42

Hi, is there any different between Excel 356 and Excel 2007 in ComObjActive?
my script works on 356 but dont work in 2007 version :/
Thanks

Code: Select all

xl := ComObjActive("Excel.Application") ; Connects to the active Excel workbook
		xl.Sheets(1).activate ; Activate workbook2
		sleep,300
		
		for cell in xl.range("B4:K10")
		{
			AktualniBunka:= cell.Address(0,0)
			hodnotaBunky:= xl.Range(AktualniBunka).text
			
			
			dataIndd:=RegExReplace(dataIndd,">(\(?)" AktualniBunka "(\)?<)",">$1" hodnotaBunky "$2<")
			
		}
		dataIndd:=RegExReplace(dataIndd,"<<","<")
		dataIndd:=StrReplace(dataIndd,"(—)")
		dataIndd:=StrReplace(dataIndd,"(-)")
		
		FileAppend,%dataIndd%,%A_scriptdir%\OUT\%nazevBezPripony%_data.out
		
		sleep,1500
		WinClose,%JmenoXL%
		Notify("Převod","",-.01,"Wait=All") ; kills all open notify's 
		
		
	}

Return to “Ask for Help (v1)”