setAutoFilter in BIgGridDemo

2011-03-02 Thread 行健
Dear All, I am using the BigGridDemo example for generating large excel files, it works like a charm. But is there a relatively easy way to recreate sheet.autoSizeColumn(), setAutoFilter(CellRangeAddress range) in this XML streaming method? Any advice is welcomed. Thanks. -Jack

Re: autoSizeColumn bug

2011-03-02 Thread David Fisher
>> Please see the big warning in the quick guide: >> http://poi.apache.org/spreadsheet/quick-guide.html#Autofit >> >> (Auto sizing columns requires font calculations to work out the text size, >> and the requires that java initialise a graphics environment of sorts) >> >> Nick >> > Thanks N

Re: autoSizeColumn bug

2011-03-02 Thread ARoy
Nick Burch alfresco.com> writes: > > > Please see the big warning in the quick guide: > http://poi.apache.org/spreadsheet/quick-guide.html#Autofit > > (Auto sizing columns requires font calculations to work out the text size, > and the requires that java initialise a graphics environment

Re: autoSizeColumn bug

2011-03-02 Thread ARoy
ARoy gmail.com> writes: > at java.awt.font.TextLayout.(TextLayout.java:636) > - > I am not trying to display anything ...so don't understand why the code is > trying to obtain display. > Can someone please help

Re: Extract Excel 2007 tables with Jakarta POI 3.7

2011-03-02 Thread Nick Burch
On Wed, 2 Mar 2011, Donato wrote: I'll try. In the meantime, is it possible to create a kind of feature request or to open a bug in bugzilla or somewhere else? Yup, just set the severity to "enhancement" in bugzilla I think the following things should be supported: - possibility to handle con

Re: autoSizeColumn bug

2011-03-02 Thread Nick Burch
On Wed, 2 Mar 2011, ARoy wrote: We are trying to generate excel files on AS400 using POI While most of the functionality is working we have run into an issues with autoSizeColumn. Exception in thread "main" java.lang.InternalError: Can't connect to X11 window Please see the big warning in the

Re: PrintSettings not read nor written from XLSX files

2011-03-02 Thread Filip Defoort
On Mar 2, 2011, at 3:17 AM, Nick Burch wrote: > On Tue, 1 Mar 2011, Filip Defoort wrote: >> public void setRepeatingRowsAndColumns(int sheetIndex, >> int startColumn, int endColumn, >> int startRow, int endRow)

autoSizeColumn bug

2011-03-02 Thread ARoy
Hi, We are trying to generate excel files on AS400 using POI While most of the functionality is working we have run into an issues with autoSizeColumn. I am getting this following error ONLY on AS400 (It works fine on Windows box) --

Re: Extract Excel 2007 tables with Jakarta POI 3.7

2011-03-02 Thread Donato
Nick Burch alfresco.com> writes: > > On Wed, 2 Mar 2011, Donato wrote: > > String cell_new = (new CellReference(new_row, > > new_col)).formatAsString( ); > > > > table.getCTTable( ).setRef(cell_start + ":" + cell_new); > > > > Using setRef, the table1.xml file is updated,

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread Mark Beardsley
That proved to be a little more entertaining than I thought. Referring back to the code I posted before, this should do the trick; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package workbookprotection; import java.io.*; import java.util.*;

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread Mark Beardsley
Have just had a look at your workbook and I think I understand the root of the problem. If you use Excel to open your workbook, click on one of the cells that holds a numeric value and then try to format it, Excel will report that the cell is not a numeric cell but is a General one. General cells

Re: Extract Excel 2007 tables with Jakarta POI 3.7

2011-03-02 Thread Nick Burch
On Wed, 2 Mar 2011, Donato wrote: String cell_new = (new CellReference(new_row, new_col)).formatAsString( ); table.getCTTable( ).setRef(cell_start + ":" + cell_new); Using setRef, the table1.xml file is updated, but the xml for the sheet (containing a conditional

Re: Extract Excel 2007 tables with Jakarta POI 3.7

2011-03-02 Thread Donato
Donato mediaset.it> writes: > > Nick Burch alfresco.com> writes: > > > > > On Wed, 23 Feb 2011, Donato wrote: > > > Ok, I'll try to use the POIXMLDocument class (which is the superclass of a > > > XSSFWorkbook, if I'm right). A question: I'm creating workbook objects as > > > > > > Workbook w

Re: PrintSettings not read nor written from XLSX files

2011-03-02 Thread Nick Burch
On Tue, 1 Mar 2011, Filip Defoort wrote: public void setRepeatingRowsAndColumns(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow) { XSSFPrintSetup printSetup = sheet.

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread rakesh.dev
Hi Mark, Thanks for the reply. I used the code for my excel but not getting reduced to one decimal place as given in the code. I am lost for options now. Thanks Rakesh -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Round-to-one-Decimal-place-not-happenning-using-styl

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread Mark Beardsley
This morning, I had the opportunity to play with some code - lost my voice and am confined to the office - and both of these approaches works perfectly well for me. I am running Office 2007 under Windows XP and the code was compiled against an early beat release of version 3.8 of POI and using Java

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread rakesh.dev
Hi Mark, Thank you for the response. Will remove the multiple set styles from the loop. I am looking for normal rounding behaviour as specified by you . Will attach the excel file for your reference where i am trying to convert column "S1" elements to one decimal place. http://apache-poi.1045710.n

Re: Round to one Decimal place not happenning using " style.setDataFormat(format.getFormat("0.0")); "

2011-03-02 Thread Mark Beardsley
Firstly, an observation. Do not create the cell styles like that; within the for loop I mean. If you do this, you will be creating multiple cell styles - possibly - all with the same name and properties. Ideally, you should create the style outside of the for loop and then apply it whenever you enc