Thanks for your reply. I'm not sure I was able to make you understand issue I have.
With MS office 2003, I have a xls template in my tool which contained some charts template. And with the tool I fill some data in the xls file (a copy of template xls) and then charts are automatically populated with some representation. So in the template xls file, in ms-word we have option in View menu (View->Sized with Window ) which fits the chart size to page size. So whereever I open (regardless PC screen size). It open the chart sheet full on the screen. With MS Office 2010, Microsoft for some unknown reasons removed this option (View->Sized with Window ), so I cannot fit my chat size to screen size/page size in my template file. So question is, is it achievale with POI apis? You said " For something like your case, you'd create the before and after files, unzip, then diff the xml files to see what was changed by your resize" What are before or after files here? I have just one template file, its not something excel charts gets resized with POI api. Still as you suggested, I unzipped the xlsx file and checked the xml file related with one of the charts (from \zip\xl\charts, attached herewith). I don't know what to change there to make the chart size to fit to the page. By just guessing I looked into the below xml part <c:plotArea> ..... <c:layout> <c:manualLayout> <c:layoutTarget val="inner"/> <c:xMode val="edge"/> <c:yMode val="edge"/> <c:x val="0.34280497446521047"/> <c:y val="0.16085086166539456"/> <c:w val="0.34679858573331412"/> <c:h val="0.76732603941769806"/> </c:manualLayout> </c:layout> .... <c:plotArea> and chenged the values of c:x, c:y, c:w, and c:h to 1. And when I rename the zip file back to xlsx file I cannot open this, excel throws error while opening this file: "Excel found unreadable content in 'FILE.xlsx'. Do you want to recover the contents of the workbook? If you trust the source of this workbook, click YES" after clicking on Yes button I get the error dialogue box "The workbook cannot be opened and repaired by Micorsoft Excel because it is corrupted" Can you please help me to resolve this issue and achieve the objective I mentioned above? Many Thanks, rahul On Thu, Aug 11, 2011 at 12:21 AM, Nick Burch <[email protected]>wrote: > On Wed, 10 Aug 2011, rahul.soa wrote: > >> How can I use BiffViewer/Is there some command to launch it? >> > > You launch it with something like: > java -classpath poi-3.8-beta3.jar org.apache.poi.hssf.dev.**BiffViewer > <filename> > > The output is a textual dump of the raw contents of the file. Diff it > between two files to see what was changed by excel when you altered some > properties in the file > > > Can I use with XSSFWorkBook? >> > > Things are simpler with the .xlsx file format, all you need to do is unzip > the .xlsx file (it's a zip of xml files) and look in the xml. For something > like your case, you'd create the before and after files, unzip, then diff > the xml files to see what was changed by your resize > > Nick > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > [email protected].**org<[email protected]> > For additional commands, e-mail: [email protected] > >
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"> <c:date1904 val="0"/> <c:lang val="en-US"/> <c:roundedCorners val="0"/> <mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <mc:Choice Requires="c14" xmlns:c14="http://schemas.microsoft.com/office/drawing/2007/8/2/chart"> <c14:style val="102"/> </mc:Choice> <mc:Fallback> <c:style val="2"/> </mc:Fallback> </mc:AlternateContent> <c:chart> <c:title> <c:tx> <c:rich> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr sz="1000" b="1" i="0" u="none" strike="noStrike" baseline="0"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:latin typeface="Arial"/> <a:ea typeface="Arial"/> <a:cs typeface="Arial"/> </a:defRPr> </a:pPr> <a:r> <a:rPr lang="en-US" sz="1000"/> <a:t>Defects By Type</a:t> </a:r> </a:p> </c:rich> </c:tx> <c:layout> <c:manualLayout> <c:xMode val="edge"/> <c:yMode val="edge"/> <c:x val="0.41412193788276463"/> <c:y val="2.9575022287299479E-2"/> </c:manualLayout> </c:layout> <c:overlay val="0"/> <c:spPr> <a:noFill/> <a:ln w="25400"> <a:noFill/> </a:ln> </c:spPr> </c:title> <c:autoTitleDeleted val="0"/> <c:plotArea> <c:layout> <c:manualLayout> <c:layoutTarget val="inner"/> <c:xMode val="edge"/> <c:yMode val="edge"/> <c:x val="0.34280497446521047"/> <c:y val="0.16085086166539456"/> <c:w val="0.34679858573331412"/> <c:h val="0.76732603941769806"/> </c:manualLayout> </c:layout> <c:pieChart> <c:varyColors val="1"/> <c:ser> <c:idx val="0"/> <c:order val="0"/> <c:tx> <c:strRef> <c:f>Summary!$D$11</c:f> <c:strCache> <c:ptCount val="1"/> </c:strCache> </c:strRef> </c:tx> <c:spPr> <a:ln w="12700"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </c:spPr> <c:explosion val="25"/> <c:dPt> <c:idx val="0"/> <c:bubble3D val="0"/> </c:dPt> <c:dLbls> <c:spPr> <a:noFill/> <a:ln w="25400"> <a:noFill/> </a:ln> </c:spPr> <c:txPr> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr sz="500" b="0" i="0" u="none" strike="noStrike" baseline="0"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:latin typeface="Arial"/> <a:ea typeface="Arial"/> <a:cs typeface="Arial"/> </a:defRPr> </a:pPr> <a:endParaRPr lang="en-US"/> </a:p> </c:txPr> <c:showLegendKey val="0"/> <c:showVal val="0"/> <c:showCatName val="1"/> <c:showSerName val="0"/> <c:showPercent val="1"/> <c:showBubbleSize val="0"/> <c:showLeaderLines val="1"/> </c:dLbls> <c:cat> <c:numRef> <c:f>[0]!ByType</c:f> <c:numCache> <c:formatCode>General</c:formatCode> <c:ptCount val="1"/> </c:numCache> </c:numRef> </c:cat> <c:val> <c:numRef> <c:f>[0]!ByTypeNumber</c:f> <c:numCache> <c:formatCode>General</c:formatCode> <c:ptCount val="1"/> </c:numCache> </c:numRef> </c:val> </c:ser> <c:dLbls> <c:showLegendKey val="0"/> <c:showVal val="1"/> <c:showCatName val="1"/> <c:showSerName val="0"/> <c:showPercent val="0"/> <c:showBubbleSize val="0"/> <c:showLeaderLines val="1"/> </c:dLbls> <c:firstSliceAng val="0"/> </c:pieChart> <c:spPr> <a:solidFill> <a:srgbClr val="FFFFFF"/> </a:solidFill> <a:ln w="25400"> <a:noFill/> </a:ln> </c:spPr> </c:plotArea> <c:legend> <c:legendPos val="r"/> <c:overlay val="0"/> <c:spPr> <a:solidFill> <a:srgbClr val="FFFFFF"/> </a:solidFill> <a:ln w="3175"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </c:spPr> <c:txPr> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr sz="500" b="0" i="0" u="none" strike="noStrike" baseline="0"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:latin typeface="Arial"/> <a:ea typeface="Arial"/> <a:cs typeface="Arial"/> </a:defRPr> </a:pPr> <a:endParaRPr lang="en-US"/> </a:p> </c:txPr> </c:legend> <c:plotVisOnly val="1"/> <c:dispBlanksAs val="zero"/> <c:showDLblsOverMax val="0"/> </c:chart> <c:spPr> <a:solidFill> <a:srgbClr val="FFFFFF"/> </a:solidFill> <a:ln w="3175"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </c:spPr> <c:txPr> <a:bodyPr/> <a:lstStyle/> <a:p> <a:pPr> <a:defRPr sz="1150" b="0" i="0" u="none" strike="noStrike" baseline="0"> <a:solidFill> <a:srgbClr val="000000"/> </a:solidFill> <a:latin typeface="Arial"/> <a:ea typeface="Arial"/> <a:cs typeface="Arial"/> </a:defRPr> </a:pPr> <a:endParaRPr lang="en-US"/> </a:p> </c:txPr> </c:chartSpace>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
