countif expression not updating in Excel 2003

2007-04-10 Thread Serena Hartoog

I have a small spread sheet that looks like this in psedo-cvs format:
  ,abc
  ,abc
  ,abc
  ,abc
=countif(A1:A4,"Pass"),=A5

The formulas in the last row are, of course, not valid CVS.

If I create this spread sheet in Excel 2000 and run the code below,
it works find.

String fileName = "input2000.xls";
String outName = "output.xls";
String sheetName = "Sheet1";
int rowNum = 1;
short colNum = 0;
String result = "Pass";
POIFSFileSystem fs =
new POIFSFileSystem(new FileInputStream(fileName));
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheet(sheetName);
HSSFRow row = sheet.getRow(rowNum);
HSSFCell cell = row.getCell(colNum);
HSSFRichTextString val = new HSSFRichTextString(result);
cell.setCellValue(val);
FileOutputStream out = new FileOutputStream(outName);
wb.write(out);
out.close();

But if I create this spread sheet in Excel 2003 and run the above
code, then the formulas are not updated in the output.xls file when
I open it. There is no error indication, but the counts show zero.
If I select each formula and hit return, then it will recompute 
the correct value.

I am using poi-3.0-alpha3-20061212.jar file.

Is anyone aware of this problem? Does anyone know a work around.

Serena

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



please help me out

2007-04-10 Thread Rajeshwar Mothe

hi Rainer Schwarze
& turja ,

and hi alll

i want to create a empty word document how i need to create

please send me any code

plzz help me

by and waiting for u r reply


Re: What is the correct method to read a large excel file line by line?

2007-04-10 Thread Yegor Kozlov
Hi,

Current implementation reads the whole document into memory.
There is no way to read excel files line by line.

Regards,
Yegor

LS> Using HSSF, what is the correct method to read large excel files line by
LS> line?  
 
LS> In my real world situation the excel file will be very large, over 100
LS> megs.  I need to be able to read the file line by line so that the large
LS> file size does not cause memory issues.
 
LS> I have tried to use a BufferedInputStream to read in the file but that
LS> results in invalid header exceptions when I try to do a read().  I can
LS> use the BufferedInputStream as is if I give the whole thing to the
LS> workbook to process.However this pretty much forces me to read in the
LS> entire file at once does it not?
 
LS> If anyone has any examples, or can round about hint at what I need to do
LS> I would be most appreciative.
 
LS> Thank you,
LS> Levi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



What is the correct method to read a large excel file line by line?

2007-04-10 Thread Levi Strope
Using HSSF, what is the correct method to read large excel files line by
line?  
 
In my real world situation the excel file will be very large, over 100
megs.  I need to be able to read the file line by line so that the large
file size does not cause memory issues.
 
I have tried to use a BufferedInputStream to read in the file but that
results in invalid header exceptions when I try to do a read().  I can
use the BufferedInputStream as is if I give the whole thing to the
workbook to process.However this pretty much forces me to read in the
entire file at once does it not?
 
If anyone has any examples, or can round about hint at what I need to do
I would be most appreciative.
 
Thank you,
Levi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Data validation

2007-04-10 Thread Massimo Ferrari

Hi all,

does/will POI 3 support data validation? Particularly will POI support 
the configuration of lists and error messages?


Best,

Massimo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: hi plsss help me out

2007-04-10 Thread Rajeshwar Mothe

hi all

when iam executing tthis code iam getting error plzz help me urgent





package com.vl.hr.resume.action;



import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.io.OutputStream;

import javax.servlet.ServletException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import org.apache.log4j.Logger;


import com.vl.hr.util.common.CommonExceptionHandler;

import com.vl.hr.myprofile.values.EmployeePrimaryInformation ;
import com.vl.hr.myprofile.values.EmployeeGeneralInformation;
import com.vl.hr.myprofile.values.EmployeePersonalInformation;
import com.vl.hr.myprofile.values.EmployeeProfInformation;
import com.vl.hr.myprofile.values.EmployeeEducationInformation;
import com.vl.hr.myprofile.values.EmployeePreExperienceInformation;
import com.vl.hr.myprofile.values.EmployeeProfile;
import com.vl.hr.myprofile.values.EmployeeSkillsInformation;
import com.vl.hr.myprofile.values.EmployeeAwardsInformation;
import com.vl.hr.myprofile.values.EmployeeProjectHistory;

import org.apache.poi.hwpf.HWPFDocument;




public final class GenerateWordfile extends HWPFDocument {


   private static Logger log = Logger.getLogger(GenerateWordfile.class);

   public ActionForward execute(ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response)
   throws IOException, ServletException {
   HttpSession session=request.getSession(false);

try  {

   if(session!=null) {

 PrintWriter out = response.getWriter();



  /*
   * to display the values in MS WORD format
   */
 response.setContentType("application/msword");



 /*
   * creating an object for  HWPF Document  {
HWPF_doccument_obj }
   */
HWPFDocument  HWPF_doccument_obj = new
HWPFDocument();









 EmployeeProfile
emp_profile=(EmployeeProfile)session.getAttribute("data");

   if(emp_profile.emp_primary_info!=null)
   {
   EmployeePrimaryInformation
epi=emp_profile.emp_primary_info;

   String name=epi.firstname;

   OutputStream output_stream_obj =
new DataOutputStream(name);


HWPF_doccument_obj.write(output_stream_obj);
   //out.println(epi.firstname);
   }
   return mapping.findForward("success");

}
else {
   log.warn("session failed");
   return mapping.findForward("SessionFailure");
}

   } catch(Exception e) {
 return CommonExceptionHandler.getExceptionAction
("GenerateWordfile",mapping,request,e,null,"images/report_l.jpg");
  }


   }
}


