我正在使用下面提到的宏並且找不到輸出。 有人請讓我知道,如果有什麼錯誤的宏和如何解決它?運行宏後沒有找到輸出
使用iMacros的腳本代碼創建者向VBS功能iMacros的轉換的代碼和我複製/粘貼相同在VBA模塊
Private Function macro() As String
macro = "CODE:"
macro = macro + "'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database" + vbNewLine
macro = macro + "' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file" + vbNewLine
macro = macro + "'CSV = Comma Separated Values in each line of the filE" + vbNewLine
macro = macro + "TAB T=1" + vbNewLine
macro = macro + "SET !DATASOURCE C:\Users\Desktop\test\test.csv" + vbNewLine
macro = macro + "'Start at line 2 to skip the header in the file" + vbNewLine
macro = macro + "'Increase the current position in the file with each loop " + vbNewLine
macro = macro + "' Fill web form " + vbNewLine
macro = macro + "TAB T=1" + vbNewLine
macro = macro + "TAB CLOSEALLOTHERS" + vbNewLine
macro = macro + "URL GOTO=secured web page" + vbNewLine
macro = macro + "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:asin CONTENT={{!COL1}}" + vbNewLine
macro = macro + "TAG POS=1 TYPE=INPUT:SUBMIT ATTR=TYPE:submit" + vbNewLine
macro = macro + "TAG POS=1 TYPE=TABLE ATTR=CLASS:standardTable EXTRACT=TXT" + vbNewLine
macro = macro + "SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Desktop\test FILE=test_image.csv" + vbNewLine
macro = macro + "" + vbNewLine
End Function
你在找什麼輸出?所有的函數都返回一個'String'。你想知道怎麼做'MsgBox宏()'或'Debug.Print宏()'來檢查字符串?或者你想知道如何將你創建的字符串傳遞迴'iMacros',以便它可以將字符串處理爲腳本? – YowE3K
你的「代碼」是一個iMacro。你不能把它放在Excel中。 https://imacros.net/overview/ –
輸出是將網頁中的表格複製並粘貼到保存在桌面上的Excel表格中。我想知道是否可以使用上面的腳本 - @ YowE3K – Shri