---
# System prepended metadata

title: UiBot v5.6 ITHome資安日報寫入Excel

---

# UiBot v5.6 ITHome資安日報寫入Excel

<style>

html, body, .ui-content {
    background-color: #000;
    color: #ddd;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: #ddd;
}

.markdown-body h1,
.markdown-body h2 {
    border-bottom-color: #ffffff69;
}

.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
    color: #fff;
}

.markdown-body img {
    background-color: transparent;
}

.ui-toc-dropdown .nav>.active:focus>a, .ui-toc-dropdown .nav>.active:hover>a, .ui-toc-dropdown .nav>.active>a {
    color: white;
    border-left: 2px solid white;
}

.expand-toggle:hover, 
.expand-toggle:focus, 
.back-to-top:hover, 
.back-to-top:focus, 
.go-to-bottom:hover, 
.go-to-bottom:focus {
    color: white;
}


.ui-toc-dropdown {
    background-color: #333;
}

.ui-toc-label.btn {
    background-color: #191919;
    color: white;
}

.ui-toc-dropdown .nav>li>a:focus, 
.ui-toc-dropdown .nav>li>a:hover {
    color: white;
    border-left: 1px solid white;
}

.markdown-body blockquote {
    color: #bcbcbc;
}

.markdown-body table tr {
    background-color: #5f5f5f;
}

.markdown-body table tr:nth-child(2n) {
    background-color: #4f4f4f;
}

.markdown-body code,
.markdown-body tt {
    color: #eee;
    background-color: rgba(230, 230, 230, 0.36);
}

a,
.open-files-container li.selected a {
    color: #5EB7E0;
}

</style>

注意事項：ITHome資安日報的CSS ID使用隨機亂數，會導致判斷錯誤

位置：軟體自動化-瀏覽器
1.啟動新的瀏覽器：Google Chrome https://www.ithome.com.tw/tags/%E8%B3%87%E5%AE%89%E6%97%A5%E5%A0%B1
2.綁定瀏覽器：Google Chrome
3.資料抓取：點選資安日報標題2次 勾選URL 確定
下一步 抓取換頁 點[下一頁] 確定 抓取頁數:2(不用太多頁) 
元資料定義：找到最長包含亂數的2個地方，取消勾選
className:view view-taxonomy-term view-id-xxxxxx...亂數ID
value:view view-taxonomy-term view-id-xxxxxx...亂數ID
4.關閉標簽頁：(不關也沒差)
位置：軟體自動化-Excel(MS Office)
5.打開Excel工作簿：任選一個存在的Excel檔案
6.設定區域顏色：工作表1 A1:B1 設定背景顏色(標題欄使用)
7.設定列寬：工作表1 A1 列寬:104
8.設定列寬：工作表1 B1 列寬:40
9.寫入行：工作表1 A1 資料："標題"
10.寫入行：工作表1 B1 資料："URL"
11.寫入行：工作表1 A2 資料：arrayData
12.關閉Excel工作簿：立即存檔：是