error is :




C:\Tomcat files\hraccess\build\build.xml:45: Compile failed; see the
compiler er
ror output for details.

Total time: 3 seconds
C:\Tomcat files\hraccess\build>ant package
Buildfile: build.xml

init:

compile:
  [delete] Deleting: C:\Tomcat
files\hraccess\src\properties\properties\Structu
re.xml
[copy] Copying 1 file to C:\Tomcat
files\hraccess\src\properties\properties

   [javac] Compiling 7 source files to C:\Tomcat
files\hraccess\dist\classes
   [javac] C:\Tomcat
files\hraccess\src\java\com\vl\hr\resume\action\GenerateWo
rdfile.java:71: cannot resolve symbol
   [javac] symbol  : constructor HWPFDocument ()
   [javac] location: class org.apache.poi.hwpf.HWPFDocument
   [javac]  HWPFDocument  HWPF_doccument_obj =
new
HWPFDocument();
   [javac]
^
   [javac] C:\Tomcat
files\hraccess\src\java\com\vl\hr\resume\action\GenerateWo
rdfile.java:89: cannot resolve symbol
   [javac] symbol  : class DataOutputStream
   [javac] location: class com.vl.hr.resume.action.GenerateWordfile
   [javac]
   OutputStream output_stream_obj = new DataOutputStream(name);
   [javac]
^
   [javac] 2 errors


RE: Verifying Templates

2007-04-10 Thread Tarek Nabil
Actually, I meant validating that an xls file has been created based on
a certain xlt file.

-Original Message-
From: Tahir Akhtar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 3:48 PM
To: 'POI Users List'
Subject: RE: Verifying Templates

I guess no. 
Are you talking about some Microsoft Excel specific templating system or
general templating engines like velocity?

Regards,
Tahir Akhtar

> -Original Message-
> From: Tarek Nabil [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 4:34 PM
> To: poi-user@jakarta.apache.org
> Subject: Verifying Templates
> 
> Hi,
> 
> 
> 
> Does POI provide an out-of-the-box method of validating that an Excel
> sheet is based on a certain template?
> 
> 
> 
> If not, are there any approaches that are known to be robust enough?
> 
> 
> 
> Every help is appreciated.
> 
>
DISCLAIMER**
**
> 
> This email and any files transmitted with it are confidential and
contain
> privileged or copyright
> information. If you are not the intended recipient you must not copy,
> distribute or use this email
> or the information contained in it for any purpose other than to
notify us
> of the receipt thereof.
> If you have received this message in error, please notify the sender
> immediately, and delete this
> email from your system.
> 
> Please note that e-mails are susceptible to change.The sender shall
not be
> liable for the improper
> or incomplete transmission of the information contained in this
> communication,nor for any delay in
> its receipt or damage to your system.The sender does not guarantee
that
> this material is free from
> viruses or any other defects although due care has been taken to
minimise
> the risk.
>

**
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
DISCLAIMER
This email and any files transmitted with it are confidential and contain 
privileged or copyright 
information. If you are not the intended recipient you must not copy, 
distribute or use this email
or the information contained in it for any purpose other than to notify us of 
the receipt thereof.
If you have received this message in error, please notify the sender 
immediately, and delete this
email from your system.

Please note that e-mails are susceptible to change.The sender shall not be 
liable for the improper
or incomplete transmission of the information contained in this 
communication,nor for any delay in
its receipt or damage to your system.The sender does not guarantee that this 
material is free from
viruses or any other defects although due care has been taken to minimise the 
risk.
**

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



RE: Verifying Templates

2007-04-10 Thread Tahir Akhtar
I guess no. 
Are you talking about some Microsoft Excel specific templating system or
general templating engines like velocity?

Regards,
Tahir Akhtar

> -Original Message-
> From: Tarek Nabil [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 4:34 PM
> To: poi-user@jakarta.apache.org
> Subject: Verifying Templates
> 
> Hi,
> 
> 
> 
> Does POI provide an out-of-the-box method of validating that an Excel
> sheet is based on a certain template?
> 
> 
> 
> If not, are there any approaches that are known to be robust enough?
> 
> 
> 
> Every help is appreciated.
> 
> DISCLAIMER
> 
> This email and any files transmitted with it are confidential and contain
> privileged or copyright
> information. If you are not the intended recipient you must not copy,
> distribute or use this email
> or the information contained in it for any purpose other than to notify us
> of the receipt thereof.
> If you have received this message in error, please notify the sender
> immediately, and delete this
> email from your system.
> 
> Please note that e-mails are susceptible to change.The sender shall not be
> liable for the improper
> or incomplete transmission of the information contained in this
> communication,nor for any delay in
> its receipt or damage to your system.The sender does not guarantee that
> this material is free from
> viruses or any other defects although due care has been taken to minimise
> the risk.
> **
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Verifying Templates

2007-04-10 Thread Tarek Nabil
Hi,

 

Does POI provide an out-of-the-box method of validating that an Excel
sheet is based on a certain template?

 

If not, are there any approaches that are known to be robust enough?

 

Every help is appreciated.

DISCLAIMER
This email and any files transmitted with it are confidential and contain 
privileged or copyright 
information. If you are not the intended recipient you must not copy, 
distribute or use this email
or the information contained in it for any purpose other than to notify us of 
the receipt thereof.
If you have received this message in error, please notify the sender 
immediately, and delete this
email from your system.

Please note that e-mails are susceptible to change.The sender shall not be 
liable for the improper
or incomplete transmission of the information contained in this 
communication,nor for any delay in
its receipt or damage to your system.The sender does not guarantee that this 
material is free from
viruses or any other defects although due care has been taken to minimise the 
risk.
**