close
Blogtrottr
批踢踢實業坊 ask 板
 
Looking for something light while keeping you safe and comfortable during extended waterside activities?

Shop New Drainmaker Shoe for Men, Women and Kids at Columbia!
From our sponsors
[請問] 如何將google翻譯崁入excel工作表中執行
Oct 2nd 2013, 22:14, by dogyvic

作者dogyvic (沒有暱稱)

看板ask

標題[請問] 如何將google翻譯崁入excel工作表中執行

時間Wed Oct 2 22:14:48 2013

軟體:office版本:2007 我之前使用2003版本 有順利的把在網路上搜尋到的程式碼 將google翻譯的功能 瞎打誤撞 很碰巧地存在Excel VB中 並形成巨集 可將其用一般函數使用 使用上一切順利 但是我後來使用Excel2007版後 想要依樣畫葫蘆 把原來的程式碼 貼入 Excel VB的編輯介面中 卻再也無法像之前一樣順利執行 不知是否可詢問到正確的執行巨集的操作步驟 亦或是2007與2003的程式編寫方式有差異 對我這個對程式一竅不通的門外漢是一大苦惱 所以上來請問各位先進 先謝謝各位了!! 以下附上程式碼 Function GetChinese(StringOrigin) As String Dim WDC As Object Dim StrHTML$, lStart&, lEnd&, Arr, strResult$, Temp, strS With CreateObject("Msxml2.XMLHTTP") .Open "POST", "http://translate.google.com/", False .setRequestHeader "Content-Type", "application/x-www-form-urlencoded" .send "prev=hp&hl=zh-CN&js=y&text=" & StringOrigin & "&file=&sl=auto&tl=zh-TW" StrHTML = .ResponseText End With lStart = InStr(StrHTML, "") StrHTML = Mid(StrHTML, lStart + 1, lEnd - lStart + 13) Arr = Split(StrHTML, "") If Temp(1) "" Then strResult = strResult & Temp(1) Next GetChinese = strResult End Function -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.42.236.249

sgracee:嵌 ㄑㄧㄢ 10/02 22:16

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    yahauiuyt 發表在 痞客邦 留言(0) 人氣()