How to force Excel to recalculate on opening xlsx

2010-11-03 Thread toshihiko . saka
Hello, I'm planning to develop an application which sets values of cells in Excel 2007 file (xlsx) with POI 3.7. After setting values of cells with POI, I am expecting that formulas referring to the edited cells will be recalculated when I open it in Excel 2007, but actually it doesn't work.

Re: Construct xwpfDocument from existing body

2010-11-03 Thread David Fisher
Hi, Images are in a different part of the file. I suggest that you take the .docx file make a copy with your filesystem and cahnge the suffix to .zip. You can then unzip the file and inspect the various parts of the OOXML. If you do this you will better understand where those images are. Rega

Re: POI 3.7 can't get formula

2010-11-03 Thread Trollchik
it stiil doesn't work properly! oldCell.getCTCell().getF().getStringValue() some times write me that value=null, but actually there the same formulas as in the previous cells! why> -- View this message in context: http://apache-poi.1045710.n5.nabble.com/POI-3-7-can-t-get-formula-tp3246256p324

RE: Detecting 1904 date windowing in a given file

2010-11-03 Thread Carnow, Robin (IMS)
As I was writing an explanation of how we use the usermodel to extract dates from cells in a sheet, I found the error causing the 1904 dates to be misinterpreted. We should have used Cell's getDateCellValue method instead of working with the double returned from getNumericCellValue. Thank you

Reading/Writing XSSF into vector.

2010-11-03 Thread Craig Long
Hello, My current application reads an entire 2003 XML spreadsheet (test.xml) into a vector, updates the cell values or adds missing data according to dbase values, and then builds the updated spreadsheet for users. With this solution I essentially I read everything Style, Type, WorkBook, Shee

Re: POI 3.7 can't get formula

2010-11-03 Thread Trollchik
ok, i understood what u mean, may u mean to make like: newCell.getCTCell().addNewF().setStringValue(oldCell.getCTCell().getF().getStringValue()); it look working for me. can u look also to problem with deleting row -- View this message in context: http://apache-poi.1045710.n5.nabble.com/

Re: POI 3.7 can't get formula

2010-11-03 Thread Trollchik
but the cell.getCellFormula() is not implemented yet! how i can do it? -- View this message in context: http://apache-poi.1045710.n5.nabble.com/POI-3-7-can-t-get-formula-tp3246256p3248955.html Sent from the POI - User mailing list archive at Nabble.com. -

Re: POI 3.7 can't get formula

2010-11-03 Thread Yegor Kozlov
Can you create a simple file in Excel and set your formula with BDP to a cell. Then create the same output using POI. Unzip these two files and use diff to find what differs. This should give you an idea what is missing. As a quick solution, try just to set the formula string omitting all othe

Re: Change paper-format for Word

2010-11-03 Thread gipsy
OK, Sorry I have to create doc-files - not docx-Files. So I need to use HWPF - same problem, other api. How can I solve this problem now? -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Change-paper-format-for-Word-tp3246506p3248283.html Sent from the POI - User mailing

Re: Using HSSF.record methods for a SS.usermodel

