"http://chita.co.kr/doc/autohotkey.html#15"

 

치타

 

chita.co.kr

[2]open excel without excel

"myExcel := "Testing.xlsx" tempFolder := RegExReplace(myExcel, ".*\K\\.*") "\_Excel_UnZip\" tempName := RegExReplace(myExcel, "\.xlsx") ".zip" FileCopy, % myExcel , % tempName FileCreateDir, % tempFolder tempObject := ComObjCreate("Shell.Application") tempObject.Namespace(tempFolder).CopyHere(tempObject.Namespace(tempName).items, 4|16) FileDelete, % tempName FileEncoding, UTF-8 FileRead, myCNT, % tempFolder "\" "xl\worksheets\sheet1.xml" FileRead, mySST, % tempFolder "\" "xl\sharedStrings.xml" FileRemoveDir, % tempFolder, 1 sharedStringArray := [] While @ := RegExMatch(mySST, "<t[^>]*>(.+?)</t>", _, @ ? StrLen(_) + @ : 1) sharedStringArray.Push(_1) While @ := RegExMatch(myCNT, "<c r=""([A-Z]+)(\d+)""[^>]*?(t=""s"")?><v>(.+?)</v>", _, @ ? StrLen(_) + @ : 1) { rowIndex := _2 ; 1, 2, 3... 1048576 columnName := _1 ; A, B...AA, AB,... XFD If(columnName = "A") ; at the moment column "A" Only myResult .= (_3 ? sharedStringArray[1 + _4] : _4) "`n" } MsgBox % myResult"

"https://www.autohotkey.com/boards/viewtopic.php?f=6&t=29408"

, 외부망에서 zip으로 저장이 안된다?

 

[3]myExcel := "Test.xlsx
startTime  :=  A_TickCount
tempFolder := RegExReplace( myExcel, ".*\K\\.*") "\_Excel_UnZip\"
tempName := RegExReplace( myExcel, "\.xlsx") ".zip"
FileCopy, % myExcel , % tempName
FileCreateDir, % tempFolder
tempObject := ComObjCreate("Shell.Application")
tempObject.Namespace(tempFolder).CopyHere( tempObject.Namespace(tempName).items, 4|16)
FileDelete, % tempName
FileEncoding, UTF-8
FileRead, contentNumber, % tempFolder "\" "xl\worksheets\sheet1.xml"
FileRead, contentString, % tempFolder "\" "xl\sharedStrings.xml"
stringArray := []
While @ := RegExMatch( contentString, "(.+?)", _, @ ? StrLen(_) + @ : 1 )  
stringArray.Insert( _1)
myPattern := "(.+?)"
While @ := RegExMatch( contentNumber, myPattern, _, @ ? StrLen(_) + @ : 1 )  
myContents .= ( StrLen( _1) ? stringArray[1+_2] : _2 ) "`n"
FileRemoveDir, % tempFolder, 1
resultFile := RegExReplace( myExcel, "\.xlsx") "_Extracted.txt"
FileAppend,% myContents, % resultFile
;Run, % resultFile,,, Max
MsgBox % A_TickCount - startTime

 

"https://www.autohotkey.com/boards/viewtopic.php?t=29408"

 

[4] "http://perso.numericable.fr/hserindat/xlsread/"

'[PA] 업무자동화 > [AH]Autohotkey' 카테고리의 다른 글

AH 스케줄러 등록하기  (0) 2020.04.20
AH Code Snippet - my list  (0) 2020.04.11
AH 정리하세요  (0) 2020.03.29
AH 하나의 명령을 두 줄에 쓰기  (0) 2020.03.29
AH Persistent의 이해  (0) 2020.03.29
Posted by Weneedu
,


출처: https://privatedevelopnote.tistory.com/81 [개인노트]