Feb 25, 2011

Align data as table in Word 利用Word 定位功能,快速排版純文字資料

Introduce
說明


For some form type data (like CSV), it can be separated by tabs:
以一篇純文字的資料來說(例如CSV),可能只以簡單tab符號來分隔數據,如以下

Item Amount Price
A 1 $20
B 2 $30
C 10000000 $100000

We would like to align those data like as table:
而我們的目得是要排版好,將資料定位成:

Item   Amount       Price
A      1            $20
B      2            $30
C      10000000     $100000




Method
方法


*. Change font to Monospaced Font.
更改字型為等寬字:
=> Copy all content to Word.
複製資料至 Word,
=> Select all content in Word.
全選資料,
=>Change font to  Monospaced Font, ex: Consolas.
變更字型為等寬字型,如 Consolas,中文則可選擇標楷體。







*. Click several times on rules to align data.
在尺規上取適當距離,點擊滑鼠左鼠以定位。















p.s. Mark sure you have checked the ruler option under View to display ruler..
若無尺規出現,請從 View 分頁勾選 Ruler 以顯示尺規。


*. Save file, change "Save as type:" to "Web Page".
另存新檔,並將格式選為 Web Page。


*. Open the file you saved with browser, copy content to editor, ex: notepad.
以瀏覽器開啟剛存好的檔案,並複製所有內容到純文字編輯器即可完成。
p.s. This skill also works on web (like this article), just open the output file with Word .
若要貼在網頁上,則是使用Word 開啟剛存好的檔案,並複製到網頁即可。



Notes
附註

*. In order to see the separate symbol, you can check the "Show/Hide Editing Marks" icon.
建議開啟顯示分隔符號以確認分隔符號為 tab。



No comments:

Post a Comment