<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Spreadsheet gem - adding new font]]></title>
		<link>http://railsforum.com/viewtopic.php?id=44488</link>
		<description><![CDATA[The most recent posts in Spreadsheet gem - adding new font.]]></description>
		<lastBuildDate>Thu, 30 Jun 2011 10:08:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Spreadsheet gem - adding new font]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=141694#p141694</link>
			<description><![CDATA[<p>- first, create a format you need and then just apply it to the row or cell:<br /></p><div class="codebox"><pre><code>book = Spreadsheet::Workbook.new
sheet = book.create_worksheet :name =&gt; &quot;Test Sheet&quot;

bold_heading = Spreadsheet::Format.new(:weight =&gt; :bold, :size =&gt; 14, :align =&gt; :merge)
data = &quot;A TEST HEADING&quot;
test_row = sheet.row(0)
for i in 2..5
  puts &quot;my index=&gt; #{i}&quot;
  test_row.set_format(i,bold_heading)
end
test_row[2] = data




book.write &#039;/path/to/your/excel_file.xls&#039;</code></pre></div><p>you can find more options when looking the API of spreadsheet gem: <a href="http://spreadsheet.rubyforge.org/file.GUIDE.html">http://spreadsheet.rubyforge.org/file.GUIDE.html</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Javix)]]></author>
			<pubDate>Thu, 30 Jun 2011 10:08:41 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=141694#p141694</guid>
		</item>
		<item>
			<title><![CDATA[Spreadsheet gem - adding new font]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=141690#p141690</link>
			<description><![CDATA[<p>Hi,&nbsp; </p><p>I am using spreadsheet gem and I need to change the font of my rows/columns to &quot;calibri&quot; size 10.&nbsp; Is it possible to do that?</p><p>Also I need to change my header background to a specific hex color code. </p><p>I would appreciate some direction.&nbsp; thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (railslist)]]></author>
			<pubDate>Thu, 30 Jun 2011 08:14:05 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=141690#p141690</guid>
		</item>
	</channel>
</rss>
