在js中将日期转换为字符串_如何在Word 2013中将文本转换为表格并将表转换为文字...

在js中将日期转换为字符串

在js中将日期转换为字符串

00_lead_image_text_to_table

Have you entered some text in columns separated by tabs and you want to convert it to a table? Word provides a useful feature that allows you to quickly convert text to a table and a table to text.

您是否已在由制表符分隔的列中输入了一些文本,并且想要将其转换为表格? Word提供了一项有用的功能,使您可以快速将文本转换为表格并将表转换为文本。

You can convert text separated by a specific character, such as a tab, into a table. We will show you how to do this and how to convert the table back to text.

您可以将由特定字符(如制表符)分隔的文本转换为表格。 我们将向您展示如何执行此操作以及如何将表格转换回文本。

For example, say you have some text listing months and their corresponding number of days. Before we work on converting the text to a table, you may want to view the formatting and paragraph marks so you can see how your text is separated. To do that, click the paragraph button in the Paragraph section of the Home tab.

例如,假设您有一些列出月份及其相应天数的文本。 在我们将文本转换为表格之前,您可能需要查看格式和段落标记,以便了解如何分隔文本。 为此,请单击“主页”选项卡的“段落”部分中的段落按钮。

01_show_paragraph_marks

The tabs and paragraph marks display. If you’re converting some text to a two-column table, be sure you only have one tab between the items on each line. Select the lines of text you want to convert to a table.

显示选项卡和段落标记。 如果要将某些文本转换为两列表格,请确保每行之间只有一个制表符。 选择要转换为表格的文本行。

02_clicking_insert_tab

Click the Insert tab and click Table in the Table section. Select Convert Text to Table from the drop-down menu.

单击插入选项卡,然后单击表格部分中的表格。 从下拉菜单中选择“将文本转换为表格”。

03_selecting_convert_text_to_table

On the Convert Text to Table dialog box, the Number of columns should already be set to 2 if you have only one tab between each item on each line. The Number of rows is automatically calculated.

如果在每一行的每个项目之间只有一个选项卡,则在“将文本转换为表格”对话框上,“列数”应该已经设置为2。 行数是自动计算的。

Specify the width of the columns in the table by selecting an option under AutoFit behavior. We decided to make each column just wide enough to fit the contents by selecting AutoFit to contents.

通过选择“自动调整行为”下的选项,指定表中列的宽度。 我们决定通过选择对内容的自动调整来使每列足够宽以适合内容。

Specify the character you used to separate the text on each line under Separate text at. In our example, we selected Tabs. You could also use other characters such as commas or paragraph marks. You can even specify a character not listed by selecting Other and entering the character in the edit box.

在“分隔文字在”下,指定用于分隔每行文字的字符。 在我们的示例中,我们选择了选项卡。 您也可以使用其他字符,例如逗号或段落标记。 您甚至可以通过选择其他并在编辑框中输入字符来指定未列出的字符。

04_convert_text_to_table_dialog

Now that you have converted your text to a table, you can easily convert it back to text. To do this, select the table by moving your cursor over the table handle in the upper, left corner of the table and select it. This highlights the whole table.

既然您已将文本转换为表格,则可以轻松地将其转换回文本。 为此,通过将光标移到表格左上角的表格手柄上来选择表格并选择它。 这突出显示了整个表格。

NOTE: If you didn’t have a consistent number of separator characters on each line, you may end up with more rows and columns than you intended and the text might not be placed correctly.

注意:如果每行中分隔符的数量不一致,则最终行和列的数量可能会超出预期,并且文本可能无法正确放置。

05_selecting_table

The Table Tools tabs become available. Click the Layout tab.

“表格工具”选项卡变为可用。 单击布局选项卡。

06_clicking_layout_tab

In the Data section of the Layout tab, click Convert to Text.

在“布局”选项卡的“数据”部分中,单击“转换为文本”。

07_clicking_convert_to_text

On the Convert Table to Text dialog box, select the character you want to use to separate the columns of text. For our example, we want to separate the text using Tabs. Click OK.

在“将表转换为文本”对话框中,选择要用于分隔文本列的字符。 对于我们的示例,我们想使用制表符分隔文本。 单击确定。

08_convert_table_to_text_dialog

Each row of the table becomes a line of text with tabs separating the items from the columns of the table. Word automatically inserts a tab marker on the ruler to line up the items from the columns of the table.

表格的每一行都变成一行文本,带有选项卡,这些标签用于将各项与表格的列分开。 Word会在标尺上自动插入一个制表符,以使表中各列的内容对齐。

09_converted_to_text_with_tab

This feature is handy if you have some text from another document that was not arranged as a table originally, but you want it in table format. Simply make sure the separator characters for each line are set correctly and then convert the text to a table.

如果您有其他文档中的某些文本原本没有以表格形式排列,但是希望以表格格式显示,则此功能非常方便。 只需确保正确设置每行的分隔符,然后将文本转换为表格即可。

翻译自: https://www.howtogeek.com/166529/how-to-convert-text-to-a-table-and-a-table-to-text-in-word-2013/

在js中将日期转换为字符串

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值