<?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/"
	>

<channel>
	<title>Aneef.Net &#187; Libraries</title>
	<atom:link href="http://www.aneef.net/category/dotnet-framework/libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aneef.net</link>
	<description>Do it in .Net way</description>
	<pubDate>Thu, 30 Oct 2008 08:54:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create Excel Sheets Programmatically with C# without Installing Excel.</title>
		<link>http://www.aneef.net/2008/07/25/create-excel-sheets-programmatically-with-c-without-installing-excel/</link>
		<comments>http://www.aneef.net/2008/07/25/create-excel-sheets-programmatically-with-c-without-installing-excel/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 07:10:01 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
		
		<category><![CDATA[.Net Related]]></category>

		<category><![CDATA[ADO.net]]></category>

		<category><![CDATA[Libraries]]></category>

		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2008/07/25/create-excel-sheets-programmatically-with-c-without-installing-excel/</guid>
		<description><![CDATA[Here goes one more needy component for developers. a lot of developers always had a problem of exporting data to excel programmatically. if you Google this topic you will get many results regarding this. here are some which caught my eyes.

How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual [...]]]></description>
			<content:encoded><![CDATA[<p>Here goes one more needy component for developers. a lot of developers always had a problem of exporting data to excel programmatically. if you Google this topic you will get many results regarding this. here are some which caught my eyes.</p>
<ol>
<li><a href="http://support.microsoft.com/kb/316934" target="_blank">How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET</a></li>
<li><a href="http://www.codeproject.com/KB/office/datasettoexcel.aspx" target="_blank">DataSet to Excel in Two steps – with Different Styles- by Krishna_accent</a></li>
<li> And finally comes our good old CSV files. </li>
</ol>
<p>the first one seems to be ok. but have little more work to be done on coding. the second is a&nbsp; really good one, but again we need excel to be installed, which again run out of our needs.</p>
<p>using CSV is ok for unformatted Comma Separated Values. </p>
<p>&nbsp;</p>
<p>But Recently I found <a href="http://www.carlosag.net/default.aspx?id=1" target="_blank">Carlos Aguilar Mares</a> has this wonderful FREE component called <a href="http://www.carlosag.net/Tools/ExcelXmlWriter/Default.aspx" target="_blank">ExcelXmlWriter</a> , to export data to excel. it doesn&#8217;t need excel to be installed and it can be used to generate formatted excel workbooks with very few lines of code. </p>
<p>&nbsp;</p>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span><span class="kwrd">using</span> CarlosAg.ExcelXmlWriter;</pre>
<pre><span class="lnum">   2:  </span>&nbsp;</pre>
<pre><span class="lnum">   3:  </span><span class="kwrd">class</span> TestApp {</pre>
<pre><span class="lnum">   4:  </span>    <span class="kwrd">static</span> <span class="kwrd">void</span> Main(<span class="kwrd">string</span>[] args) {</pre>
<pre><span class="lnum">   5:  </span>        Workbook book = <span class="kwrd">new</span> Workbook();</pre>
<pre><span class="lnum">   6:  </span>        Worksheet sheet = book.Worksheets.Add(<span class="str">"Sample"</span>);</pre>
<pre><span class="lnum">   7:  </span>        WorksheetRow row =  sheet.Table.Rows.Add();</pre>
<pre><span class="lnum">   8:  </span>        row.Cells.Add(<span class="str">"Hello World"</span>);</pre>
<pre><span class="lnum">   9:  </span>        book.Save(<span class="str">@"c:\test.xls"</span>);</pre>
<pre><span class="lnum">  10:  </span>    }</pre>
<pre><span class="lnum">  11:  </span>}</pre>
</div>
<p><style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
</p>
<p>the download has a very easy to understand help file explaining how to use this. you can download it in his website <a href="http://www.carlosag.net/Tools/ExcelXmlWriter/Default.aspx" target="_blank">here</a>.</p>
<p>Clean and simple isn&#8217;t it ?</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3530459083226419";
/* Image only In POst */
google_ad_slot = "2791845940";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2008/07/25/create-excel-sheets-programmatically-with-c-without-installing-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create PDF Files on the fly with C# and PDFSharp</title>
		<link>http://www.aneef.net/2008/07/24/create-pdf-files-on-the-fly-with-c-and-pdfsharp/</link>
		<comments>http://www.aneef.net/2008/07/24/create-pdf-files-on-the-fly-with-c-and-pdfsharp/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 12:36:19 +0000</pubDate>
		<dc:creator>Aneef Fashir</dc:creator>
		
		<category><![CDATA[Libraries]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.aneef.net/2008/07/24/create-pdf-files-on-the-fly-with-c-and-pdfsharp/</guid>
		<description><![CDATA[Recently one of my colleague asked me is there anyway to programmatically merge huge number of PDF  files in to a single file, without using Adobe Acrobat libraries, well the answer is yeah. and there are a lot of off the shelve and open source libraries available for this. the best one I found is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently one of my colleague asked me is there anyway to programmatically merge huge number of PDF  files in to a single file, without using Adobe Acrobat libraries, well the answer is yeah. and there are a lot of off the shelve and open source libraries available for this. the best one I found is the <a href="http://www.pdfsharp.com/PDFsharp/" target="_blank">PDFSharp</a>, and its totally FREE.</p>
<p>Here is a little introduction about PDFSharp:</p>
<ul>
<li>PDFsharp is the Open Source library that easily creates PDF documents from any .NET language.<br />
The same drawing routines can be used to create PDF documents, draw on the screen, or send output to any printer.</li>
<li>It can use either GDI+ or WPF.</li>
<li>It includes support for Unicode in PDF files.</li>
<li>It also includes MigraDoc Lite which brings you all the high-level functionality not included in PDFsharp.</li>
</ul>
<p>Using PDFSharp is very simple. the samples in the official download file are more than enough to learn the functionality of PDFSharp.here is a little piece of code I used to merge A collection of PDFs in a folder to a single PDF file.</p>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span>PdfDocument inputDocument=</pre>
<pre><span class="lnum">   2:  </span>                PdfReader.Open(file.FullName,PdfDocumentOpenMode.Import);</pre>
<pre><span class="lnum">   3:  </span><span class="kwrd">int</span> count = inputDocument.PageCount;</pre>
<pre><span class="lnum">   4:  </span>  <span class="kwrd">for</span> (<span class="kwrd">int</span> idx = 0; idx &lt; count; idx++)</pre>
<pre><span class="lnum">   5:  </span>   {</pre>
<pre><span class="lnum">   6:  </span>       <span class="rem">// Get the page from the external document...</span></pre>
<pre><span class="lnum">   7:  </span>       PdfPage page = inputDocument.Pages[idx];</pre>
<pre><span class="lnum">   8:  </span>       <span class="rem">// ...and add it to the output document.</span></pre>
<pre><span class="lnum">   9:  </span>       outputDocument.AddPage(page);</pre>
<pre><span class="lnum">  10:  </span>   }</pre>
<pre><span class="lnum">  11:  </span></pre>
<pre><span class="lnum">  12:  </span>outputDocument.Save(filename);</pre>
</div>
<p>if you want to download the full sample I created download it  <a href="http://www.aneef.net/wp-content/uploads/2008/06/pdfMerge.zip" target="_blank">here</a>.</p>
<p>if you want to download pdfSharp Library visit the site below:</p>
<p><a title="http://www.pdfsharp.com/PDFsharp" href="http://www.pdfsharp.com/PDFsharp">http://www.pdfsharp.com/PDFsharp</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3530459083226419";
/* testadd */
google_ad_slot = "3104422232";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aneef.net/2008/07/24/create-pdf-files-on-the-fly-with-c-and-pdfsharp/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
