You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/06/10 09:27:16 UTC
[Bug 63494] New: If multiple Sheets contains RichText then on
combining them into one workbook, RichText cell appears as blank from sheet 2
onward
https://bz.apache.org/bugzilla/show_bug.cgi?id=63494
Bug ID: 63494
Summary: If multiple Sheets contains RichText then on combining
them into one workbook, RichText cell appears as blank
from sheet 2 onward
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: OPC
Assignee: dev@poi.apache.org
Reporter: pramod.gupta@blackrock.com
Target Milestone: ---
Created attachment 36620
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36620&action=edit
attached zip file contains 2 excel sheet and the generated output
I have multiple Excel sheet, each sheet contains few RichText Cell but when i
combine all Excel sheet into a single workbook using poi-ooxml then first sheet
appears correctly but in subsequent sheets we lost our RichText cell value and
cell appears as blank.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 63494] If multiple Sheets contains RichText then on combining
them into one workbook, RichText cell appears as blank from sheet 2 onward
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63494
Pramod <pr...@blackrock.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #2 from Pramod <pr...@blackrock.com> ---
This issue is now fixed for me.
i have added below lines of code when relationship type is Shared String:
sd = SstDocument.Factory.parse(p.getInputStream());
targetsd =
SstDocument.Factory.parse(partTarget.getInputStream());
List<CTRst> ctRstArray = sd.getSst().getSiList();
String sharedString = null;
for (CTRst ctRst : ctRstArray) {
if(ctRst.getRList() != null &&
ctRst.getRList().size()>0){
List<CTRElt> rList = ctRst.getRList();
targetsd.getSst().addNewSi().getRList().addAll(rList);
}else if(ctRst.getRPhList() != null &&
ctRst.getRPhList().size() > 0){
List<CTPhoneticRun> rphList =
ctRst.getRPhList();
targetsd.getSst().addNewSi().getRPhList().addAll(rphList);
}else {
sharedString = ctRst.getT();
CTRst ctrst =
targetsd.getSst().addNewSi();
ctrst.setT(sharedString);
}
}
earlier the lines of code was:
sd = SstDocument.Factory.parse(p.getInputStream());
targetsd =
SstDocument.Factory.parse(partTarget.getInputStream());
List<CTRst> ctRstArray = sd.getSst().getSiList();
String sharedString = null;
for (CTRst ctRst : ctRstArray) {
sharedString = ctRst.getT();
CTRst ctrst =
targetsd.getSst().addNewSi();
ctrst.setT(sharedString);
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 63494] If multiple Sheets contains RichText then on combining
them into one workbook, RichText cell appears as blank from sheet 2 onward
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63494
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you provide the sample-code which produces those files? Ideally as
self-sufficient test-case so others can run it.
Otherwise it is hard to exactly reproduce the problem that you are facing.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 63494] If multiple Sheets contains RichText then on combining
them into one workbook, RichText cell appears as blank from sheet 2 onward
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63494
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org