作者CAPPON (JI3)
看板R_Language
標題[問題] 匯出excel中文出現亂碼
時間Fri Mar 3 13:21:16 2017
匯出的excel
中文部分會呈現亂碼
這需需在加入什麼code 才可以順利呈現出來呢?
謝謝
file2=paste("Y:\\",tday,"\\report.xls",sep="")
cat ("<table border=1 ALIGN=center >" , file=file2, fill=F, labels=NULL, app
end=F)
cat ("<tr>" , file=file2 , append = T)
cat("<th bgcolor='#EEE685' rowspan=2><font face='Arial'>應用別</font></th>",
file = file2 , append = T)
cat("<th bgcolor='#EEE685' rowspan=2><font face='Arial'>出貨type</font></th>
", file = file2 , append = T)
cat("<th bgcolor='#EEE685' rowspan=2><font face='Arial'>客戶</font></th>", f
ile = file2 , append = T)
cat("<th bgcolor='#EEE685' rowspan=2><font face='Arial'>客端保良</font></th>
", file = file2 , append = T)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.138.161.143
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1488518479.A.B3B.html
推 shitlock: 編碼file2<-file("report.xls", "w", encoding="big5") 03/05 15:33
→ CAPPON: 有時匯出就正常,還是會出現亂碼的情況...有解嗎? 03/07 16:55