DO NOT REPLY [Bug 32581] New: - Problem reading Ms word Document

2004-12-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32581

   Summary: Problem reading Ms word Document
   Product: POI
   Version: 2.5
  Platform: All
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P1
 Component: POI Overall
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


There is a problem in reading MS word.The problem persists if we are to 
read "'in the document content." has hexavalue of 22 but when poi reads it,it 
converts it to character of hexavalue 93.Same is the case with '.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mailing List Admin

2004-12-08 Thread Danny Mui
Hi Avik,
The mailing list is still annoyed that we send to messages to 
[EMAIL PROTECTED]

Try again?
thanks!
Avik Sengupta wrote:
I've done this, tell me if its still a problem.. havent seen a
confirmation from ezmlm myself. 

On Mon, 2004-09-27 at 21:15, Danny Mui wrote:
Who's got enough karma to remove [EMAIL PROTECTED] from the 
user's mailing list?  It's been bothering us for a few weeks now.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Some suggested code for POI

2004-12-08 Thread David Thielen








Hi;

 

{this and the next couple of emails are because I was told
that the POI developers aren’t on the poi-user email list. If you are I
am sorry for the duplication.)

 

Attached is some code for POI that I think should be added
to it. One warning, I am ex-Microsoft (senior developer in the Windows group,
not Office) so you have all the concerns about my not being able to make use of
internal knowledge. But the attached code makes no use of the Excel file spec.

 

Thanks - dave

 






package net.windward.format.xls;

import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFPalette;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.util.HSSFColor;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @author David Thielen
 * @version 3.1 Dec 8, 2004
 */
public class PoiUtilities {

	private static ArrayList styles = new ArrayList();

	// can't instantiate this class.
	private PoiUtilities() {
	}

	/**
	 * Get a font. If we already have this font, return it. If we don't, create it.
	 * bugbug - what units for typeOffset?
	 *
	 * @param wb The workbook the font will be used in.
	 * @param boldWeight The font weight. Should be HSSFFont.BOLDWEIGHT_*
	 * @param color The index of the font color in the color table. 0 for default color.
	 * @param fontHeight The height of the font in twips.
	 * @param fontName The font name.
	 * @param italic true if the font is italic.
	 * @param strikeout true if the font is striked out.
	 * @param typeOffset the offset of the font up/down (like the st is 1st).
	 * @param underline The font underline. Should be HSSFFont.U_*
	 *
	 * @return The font.
	 */
	public static HSSFFont findOrCreateFont(HSSFWorkbook wb, short boldWeight, short color, short fontHeight,
			String fontName, boolean italic, boolean strikeout, short typeOffset, byte underline) {

		// if it exists, return it
		HSSFFont font = wb.findFont(boldWeight, color, fontHeight, fontName, italic, strikeout, typeOffset, underline);
		if (font != null)
			return font;

		// if not, create it
		font = wb.createFont();
		font.setBoldweight(boldWeight);
		font.setColor(color);
		font.setFontHeight(fontHeight);
		font.setFontName(fontName);
		font.setItalic(italic);
		font.setStrikeout(strikeout);
		font.setTypeOffset(typeOffset);
		font.setUnderline(underline);
		return font;
	}

	/**
	 * Get a color. If we already have this color, return it. If we don't, create it.
	 *
	 * @param wb The workbook the font will be used in.
	 * @param red The red part of the color.
	 * @param green The green part of the color.
	 * @param blue The blue part of the color.
	 *
	 * @return The index in the workbook colortable. This is a 1-based index.
	 */
	public static short findOrCreateColor(HSSFWorkbook wb, byte red, byte green, byte blue) {

		HSSFPalette palette = wb.getCustomPalette();
		HSSFColor ssClr = palette.findColor(red, green, blue);
		if (ssClr != null)
			return ssClr.getIndex();
		return palette.addColor(red, green, blue).getIndex();
	}

