Hi Avik

That’s really cool.

Is this just HSSF, or Word as well??

Kind Regards,

Kais

-----Original Message-----
From: Avik Sengupta [mailto:[EMAIL PROTECTED] 
Sent: 08 July 2004 14:50
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: POI in .NET

Have you yearned to use the wonders of POI in you .NET applications?
Well, then yearn no more. POI compiled into a .NET dll is available at 

http://www.apache.org/~avik/dist/poi-2.5.1-dev-20040708.dll

The following C# code uses poi to create a new excel file.. it compiles
and runs successfully .. tested in mono, should be fine in windows as
well. Of course, no warranties, it may eat your homework :)

Done with IKVM. You need to download the IKVM runtime to run this. 

Thoughts? 

------------------------------------------------------------------
//Main.cs -- reference POI dll and IKVM.GNU.Classpath.dll
using System;
using org.apache.poi.hssf.usermodel;
using ikvm.lang;

class MainClass
{
        public static void Main(string[] args)
        {
                Console.WriteLine("Hello World!");
                HSSFWorkbook wb = new HSSFWorkbook();
                HSSFSheet s= wb.createSheet("Sheet1");
                HSSFRow r= s.createRow(0);
                HSSFCell c = r.createCell(1);
                c.setCellValue(1);
                java.io.FileOutputStream fs = new
java.io.FileOutputStream("dotnet.xls");
                wb.write(fs);
                fs.close();
        }
}
-------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to