HSSFRow r = st.getRow(row);
HSSFCell c = null;
if (r != null) {
- c = r.getCell((short)col);
+ c = r.getCell(col);
}
return c;
}
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
-import org.apache.poi.ss.util.Region;
/**
* File for HSSF testing/examples
* Returns the textual content of the file, suitable for
* indexing by something like Lucene, but not really
* intended for display to the user.
+ * <p>
* To turn an excel file into a CSV or similar, then see
* the XLS2CSVmra example
- * @see org.apache.poi.hssf.eventusermodel.examples.XLS2CSVmra
+ * </p>
+ * <link href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java">
+ * http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java</link>
*/
public class EventBasedExcelExtractor extends POIOLE2TextExtractor {
private POIFSFileSystem fs;
/**
* A text extractor for Excel files.
+ * <p>
* Returns the textual content of the file, suitable for
* indexing by something like Lucene, but not really
* intended for display to the user.
+ * </p>
+ * <p>
* To turn an excel file into a CSV or similar, then see
* the XLS2CSVmra example
- * @see org.apache.poi.hssf.eventusermodel.examples.XLS2CSVmra
+ * </p>
+ * <link href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java">
+ * http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java</link>
*/
public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.poi.ss.extractor.ExcelExtractor {
private HSSFWorkbook _wb;
/**
* use this function to add a Shared String Table to an existing sheet (say
* generated by a different java api) without an sst....
- * @see #createSST()
+ * @see #createExtendedSST()
* @see org.apache.poi.hssf.record.SSTRecord
*/
<li><a href="http://poi.apache.org">Apache POI Project</a>
</ul>
-<!-- Put @see and @since tags down here. -->
-@see org.apache.poi.poifs
-@see org.apache.poi.hpsf
</body>
</html>
* Subclasses should implement this so that their data is passed back in a
* byte array.
*
- * @param pOffset to begin writing at
- * @param data byte array containing instance data
- * @return number of bytes written
+ * @param out the stream to write to
*/
public void serialize(LittleEndianOutput out) {
}
/**
- * @param field_1_options the options of the dialog
+ * @param options the options of the dialog
*/
public void setOptions(short options) {
field_1_options = options;
}
/**
- * @param field_2_horiz_pos the Horizontal position of the dialog
+ * @param horiz_pos the Horizontal position of the dialog
*/
public void setHorizontalPos(int horiz_pos) {
field_2_horiz_pos = horiz_pos;
}
/**
- * @param field_3_vert_pos the Vertical position of the dialog
+ * @param vert_pos the Vertical position of the dialog
*/
public void setVerticalPos(int vert_pos) {
field_3_vert_pos = vert_pos;
* REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
* @author Andrew C. Oliver (acoliver at apache dot org)
* @author Jason Height (jheight at apache dot org)
- *
- * @see org.apache.poi.hssf.record.ExtSSTInfoSubRecord
*/
public final class ExtSSTRecord extends StandardRecord {
public final static short sid = 0x00FF;
package org.apache.poi.hssf.record;
/**
- * Common base class of {@link Record} and {@link RecordAggregate}
+ * Common base class of {@link Record} and {@link org.apache.poi.hssf.record.aggregates.RecordAggregate}
*
* @author Josh Micich
*/
* Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields\r
* have already been written by the superclass.<br/>\r
* \r
- * The subclass must write the exact number of bytes as reported by {@link Record#getDataSize()}\r
+ * The subclass must write the exact number of bytes as reported by {@link org.apache.poi.hssf.record.Record#getRecordSize()}}\r
*/\r
protected abstract void serialize(LittleEndianOutput out);\r
}\r
/**\r
* An alternative workbook evaluator that saves memory in situations where a single workbook is\r
* concurrently and independently evaluated many times. With standard formula evaluation, around \r
- * 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link XSSFWorkbook}.\r
+ * 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link org.apache.poi.xssf.usermodel.XSSFWorkbook}.\r
* This class enables a 'master workbook' to be loaded just once and shared between many evaluation\r
* clients. Each evaluation client creates its own {@link ForkedEvaluator} and can set cell values\r
* that will be used for local evaluations (and don't disturb evaluations on other evaluators).\r
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.*;
-import org.apache.poi.openxml4j.opc.Package;
public abstract class POIXMLDocument extends POIXMLDocumentPart{
import org.apache.poi.util.POILogFactory;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.*;
-import org.apache.poi.openxml4j.opc.Package;
/**
* Represents an entry of a OOXML package.
}
/**
- * @deprecated use {@link OPCPackage#open(File)}
+ * @deprecated use {@link OPCPackage#openOrCreate(java.io.File)}
*/
public static Package openOrCreate(File file) throws InvalidFormatException {
Package retPackage = null;
* paragraph in the document in absolute units.
*
* @return bigInteger - value representing the spacing after the paragraph
- * @see #setSpacingAfterLines(BigInteger)
+ * @see #setSpacingAfterLines(int)
*/
public int getSpacingAfterLines() {
CTSpacing spacing = getCTSpacing(false);
* paragraph in the document in absolute units.
*
* @return the spacing that should be added above the first line
- * @see #setSpacingBefore(BigInteger)
+ * @see #setSpacingBefore(int)
*/
public int getSpacingBefore() {
CTSpacing spacing = getCTSpacing(false);
* The value of this attribute is specified in one hundredths of a line.
*
* @return the spacing that should be added before the first line in this paragraph
- * @see #setSpacingBeforeLines(BigInteger)
+ * @see #setSpacingBeforeLines(int)
*/
public int getSpacingBeforeLines() {
CTSpacing spacing = getCTSpacing(false);
* A break is a special character which is used to override the
* normal line breaking that would be performed based on the normal layout
* of the document's contents.
- * @see addCarriageReturn()
+ * @see #addCarriageReturn()
*/
public void addBreak() {
run.addNewBr();
* </p>
* <p>
* When you add a shape, you usually specify the dimensions of the shape and the position
- * of the upper�left corner of the bounding box for the shape relative to the upper�left
+ * of the upper'left corner of the bounding box for the shape relative to the upper'left
* corner of the page, worksheet, or slide. Distances in the drawing layer are measured
* in points (72 points = 1 inch).
* </p>
/**
* Holds information about all pictures embedded in Word Document either via "Insert -> Picture -> From File" or via
- * clipboard. Responsible for images extraction and determining whether some document�s piece contains embedded image.
- * Analyzes raw data bytestream �Data� (where Word stores all embedded objects) provided by HWPFDocument.
+ * clipboard. Responsible for images extraction and determining whether some document's piece contains embedded image.
+ * Analyzes raw data bytestream 'Data' (where Word stores all embedded objects) provided by HWPFDocument.
*
* Word stores images as is within so called "Data stream" - the stream within a Word docfile containing various data
* that hang off of characters in the main stream. For example, binary data describing in-line pictures and/or
HSSFWorkbook wb = new HSSFWorkbook(data.getData());\r
HSSFSheet sheet = wb.getSheetAt(0);\r
//verify we can access the xls data\r
- assertEquals(1, sheet.getRow(0).getCell((short)0).getNumericCellValue(), 0);\r
- assertEquals(1, sheet.getRow(1).getCell((short)0).getNumericCellValue(), 0);\r
- assertEquals(2, sheet.getRow(2).getCell((short)0).getNumericCellValue(), 0);\r
- assertEquals(3, sheet.getRow(3).getCell((short)0).getNumericCellValue(), 0);\r
- assertEquals(8, sheet.getRow(5).getCell((short)0).getNumericCellValue(), 0);\r
+ assertEquals(1, sheet.getRow(0).getCell(0).getNumericCellValue(), 0);\r
+ assertEquals(1, sheet.getRow(1).getCell(0).getNumericCellValue(), 0);\r
+ assertEquals(2, sheet.getRow(2).getCell(0).getNumericCellValue(), 0);\r
+ assertEquals(3, sheet.getRow(3).getCell(0).getNumericCellValue(), 0);\r
+ assertEquals(8, sheet.getRow(5).getCell(0).getNumericCellValue(), 0);\r
} else if ("Document".equals(ole.getInstanceName())){\r
//creating a HWPF document \r
HWPFDocument doc = new HWPFDocument(data.getData());\r
public void test27272_1() throws Exception {
HSSFWorkbook wb = openSample("27272_1.xls");
wb.getSheetAt(0);
- assertEquals("Reference for named range ", "Compliance!#REF!",wb.getNameAt(0).getReference());
+ assertEquals("Reference for named range ", "Compliance!#REF!",wb.getNameAt(0).getRefersToFormula());
File outF = File.createTempFile("bug27272_1",".xls");
wb.write(new FileOutputStream(outF));
System.out.println("Open "+outF.getAbsolutePath()+" in Excel");
/** Unknown Ptg 3D*/
public void test27272_2() throws Exception {
HSSFWorkbook wb = openSample("27272_2.xls");
- assertEquals("Reference for named range ", "LOAD.POD_HISTORIES!#REF!",wb.getNameAt(0).getReference());
+ assertEquals("Reference for named range ", "LOAD.POD_HISTORIES!#REF!",wb.getNameAt(0).getRefersToFormula());
File outF = File.createTempFile("bug27272_2",".xls");
wb.write(new FileOutputStream(outF));
System.out.println("Open "+outF.getAbsolutePath()+" in Excel");
HSSFName aNamedCell = wb.getNameAt(idx);
// Should have 2 references
- assertEquals(ref, aNamedCell.getReference());
+ assertEquals(ref, aNamedCell.getRefersToFormula());
// Check the parsing of the reference into cells
- assertFalse(AreaReference.isContiguous(aNamedCell.getReference()));
- AreaReference[] arefs = AreaReference.generateContiguous(aNamedCell.getReference());
+ assertFalse(AreaReference.isContiguous(aNamedCell.getRefersToFormula()));
+ AreaReference[] arefs = AreaReference.generateContiguous(aNamedCell.getRefersToFormula());
assertEquals(2, arefs.length);
assertEquals(refA, arefs[0].formatAsString());
assertEquals(refB, arefs[1].formatAsString());
import org.apache.poi.ss.formula.FormulaParser;\r
import org.apache.poi.ss.formula.FormulaParser.FormulaParseException;\r
/**\r
- * Avoids making {@link FormulaParser#FormulaParseException} public\r
+ * Avoids making {@link FormulaParseException} public\r
* \r
* @author Josh Micich\r
*/\r