天天看點

通過import-csv實作多個參數的調取

1 通過Excel編寫一個CSV檔案

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288709VNoU.png" target="_blank"></a>

2 将這個檔案另存為CSV格式

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288709g7fn.png" target="_blank"></a>

3 但這時候你會發現導入這個CSV,不支援中文

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288709zaQz.png" target="_blank"></a>

4 這時候你需要将這個CSV檔案另存為,選擇的編碼格式改為UTF8

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288710KUsj.png" target="_blank"></a>

5 重新導入CSV:

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288710WMIs.png" target="_blank"></a>

6 這樣處理CSV檔案有什麼用呢?我們舉個例子将它簡單應用一下,将test10的顯示名稱更改為财務部

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288710f7TY.png" target="_blank"></a>

7看一眼結果

<a href="http://lixiaosong.blog.51cto.com/attachment/201312/17/705126_1387288710O85e.png" target="_blank"></a>

8 其實這項功能主要用于批量操作的情況下如果你有很多的賬戶,要同時更改某個屬性可以參考次方法!

本文轉自handsome7038 51CTO部落格,原文連結:http://blog.51cto.com/lixiaosong/1341710

繼續閱讀