[prev in list] [next in list] [prev in thread] [next in thread]
List: poi-user
Subject: Re: Problem Renaming Print Area in French Excel
From: muhammad.sohail () ext ! mpsa ! com
Date: 2008-02-28 16:07:11
Message-ID: OFCED1B912.D0CBA612-ONC12573FD.005805C6-C12573FD.00588C70 () mpsa ! com
[Download RAW message or body]
Anyone?
-----------------------------------------------------------------------=
---------------------------------------
On Feb 22, 2008, at 6:02 PM, MUHAMMAD SOHAIL wrote:
Hi,
I am using POI version 3.0.1 Final and I am generating an Excel file.
During generation, I set Print Area using the function of HSSFWorkbook
which takes row & column numbers (pointers).
And then I try to open this file in MS Excel 2003 SP2 in French Locale
(i.e, After changing Regional Parameters (placement) to "French (France=
)"
and Menus & dialog boxes to "fran=E7ais" in Regional Settings of Window=
s 2000
Pro)
The following pop-up message appears (picture inline):
(Embedded image moved to file: pic06042.jpg)
Which means (in English):
Name already in use
The name must not be same to a predefined name
Previous name: Zone_d_impression (Print_Area in english)
New name: <text_box>
After I give whatever name in the text box, I can open Excel, but loose=
s
the print area settings that I have made (The range that I set earlier
remains with the new name that I have given, but I suppose since its no=
t
same as should be the name for the range of print area, it is simply
considered as another named range and not taken into account in print
setup).
I have also tested the code with POI version 3.0.2 Final, but the probl=
em
remains the same.
But the problem is not that simple.
Firstly, as I am generating Excel which contains many sheets with
different data, the problem occurs only with one particular sheet. A=
ll
the rest of the sheets works fine and there is no problem with print=
area for them. If I generate Excel making sure that I don't set prin=
t
area for that particular sheet, everything goes well. However, I am
unable to verify what is difference between this sheet and the rest =
of
the sheets. Even if I pass same parameters (i.e, same column and row=
numbers) to the HSSFWorkbook.setPrintArea() for all sheets, this pro=
blem
remains.
Secondly, I am also generating Repeating Headers in print setup, mor=
e
precisely Row & Columns to be repeated for every page to be printed =
for
a sheet. If I don't set print area for all sheets, the same problem
(renaming problem) appears for repeating headers. This time name is:=
Impression_des_Titres (or in English: Print_Titles). Problems remain=
s
with the same sheet. Removing repeating headers does not solve print=
area problem.
And last but not the least, when the same file is opened in English =
(US)
Locale, there is no problem while opening and neither in print setup=
.
Few things to be noted:
When I try to set print area for less number of sheets, its not that=
previously mentioned particular sheet that poses problem anymore, th=
is
time the renamed area is found under some other sheet.
If I set print area for only one sheet, it can be any sheet, without=
any
problem. But when I try to apply print area setup on more than 1 she=
et,
then they should be only 1st till 13th sheets. Adding any sheet othe=
r
than these will cause the problem.
If someone can help me out in this regard, it would be really appreciat=
ed.=
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic