From 58c3be833424d1399042495bea3e7b024d6f0f8a Mon Sep 17 00:00:00 2001 From: Dave Fisher Date: Fri, 6 Nov 2009 02:29:17 +0000 Subject: [PATCH] documentation changes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@833281 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/book.xml | 45 ++++------ src/documentation/content/xdocs/download.xml | 11 +-- src/documentation/content/xdocs/faq.xml | 87 +++---------------- .../content/xdocs/subversion.xml | 9 +- 4 files changed, 34 insertions(+), 118 deletions(-) diff --git a/src/documentation/content/xdocs/book.xml b/src/documentation/content/xdocs/book.xml index 37d664d29a..f7a1247b15 100644 --- a/src/documentation/content/xdocs/book.xml +++ b/src/documentation/content/xdocs/book.xml @@ -28,35 +28,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -64,6 +37,21 @@ + + + + + + + + + + + + + + + @@ -71,6 +59,7 @@ + diff --git a/src/documentation/content/xdocs/download.xml b/src/documentation/content/xdocs/download.xml index df54967a95..72a58735ea 100755 --- a/src/documentation/content/xdocs/download.xml +++ b/src/documentation/content/xdocs/download.xml @@ -33,7 +33,7 @@

  • Latest stable release: Apache POI 3.5
  • -
  • Release Archive
  • +
  • Release Archive

Apache POI releases are available under the Apache License, Version 2.0. @@ -81,15 +81,6 @@ -

Release Archive - -

- Only current recommended releases are available on the main distribution site and its mirrors. - Older releases are available from the - archive - download site. -

-
Verify

diff --git a/src/documentation/content/xdocs/faq.xml b/src/documentation/content/xdocs/faq.xml index 8a5d51bb3f..a0cd7b8b80 100644 --- a/src/documentation/content/xdocs/faq.xml +++ b/src/documentation/content/xdocs/faq.xml @@ -22,13 +22,13 @@ - My code uses some new HSSF feature, compiles fine but fails when live with a "MethodNotFoundException" + My code uses some new feature, compiles fine but fails when live with a "MethodNotFoundException" -

You almost certainly have an older version of POI earlier +

You almost certainly have an older version of POI on your classpath. Quite a few runtimes and other packages will ship an older version of POI, so this is an easy problem - to hit without realising.

+ to hit without your realising.

The best way to identify the offending earlier jar file is with a few lines of java. These will load one of the core POI classes, and report where it came from.

@@ -46,8 +46,7 @@ System.out.println("Core POI came from " + path);

You almost certainly have an older version earlier on your - classpath. See the answer to the similar question above for - how to track this down.

+ classpath. See the prior answer.

@@ -56,7 +55,7 @@ System.out.println("Core POI came from " + path);

You've probably enabled logging. Logging is intended only for - autopsie style debugging. Having it enabled will reduce performance + autopsy style debugging. Having it enabled will reduce performance by a factor of at least 100. Logging is helpful for understanding why POI can't read some file or developing POI itself. Important errors are thrown as exceptions, which means you probably don't need @@ -68,10 +67,10 @@ System.out.println("Core POI came from " + path); What is the HSSF "eventmodel"? -

The HSSF eventmodel package is a new API for reading XLS files more efficiently. It does +

The SS eventmodel package is an API for reading Excel files without loading the whole spreadsheet into memory. It does require more knowledge on the part of the user, but reduces memory consumption by more than tenfold. It is based on the AWT event model in combination with SAX. If you need read-only - access to a given XLS file, this is the best way to do it.

+ access, this is the best way to do it.

@@ -89,28 +88,19 @@ System.out.println("Core POI came from " + path); Why am I getting an exception each time I attempt to read my spreadsheet? -

It's possible your spreadsheet contains a feature that is not currently supported by HSSF. - For example - spreadsheets containing cells with rich text are not currently supported.

+

It's possible your spreadsheet contains a feature that is not currently supported by POI. + If you encounter this then please create the simplest file that demonstrates the trouble and submit it to + Bugzilla.

- Does HSSF support protected spreadsheets? - - -

Protecting a spreadsheet encrypts it. We wont touch encryption because we're not legally educated - and don't understand the full implications of trying to implement this. If you wish to have a go - at this feel free to add it as a plugin module. We wont be hosting it here however.

-
-
- - - How do you tell if a field contains a date with HSSF? + How do you tell if a spreadsheet cell contains a date?

Excel stores dates as numbers therefore the only way to determine if a cell is actually stored as a date is to look at the formatting. There is a helper method - in HSSFDateUtil (since the 1.7.0-dev release) that checks for this. + in HSSFDateUtil that checks for this. Thanks to Jason Hoffman for providing the solution.

case HSSFCell.CELL_TYPE_NUMERIC: @@ -181,7 +171,7 @@ System.out.println("Core POI came from " + path);

- Yes. You first need to get a HSSFDataFormat object from the workbook and call getFormat with the desired format. Some examples are here. + Yes. You first need to get a DataFormat object from the workbook and call getFormat with the desired format. Some examples are here.

@@ -191,7 +181,7 @@ System.out.println("Core POI came from " + path);

- Yes. This is a built-in format for excel that you can get from HSSFDataFormat object using the format string "@". Also, the string "text" will alias this format. + Yes. This is a built-in format for excel that you can get from DataFormat object using the format string "@". Also, the string "text" will alias this format.

@@ -204,41 +194,6 @@ System.out.println("Core POI came from " + path); We will probably enhance HSSF in the future to make this process easier.

- - - I tried to set cell values and Excel sheet name on my native language, - but I failed to do it. :( - - -

By default HSSF uses cell values and sheet names as compressed unicode, - so to support localization you should use Unicode. - To do it you should set it manually:

- - // for sheet name - HSSFWorkbook wb = new HSSFWorkbook(); - HSSFSheet s = wb.createSheet(); - wb.setSheetName( 0, "SomeUnicodeName", HSSFWorkbook.ENCODING_UTF_16 ); - - // for cell value - HSSFRow r = s.createRow( 0 ); - HSSFCell c = r.createCell( (short)0 ); - c.setCellType( HSSFCell.CELL_TYPE_STRING ); - c.setEncoding( HSSFCell.ENCODING_UTF_16 ); - c.setCellValue( "\u0422\u0435\u0441\u0442\u043E\u0432\u0430\u044F" ); -

- Make sure you make the call to setEncoding() before calling setCellValue(), otherwise what you pass in won't be interpreted properly. -

-
-
- - - I'm having trouble creating a spreadsheet using POI using - websphere 3.5. - - -

Make sure you have fix pack 4 installed.

-
-
I am using styles when creating a workbook in POI, but Excel refuses to open the file, complaining about "Too Many Styles". @@ -317,18 +272,4 @@ System.out.println("Core POI came from " + path); fileOut.close(); - - - Will POI read any spreadsheet and rewrite it with modifications. - - -

POI is not guanteed to read the contents of any spreadsheet. - Certain features may cause spreadsheets to fail to read. More - problematic is rewriting spreadsheets. POI tried hard to - preserve the records of the original spreadsheet but some - features may cause problems. We advise that you limit the - formatting of spreadsheets you process so as to not be - unpleasantly suprised at a later stage.

-
-
diff --git a/src/documentation/content/xdocs/subversion.xml b/src/documentation/content/xdocs/subversion.xml index 9f703505d7..61c097622a 100644 --- a/src/documentation/content/xdocs/subversion.xml +++ b/src/documentation/content/xdocs/subversion.xml @@ -32,8 +32,8 @@

Most users of the source code probably don't need to have day to day access to the source code as it changes. For these users we - provide easy to unpack source code downloads via our - download pages. + provide easy to unpack source code from releases via our + download page.

Access the Version Controlled Source Code @@ -57,11 +57,6 @@ your hard-disk and wasting bandwidth.

-

NOTE: See this - Subversion - information page for a brief description of the relationship be - tween URL tuples such as trunks-proper and proper.

-
  • For read only access to the Apache POI svn, please use http://svn.apache.org/repos/asf/poi/trunk/
  • -- 2.39.5