Sometimes, we often need to publish customer information and other information online for contact. However, as more and more customer information becomes available, online updates become increasingly difficult. What should we do? In fact, in addition to using back-end languages such as asp and php to achieve quick updates, Dreamweaver itself provides methods for data import and sorting. This is definitely a great boon for friends who do not understand the back-end. Dreamweaver has gone from version 3 to the latest MX has always retained this function, which shows its practicality. Let’s take a look at its effectiveness below.
Note: This article uses Dreamweaver MX as an example
. 1. For example, we now have a kehu.txt file on hand, which contains the customer contact form of ** company. The detailed information is as follows:
name, gender, position, phone number
Li Ming, male, technical staff of Company A, 87185900
Li Yan, male, manager of Company B, 80226888
Wang Qiang, male, chief engineer of Company C, 83546790
Su Lin, female, marketing staff of Company D, 87556341
Chen Dongdong, male, project director of Company E, 87436588.
As you can see, each item here is separated by commas.
2. (1) Open DW MX, create a new html page, and select insert/table objects/import tabular data in the menu bar.
Figure 1
(2) The import tabular data window appears, click the "Browse..." button, and select the text file to store the data. The Delimiter item must correspond to the delimiter in the text file, because the kehu.txt file uses It is a comma, so Com ma is selected. Other items can be selected and modified according to your needs.
Figure 2
(3) Finally click "OK", and a table containing text file data will be presented in front of you.
Figure 3
3. (1) Although the table has been made, sometimes we need to sort the data in the table. Of course DW has thought of this, first select the table, and then select commands/sort table in the menu bar.
Figure 4
(2) The sort table window appears. For the sort by item, select column 1. For the order item, select Alphabetically and Ascending. For other items, you can refer to Figure 5 to make selections as needed.
Figure 5
(3) Click "OK" to complete the sorting of column 1 in the table. The names in column 1 are arranged in ascending order by pinyin letter size.
Figure 6
4. (1) Now that our effects and sorting are out, the last thing to do is to beautify the table. Everyone loves beauty, and the table is no exception. In addition to manual beautification, DW also Seventeen styles are specially provided for you to choose from. Similar to sort table, select the table first and then select the commands/format table item.
Figure 7
(2) The format table window appears. There are various styles in the upper left corner. You can choose according to your preferences. Because the rest of the items are fool-like operations, I will not introduce them one by one here. I just emphasize the last item. First, this item asks you whether to add each style code to the TD tag instead of adding it to the TR tag by default. Here, I recommend that you do not check it, otherwise it will generate much more code than the default setting.
Figure 8
(3) Click "OK" and you're done. The final rendering is as follows. How about it? This can be done in a few simple steps. Functions that originally required background programming can be easily accomplished with DW. This is where its power lies.