	/**
	 * Get a style. If we already have this style, return it. If we don't, create it.
	 * bugbug - should list allowed psfi's for dataFormat, fillPat
	 * bugbug - should list the units for indent, rotation.
	 *
	 * @param wb The workbook the font will be used in.
	 * @param align set the type of horizontal alignment for the cell. Use ALIGN_*
	 * @param brdrLeft set the type of border to use for the left border of the cell. Use BORDER_*
	 * @param brdrTop set the type of border to use for the top border of the cell. Use BORDER_*
	 * @param brdrRight set the type of border to use for the right border of the cell. Use BORDER_*
	 * @param brdrBottom set the type of border to use for the bottom border of the cell. Use BORDER_*
	 * @param brdrLeftClr set the color to use for the left border.
	 * @param brdrTopClr set the color to use for the top border.
	 * @param brdrRightClr set the color to use for the right border.
	 * @param brdrBottomClr set the color to use for the bottom border.
	 * @param dataFormat set the data format (must be a valid format).
	 * @param fillForeClr set the background fill color.
	 * @param fillBackClr set the foreground fill color.
	 * @param fillPat setting to one fills the cell with the foreground color.
	 * @param font set the font for this style.
	 * @param hidden set the cell's using this style to be hidden.
	 * @param indent set the number of spaces to indent the text in the cell.
	 * @param locked set the cell's using this style to be locked.
	 * @param rotation set the degree of rotation for the text in the cell.
	 * @param vertAlign set the type of vertical alignment for the cell. Use VERTICAL_*
	 * @param wrapped set whether the text should be wrapped.
	 *
	 * @return The requested style.
	 */
	public static HSSFCellStyle findOrCreateStyle(HSSFWorkbook wb, short align, short brdrLeft, short brdrTop, short brdrRight,
shor

RE: Some suggestions for POI

2004-12-08 Thread David Thielen
 

 

  _  

From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:00 AM
To: 'POI Users List'
Subject: Some suggestions for POI

 

Hi;

 

A couple of minor suggestions that I think will help a lot.

1.  For all places entering a number, list the units in the javadoc.
More often than not the units are not listed.
2.  Create a single base class to HSSFHeader & HSSFFooter.
3.  The docs and help guides (which I think are very good) say that POI
does not support rtf. But rtf is supported via HSSFRichTextString. You
should point to that instead.

 

Thanks - dave



RE: HSSFHeader.font(String, String)

2004-12-08 Thread David Thielen


-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:00 AM
To: 'POI Users List'
Subject: HSSFHeader.font(String, String)

What is the second String parameter for the font method?

 

Thanks - dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Asking again: HSSFSheet.setColumnWidth - points?

2004-12-08 Thread David Thielen


-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:00 AM
To: 'POI Users List'
Subject: Asking again: HSSFSheet.setColumnWidth - points?

Hi;

 

How do I convert from 1/256th of a character width to twips or points?

 

Thanks - dave

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Asking again: unicode not working

2004-12-08 Thread David Thielen


-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:02 AM
To: 'POI Users List'
Subject: Asking again: unicode not working

Hi;

 

I create my spreadsheet using:

wb = new HSSFWorkbook();

sheet = wb.createSheet();

wb.setSheetName(0, process.getTitle(), HSSFWorkbook.ENCODING_UTF_16);

 

For each cell I do:

cellOn = rowOn.createCell(cellOnInd);

cellOn.setEncoding( HSSFCell.ENCODING_COMPRESSED_UNICODE );

 

But when I do a:

// code not shown â set font to Arial Unicode MS

cellOn.setCellValue(âââÐÐâ); // if you use a text mail client 
this is Euro, TM, and 2 russian characters

 

I get:

Â" // if you use a text mail client, then is 3 PC graphics chars and a â

 

And the cell is set to use Arial Unicode MS.

 

Any ideas?

 

Thanks - dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HSSFRichTextString use

2004-12-08 Thread David Thielen


-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:03 AM
To: 'POI Users List'
Subject: HSSFRichTextString use

Hi;

 

Two final (I hope) questions about HSSFRichTextString. 

1.  Is this how Excel normally stores rich text in a xls file? It seems
like a weird way to do this. 
2.  Does it support the \img tag which would provide a way to include
images. 

 

thanks - dave 

 

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HSSFHeader.font(String, String)

2004-12-08 Thread Laubach Shawn Contr OC-ALC/PSB
It's for setting the style such as Italic and Bold.

Shawn

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 2:58 PM
To: [EMAIL PROTECTED]
Subject: RE: HSSFHeader.font(String, String)



-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:00 AM
To: 'POI Users List'
Subject: HSSFHeader.font(String, String)

What is the second String parameter for the font method?

 

Thanks - dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HSSFHeader.font(String, String)

2004-12-08 Thread David Thielen
So are the choices just the strings "Regular", "Italic", & "Bold"? Or are
there other choices?

Thanks - dave


-Original Message-
From: Laubach Shawn Contr OC-ALC/PSB [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 4:23 PM
To: POI Developers List
Subject: RE: HSSFHeader.font(String, String)

It's for setting the style such as Italic and Bold.

Shawn

-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 2:58 PM
To: [EMAIL PROTECTED]
Subject: RE: HSSFHeader.font(String, String)



-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 11:00 AM
To: 'POI Users List'
Subject: HSSFHeader.font(String, String)

What is the second String parameter for the font method?

 

Thanks - dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]