<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serendip &#187; ooo</title>
	<atom:link href="http://www.serendip.ws/archives/tag/ooo/feed" rel="self" type="application/rss+xml" />
	<link>http://www.serendip.ws</link>
	<description>Webデザイン・プログラミング</description>
	<lastBuildDate>Fri, 10 Feb 2012 05:33:58 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>OOo の Base から SQLite3 のデータベースにアクセスする</title>
		<link>http://www.serendip.ws/archives/5250</link>
		<comments>http://www.serendip.ws/archives/5250#comments</comments>
		<pubDate>Wed, 03 Nov 2010 08:17:20 +0000</pubDate>
		<dc:creator>iNo</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ooo]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.serendip.ws/?p=5250</guid>
		<description><![CDATA[SQLite3 のデータベースに OOo (OpenOffice.org) の Base を使ってアクセスできるようになるまでの各設定のメモ。 Mac OSX Snow Leopard (10.6) と Ubuntu 1 [...]]]></description>
			<content:encoded><![CDATA[<p>SQLite3 のデータベースに OOo (OpenOffice.org) の Base を使ってアクセスできるようになるまでの各設定のメモ。<br />
Mac OSX Snow Leopard (10.6) と Ubuntu 10.04 LTS (Lucid Lynx) で試してみた。</p>
<p>Mac, Ubuntu とも SQLite3 はインストール済みだったので SQLite3 のインストール方法は省略。</p>
<h3>ODBC ドライバのインストール</h3>
<p>ODBC (Open DataBase Connectivity) とは、各種のデータベースの違いを吸収してデータベースにアクセスできるようにするソフトウェアの仕様らしい。<br />
この ODBC ドライバを通して OOo から SQLite3 へ接続する。</p>
<h4>Ubuntu の場合</h4>
<p>Ubuntu では aptitude を使って、</p>
<pre>$ sudo aptitude install unixodbc unixodbc-dev unixodbc-bin
</pre>
<h4>Mac の場合</h4>
<p>Mac では MacPorts を使ってインストール。</p>
<pre>$ sudo port install unixODBC
</pre>
<h3>SQLite ODBC ドライバのインストール</h3>
<p>続いて SQLite の ODBC ドライバをインストールする。</p>
<h4>Ubuntu の場合</h4>
<p>Ubuntu では aptitude から、</p>
<pre>$ sudo aptitude install libsqliteodbc
</pre>
<h4>Mac の場合</h4>
<p>Mac は、『<a href="http://ch-werner.de/sqliteodbc/" class="out" rel="external">SQLite ODBC Driver</a>』にインストーラパッケージ(sqlite-odbc-0.83.dmg)があったのでそれを利用した。</p>
<h3>ODBC ドライバの設定</h3>
<h4>Ubuntu の場合</h4>
<p>Ubuntu は ODBC Data Source Administrator を使用して設定する。<br />
ターミナルからコマンドで起動する。</p>
<pre>$ sudo ODBCConfig
</pre>
<p>Drivers タブを選択して SQLite3 の設定を追加する。自分の環境では、なぜか既に設定されていた。<br />
設定は /etc/odbcinst.ini に保存される。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ubuntu_odbc_dsa_001.png" alt="Ubuntu ODBC 設定画面1" title="Ubuntu ODBC 設定画面1" width="496" height="375" class="alignnone size-full wp-image-5255" style="vertical-align:top;" />&nbsp;<img src="http://www.serendip.ws/wordpress/wp-content/uploads/ubuntu_odbc_dsa_002.png" alt="Ubuntu ODBC 設定画面2" title="Ubuntu ODBC 設定画面2" width="522" height="344" class="alignnone size-full wp-image-5258" style="vertical-align:top;" /></p>
<p>続いて User DSN タブを選択して SQLite3 データベースとの接続設定を行う。<br />
先程設定した SQLite3 をデータベースに選択して、SQLite3 のデータベースファイルのパスやその他の設定を行う。<br />
設定は ~/.odbc.ini に保存される。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ubuntu_odbc_dsa_003.png" alt="Ubuntu ODBC 設定画面3" title="Ubuntu ODBC 設定画面3" width="522" height="344" class="alignnone size-full wp-image-5257" /></p>
<h4>Mac の場合</h4>
<p>Apple のサイト(<a href="http://support.apple.com/kb/dl895" class="out" rel="external">ODBC Administrator Tool for Mac OS X</a>)から ODBC Administrator をダウンロードしてきてインストールする。<br />
アプリケーションフォルダのユーティリティ内に ODBC Administrator.app があるのでダブルクリックして起動する。</p>
<p>Drivers タブを選択して SQLite3 の設定を作成する。<br />
設定は ~/Library/ODBC/odbcinst.ini に保存される。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/mac_odbc_administrator_001.png" alt="Mac ODBC 設定画面1" title="Mac ODBC 設定画面1" width="506" height="290" class="alignnone size-full wp-image-5260" style="vertical-align:top;" />&nbsp;<img src="http://www.serendip.ws/wordpress/wp-content/uploads/mac_odbc_administrator_002.png" alt="Mac ODBC 設定画面2" title="Mac ODBC 設定画面2" width="514" height="340" class="alignnone size-full wp-image-5261" style="vertical-align:top;" /></p>
<p>次に User DSN タブを選択して SQLite3 のデータベースファイルのパス設定などを行う。<br />
設定は ~/Library/ODBC/odbc.ini に保存される。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/mac_odbc_administrator_003.png" alt="Mac ODBC 設定画面3" title="Mac ODBC 設定画面3" width="517" height="310" class="alignnone size-full wp-image-5262" /></p>
<h3>SQLite3 データベースの作成</h3>
<p>テスト用のデータベースを作成する。</p>
<pre>$ sqlite3 mytest.db
SQLite version 3.6.22
Enter &quot;.help&quot; for instructions
Enter SQL statements terminated with a &quot;;&quot;
sqlite&gt; CREATE TABLE mytable (id INT, text VARCHAR(100));
sqlite&gt; .tables
mytable
sqlite&gt; .schema mytable
CREATE TABLE mytable (id INT, text VARCHAR(100));
sqlite&gt; INSERT INTO mytable VALUES (1, 'テストです');
sqlite&gt; SELECT * FROM mytable;
1|テストです
sqlite&gt; .exit
$
</pre>
<h3>OOo からデータベースに接続する</h3>
<p>OOo の Base を起動してデータベースウィザードからデータベース接続設定を行う。</p>
<ol class="entry-list-style">
<li>『データベースの選択』で、『既存のデータベースに接続(X)』を選択して『ODBC』を選び、『次へ』ボタンをクリックする。<br /><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_base_setup_001.png" alt="OOo Base セットアップウィザード1" title="OOo Base セットアップウィザード1" width="355" height="197" class="alignnone size-full wp-image-5263" /></li>
<li>『ODBC 接続のセットアップ』で、『ブラウズ』ボタンをクリックして、先程作成した設定の SQLite3 のデータソースを選択して『次へ』ボタンをクリックする。<br /><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_base_setup_002.png" alt="OOo Base セットアップウィザード2" title="OOo Base セットアップウィザード2" width="524" height="206" class="alignnone size-full wp-image-5264" /></li>
<li>『ユーザー認証のセットアップ』で、『テスト接続』ボタンをクリックして接続テストを行い、成功すれば『次へ』ボタンをクリックする。<br /><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_base_setup_003.png" alt="OOo Base セットアップウィザード3" title="OOo Base セットアップウィザード3" width="400" height="151" class="alignnone size-full wp-image-5265" /><br />ユーザー名・パスワードは不要。</li>
<li>『保存して続行』で、『完了』ボタンをクリックし ODF データベースファイルとして保存する。</li>
</ol>
<p>テーブルにテスト用として作成したデータベースのテーブルが表示さる。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_base_001.png" alt="OOo Base, SQLite3 との接続1" title="OOo Base, SQLite3 との接続1" width="571" height="376" class="alignnone size-full wp-image-5266" /></p>
<p>テーブル名をダブルクリックするとテーブルの中身（先程入力した）が表示される。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_base_002.png" alt="OOo Base, SQLite3 との接続2" title="OOo Base, SQLite3 との接続2" width="384" height="278" class="alignnone size-full wp-image-5267" /></p>
<p>OOo でクエリを実行すると SQLite3 のデータベースにもきちんと反映される。</p>
<p>参考サイト：<a href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Using_SQLite_With_OpenOffice.org" class="out" rel="external">Documentation/How Tos/Using SQLite With OpenOffice.org &#8211; OpenOffice.org Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serendip.ws/archives/5250/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenOffice.org でテーブルの横列・縦列をハイライト</title>
		<link>http://www.serendip.ws/archives/94</link>
		<comments>http://www.serendip.ws/archives/94#comments</comments>
		<pubDate>Sat, 19 Jul 2008 12:05:48 +0000</pubDate>
		<dc:creator>iNo</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ooo]]></category>

		<guid isPermaLink="false">http://www.serendip.ws/?p=94</guid>
		<description><![CDATA[&#34;テーブルの横列・縦列をハイライト&#34; を OOo で行う。 &#34;書式(O)&#34;→&#34;スタイルと書式(Y)&#34; から &#34;ユーザー定義のスタイル&#34; 作成 [...]]]></description>
			<content:encoded><![CDATA[<p>&quot;<a href="http://coliss.com/articles/software/899.html#h201" class="out">テーブルの横列・縦列をハイライト</a>&quot; を <abbr title="OpenOffice.org">OOo</abbr> で行う。</p>
<ol>
<li>&quot;書式(O)&quot;→&quot;スタイルと書式(Y)&quot; から &quot;ユーザー定義のスタイル&quot; 作成し、背景色を設定する。</li>
<li>ハイライト設定するテーブルをすべて選択し、&quot;書式(O)&quot;→&quot;条件付きの書式設定(O)&#8230;&quot; から &quot;条件 1(A)&quot; の プルダウンメニューから &quot;数式が&quot; を選択し、<br />数式 <code>=MOD(ROW();2)=0</code> を入力し、&quot;セルスタイル(C)&quot; から先程作ったユーザー定義のスタイル名を選択する。<br />※列の場合は <code>=MOD(COLUMN();2)=0</code></li>
</ol>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_highlight_pattern_20080719.png" alt="OpenOffice.org 条件付き書式設定 ScreenShot" title="条件付き書式設定" width="400" height="125" class="alignnone size-full wp-image-95" /></p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_highlight_pattern_ss_20080719.png" alt="OpenOffice.org ハイライト表示 ScreenShot" title="テーブルをハイライト表示" width="210" height="140" class="alignnone size-full wp-image-96" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serendip.ws/archives/94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenOffice.org ですべてのページに見出しを付けて印刷する</title>
		<link>http://www.serendip.ws/archives/92</link>
		<comments>http://www.serendip.ws/archives/92#comments</comments>
		<pubDate>Thu, 17 Jul 2008 03:19:22 +0000</pubDate>
		<dc:creator>iNo</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ooo]]></category>

		<guid isPermaLink="false">http://www.serendip.ws/?p=92</guid>
		<description><![CDATA[Microsoft Excel の&#34;行のタイトル&#34;を使って表の見出しをすべてのページに付けるように、OOoでも同様のことをする方法について。 メニューバーの&#34;書式(O)&#34;→&#038;quo [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft Excel の&quot;行のタイトル&quot;を使って表の見出しをすべてのページに付けるように、<abbr title="OpenOffice.org">OOo</abbr>でも同様のことをする方法について。<br />
メニューバーの&quot;書式(O)&quot;→&quot;印刷範囲(N)&quot;→&quot;編集(N)&quot;→印刷範囲の編集ダイアログの&quot;繰り返す行&quot;から見出しにしたい行を選択する。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo_set_header_to_all_pages_001.png" alt="OpenOffice.org ScreenShot" title="OpenOffice.orgですべてのページに見出しを付ける" width="320" height="290" class="alignnone size-full wp-image-90" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serendip.ws/archives/92/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenOffice.org 3.0 Beta2</title>
		<link>http://www.serendip.ws/archives/89</link>
		<comments>http://www.serendip.ws/archives/89#comments</comments>
		<pubDate>Tue, 15 Jul 2008 01:57:15 +0000</pubDate>
		<dc:creator>iNo</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ooo]]></category>

		<guid isPermaLink="false">http://www.serendip.ws/?p=89</guid>
		<description><![CDATA[Mac OSX版 OpenOffice.org 3.0 Beta2 (BEB300m3 (Build:9328)) になって Calc でヒラギノフォントがきちんとセル内に収まって表示されるようになった。 日本語版はこち [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OSX版 <a href="http://download.openoffice.org/3.0beta/" class="out">OpenOffice.org 3.0 Beta2</a> (BEB300m3 (Build:9328)) になって Calc でヒラギノフォントがきちんとセル内に収まって表示されるようになった。</p>
<p><img src="http://www.serendip.ws/wordpress/wp-content/uploads/ooo3beta2_ss_20080715_001.png" alt="OpenOffice.org 3.0 Beta2 ScreenShot" title="OpenOffice.org 3.0 Beta2" width="324" height="217" class="alignnone size-full wp-image-90" /></a></p>
<p>日本語版はこちらからダウンロードした。 <br />
<a href="ftp://ftp.jaist.ac.jp/pub/openoffice/extended/3.0.0beta2/" class="out">ftp://ftp.jaist.ac.jp/pub/openoffice/extended/3.0.0beta2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serendip.ws/archives/89/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

