SSブログ

Use of a spreadsheet

post: 2013-05-03
update: 2014-01-18

You can create ManyTime data with the spreadsheet.

a: Since the data format is a tab-delimited text, the data on Dropbox
can be treated with a general spreadsheet.
b: If yyyy-MM-dd HH-mm-ss is set up by the custom time format setting
of a general spreadsheet, it is useful for edit.
c: The usual text editor can also treat the data.

Since the above method may be difficult, I write another way.

Step1:
In the cell of general spreadsheets, for example if you type 2013-12-20
19:30:00, it is recognized as date information, the string input will
be automatically converted to 2013/12/20 19:30:00.
If you place the appropriate symbol character at the end, you can avoid
the automatic conversion. For example, if you type 2013-12-20 19:30:00@,
it is recognized as a string.

I think display of spreadsheet and is as follows.

2013-12-18 21:30:00@ 2013-12-18 21:30:00@ It is rain today.
2013-12-19 20:30:00@ 2013-12-19 21:00:00@ It is also rain today.
2013-12-20 19:30:00@ 2013-12-20 20:00:00@ Rain, but also sunny today.

Step2:
In order to get ManyTime data from a spreadsheet, export the text file.
Select and output the (text tab-delimited) text file from the spreadsheet.
It looks like this: when you open a text editor the exported data.

20131220.tsv:
2013-12-18 21:30:00@ 2013-12-18 21:30:00@ It is rain today.
2013-12-19 20:30:00@ 2013-12-19 21:00:00@ It is also rain today.
2013-12-20 19:30:00@ 2013-12-20 20:00:00@ Rain, but also sunny today.

Between the start date and the end date is a tab.
Between the end date and the comment is also a tab.

Step3:
Edit the exported data.

[For Windows]
Replace after the @ character of the end date in the text editor,
save it in (UTF-8 without BOM) as ManyTime data.
String to search: @tab
Replaced string: tab

I wrote a "tab" in the above, but it can not be displayed well.
Enter the tab character actually.
Since it may not be possible to determine the line breaks in Notepad,
use the advanced text editor, such as EmEditor.

[For Mac]
It is not same way as Windows, but I write another way.
In addition, the exported data is 20131220.tsv.
(In this case, it was created in the spreadsheet of Google Drive)
Start the terminal and go to the directory containing the data.
Convert it with sed command.

 $sed -e 's/@ / /g' 20131220.tsv > manytime-2.txt

It is part of 's/@ / /g' above, but it is 's /@tab/tab/g' actually.
If you use bash, type Ctrl + v first and type the tab key.
You can type the tab.

By the way, the command will be the following in Windows PowerShell.
 PS > cat 20131220.tsv | %{ $a = $_ -creplace "@`t","`t"; "$a" } > manytime-2.txt

Note:The character code of manytime-2.txt will be UTF-16LE with BOM.

Step4:
ManyTime data after editing looks like the following.
You can copy the contents to the existing file under the
Dropbox>Apps>manytime folder.

2013-12-18 21:30:00 2013-12-18 21:30:00 It is rain today.
2013-12-19 20:30:00 2013-12-19 21:00:00 It is also rain today.
2013-12-20 19:30:00 2013-12-20 20:00:00 Rain, but also sunny today.

Between the start date and the end date is a tab.
Between the end date and the comment is also a tab.

Data formatCreation of the data.. ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。