2010-11-03 Thread rohankrishnajasti
public void createSerializedCell(short cellType, int sheetIndex,int rowIndex,short colIndex,short styleIndex,String mDimDesc) throws IOException{ Record cellRecord = null; switch(cellType){ case NUMERIC_CELL: c

Construct xwpfDocument from existing body

2010-11-03 Thread gummadi krishna
Hi , I have a case where from a exisiting docx file i extract the document and save the document which is in xml format to DB like below : XWPFDocument olddoc = new XWPFDocument(fis); String strXml = olddoc.getDocument().toString(); Now i want to open a new XWPFDocument with

Re: Using HSSF.record methods for a SS.usermodel

2010-11-03 Thread rohankrishnajasti
hey thanks a lot i shall try converting the whole code to Usermodel based but i am a newbie so finding it difficult...is there any site which provides suggestions or information on alternative methods with the same use...this is a part of the code ...i would like to build the remaining based on t

Re: Using HSSF.record methods for a SS.usermodel

2010-11-03 Thread rohankrishnajasti
public byte[] serialize() { int wbsize= m_workBook.getSize(); int totalsize = wbsize; for (int k = 0; k <= m_numOfSheets;k++){ m_workBook.setSheetBof(k, totalsize); totalsize += getSheet(k).getSize(

Re: Detecting 1904 date windowing in a given file

2010-11-03 Thread Nick Burch
On Wed, 3 Nov 2010, Carnow, Robin (IMS) wrote: I have been researching for a while now and I am unable to find a good solution for finding out whether a given xls or xlsx file is using 1904 date windowing (i.e. cells with dates created using excel on a mac). Are you using HSSF usermodel, or th

Re: save with XWPF => "example.doc" NOT "example.docx"

2010-11-03 Thread Nick Burch
On Wed, 3 Nov 2010, gipsy wrote: Is it possible to save my XWPFDocument as a .doc file (Word 1997-2003)? HWPF is not possible for me! Nope. HWPF is the library .doc files, XWPF is for .docx Nick - To unsubscribe, e-mail: user

Re: Detecting 1904 date windowing in a given file

2010-11-03 Thread David Fisher
Thanks for the well written and researched question. Dave On Nov 3, 2010, at 9:03 AM, Carnow, Robin (IMS) wrote: > Sorry about that Dave. We have been having email outages, and I was not sure > if my message reached the list. I should have queried user-help instead of > reposting. > Sorry for

RE: Detecting 1904 date windowing in a given file

2010-11-03 Thread Carnow, Robin (IMS)
Sorry about that Dave. We have been having email outages, and I was not sure if my message reached the list. I should have queried user-help instead of reposting. Sorry for the spam. Robin -Original Message- From: David Fisher [mailto:dfis...@jmlafferty.com] Sent: Wednesday, November 0

Re: Detecting 1904 date windowing in a given file

2010-11-03 Thread David Fisher
Hi Robin, This is a good question, but please you do not need to repeat your post. We've seen your post. Several of the POI committers are at Apachecon. We have discussed this a little. We may have an answer in the next day or two. Please be patient. Regards, Dave On Nov 3, 2010, at 7:29 AM,

Detecting 1904 date windowing in a given file

2010-11-03 Thread Carnow, Robin (IMS)
Hi, I have been researching for a while now and I am unable to find a good solution for finding out whether a given xls or xlsx file is using 1904 date windowing (i.e. cells with dates created using excel on a mac). I do not have any prior knowledge about the files I am given so I do not know

Re: Delete row doesn't work properly

2010-11-03 Thread Trollchik
u can try to delete row from next .xlsm http://apache-poi.1045710.n5.nabble.com/file/n3248469/test.xlsm test.xlsm Please help me to resolve this problem! -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Delete-row-doesn-t-work-properly-tp3248449p3248469.html Sent from

Delete row doesn't work properly

2010-11-03 Thread andrey skrypnik
Hi, i tried to delete row from .XLSN as sheet.removeRow(rowNum); after i saved a doc, as: workbook.write(new FileOutputStream("c://BloombergData/RAW_DATA_persella1.xlsm")); and when i opene file using MSExcel, i see the next problem: Удаленные записи: Формула из части /xl/calcChain.xml (Свойств

Re: POI 3.7 can't get formula

2010-11-03 Thread Trollchik
i did as u recommended. This is my formulas: http://schemas.openxmlformats.org/officeDocument/2006/relationships";>IF(ISNUMBER(BDP($B2,$Q$1)*$R2),BDP($B2,$Q$1)*$R2, 0) http://schemas.openxmlformats.org/officeDocument/2006/relationships";>BDP($C2,T$1) i make as: newCell.getCTCell().setF(oldCell.