ExcelAnt Test Framework

2011-01-28 Thread Jon Svede
Hi everyone, A while back I posted a question about whether or a framework existed for testing Excel spreadsheets from an Ant build script. My purpose was to vet a spreadsheet for compatibility with POI. I didn't find such a framework, so I wrote it and have been using them for a few weeks and

get Path of cells referenced to cells of another file

2011-01-28 Thread Daniel Prill
Hello, i extract data from .xls and .xlsx files. Now my excelfile has cells which reference to cells of another file. With cell.getFormulaCell(), i get for the first referenced file [1]tablename!cell, for the second referenced file [2]tablename!cell and so on. How can i get the absolute path of

Re: convert poi generated excel to pdf

2011-01-28 Thread David Fisher
> thanks for the quick reply, My application is web application, its deployed > in unix box ,It creates excel on click of a link, I generate using poi and > send it to response output stream for download. > I was assuming the excel which I generate, I can give it to openoffice > api which wi

Re: convert poi generated excel to pdf

2011-01-28 Thread fachhoch
thanks for the quick reply, My application is web application, its deployed in unix box ,It creates excel on click of a link, I generate using poi and send it to response output stream for download. I was assuming the excel which I generate, I can give it to openoffice api which will conver

Re: convert poi generated excel to pdf

2011-01-28 Thread David Fisher
> I am using poi to generate excel , now my clients want to have pdf also, > please suggest me if there is any way to convert poi generated excel to > PDF ?pelase advice me. There are ways, but nothing is straight-forward. It depends on the environment and time-line that your clients require

convert poi generated excel to pdf

2011-01-28 Thread fachhoch
I am using poi to generate excel , now my clients want to have pdf also, please suggest me if there is any way to convert poi generated excel to PDF ?pelase advice me. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/convert-poi-generated-excel-to-pdf-tp3362053p336

Re: How to determine if CellFormat is NULL

2011-01-28 Thread Mark Beardsley
May I ask why you want to know if a cells format is null? Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-determine-if-CellFormat-is-NULL-tp3361528p3361607.html Sent from the POI - User mailing list archive at Nabble.com. --

Re: Error displayed in one of the formula cells of the Excel sheet

2011-01-28 Thread Mark Beardsley
Sorry to say that you will not be able to turn off this 'feature' easilly and using a template file will certainly not help. The problem is that these settings all relate to the application and not to the file, as such, the only way to modify them is whilst the application is running either throug

Re: Formula Calculation Option with POI.

2011-01-28 Thread Mark Beardsley
Do not waste your time. I have just had a good look and this setting relates to the application and not to any file. Therefore, there will be no setting within the .xls or .xlsx file that has any effect upon whether the calculation mode is automaic or not. As of now, the only way I know to set thi

Re: Formula Calculation Option with POI.

2011-01-28 Thread Mark Beardsley
Do not waste your time. I have just had a good look and this setting relates to the application and not to any file. Therefore, there will be no setting within the .xls or .xlsx file that has any effect upon whether the calculation mode is automaic or not. As of now, the only way I know to set thi

Re: macros not enabled with POI 3.7 version

2011-01-28 Thread hartford123
OK. I figured out myself by google search. I forced the macros to function by using FormulaEvaluator as follows FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator(); for(int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) { Sheet

How to determine if CellFormat is NULL

2011-01-28 Thread shankarrao
Could you please let me know how to determine if the cellFormat is NULL? -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-determine-if-CellFormat-is-NULL-tp3361528p3361528.html Sent from the POI - User mailing list archive at Nabble.com. --

Re: Reading multiple hyperlinks on the same cell using HSSF

2011-01-28 Thread Mark Beardsley
As the cell contains more than one hyperlink and each is separated by some other text, then you will have to pull apart the HSSFRichTextString and cehck the formatting applied to each section. It is likely that hyperlinks all have a common format - being blue and undertlined for example - and that

Re: How to determine if a cell has value in it?

2011-01-28 Thread Mark Beardsley
Be aware also that if a cell does not have a value in it, it may well not exist. What you see when viewing the file using Excel is a GUI that is populated with data read from the file. If the user never populated cell A13 for example then a record for that cell will not exist in the file. The upsh

Re: Formula Calculation Option with POI.

2011-01-28 Thread Mark Beardsley
Well, the xls format is binary and much harder to dig around in. If you wanted to work on that, it is best to start of by looking at the specification for the file format which Microsoft have published and asking lots of questions at the dev list. Also, you would have to be certain that the featur

Re: How to determine if a cell has value in it?

2011-01-28 Thread Aniket Banerjee
You can try : if(cell.getCellType() == Cell.CELL_TYPE_BLANK) { } Hope this is clear. Thanks, Aniket On Fri, Jan 28, 2011 at 5:48 PM, shankarrao wrote: > > I want to know if a cell (say A3) has a value in it. If so, i do not want > to > replace the existing value in the cell with the new value.

How to determine if a cell has value in it?

2011-01-28 Thread shankarrao
I want to know if a cell (say A3) has a value in it. If so, i do not want to replace the existing value in the cell with the new value. However if the cell does not have any value in it, i want to add a new value to it. Could you please let me know how can i do this. Thanks for your help! -Shank

Re: Formula Calculation Option with POI.

2011-01-28 Thread Aniket Banerjee
Thanks Mark. I will try and do that. I have also contributed two methods (CLEAN and ADDRESS) to POI 3.8 and try keep doing that :). But will it be possible for .xls format too? On Fri, Jan 28, 2011 at 5:06 PM, Mark Beardsley wrote: > > No, not as far as I am aware. The trick to get around this os

Re: Formula Calculation Option with POI.

2011-01-28 Thread Mark Beardsley
No, not as far as I am aware. The trick to get around this os very simple however; use Excel to reate a template file and set the calculation options on that as you want them. Next, use POI to open the template and populate then save it away. The calculation options should still be set as they wer

Reading multiple hyperlinks on the same cell using HSSF

2011-01-28 Thread Peter Pham
I can read Hyperlink from a cell using function HSSFCell.getHyperlink(). However, it only works if there is only one hyperlinks in the cell. When I have multiple hyperlinks (note: my cell contains HSSFRichText), the above method does not return anything. My question is: Is there a way for me to l

Formula Calculation Option with POI.

2011-01-28 Thread Aniket Banerjee
Hi, Is it possible change the Calculation Option of an excel using POI. Like in my case I want to make the calculation mode to manual instead of automatic using some POI API. Is this possible? Thanks, Aniket

Re: Anchor type for images in Excel

2011-01-28 Thread Mark Beardsley
Morning Hannes, This is not a reply to your question regarding anchors as such, more some observations I made a long time ago whilst working with images and I do not know if they wil help you out of a tricky spot. I noticed from the code you posted, that you only specify the co-ordinates for the