'}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(t){var e,r,o=t.target;"A"===o.tagName.toUpperCase()&&(e=parseInt(o.getAttribute("data-mce-x"),10),r=parseInt(o.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(e=9-e),e===this.lastX&&r===this.lastY||(f(n,e,r,t.control),this.lastX=e,this.lastY=r))},onclick:function(t){var e=this;"A"===t.target.tagName.toUpperCase()&&(t.preventDefault(),t.stopPropagation(),e.parent().cancel(),n.undoManager.transact(function(){Pr.insert(n,e.lastX+1,e.lastY+1)}),n.addVisual())}}]};function g(t){return function(){n.execCommand(t)}}var p={text:"Table properties",context:"table",onPostRender:l,onclick:m.curry(Ta,n,!0)},h={text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"},v={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:s},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:s},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:s},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:s},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:s},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:s},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:s},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:s}]},b={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:s},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:s},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:s}]},y={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:s},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:function(){var n=this;i.push(n),e.fold(function(){a(n)},function(t){n.disabled(t.mergable().isNone())})}},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:function(){var n=this;u.push(n),e.fold(function(){a(n)},function(t){n.disabled(t.unmergable().isNone())})}}]};n.addMenuItem("inserttable",d),n.addMenuItem("tableprops",p),n.addMenuItem("deletetable",h),n.addMenuItem("row",v),n.addMenuItem("column",b),n.addMenuItem("cell",y)}};f.add("table",function(n){var t=oc(n),e=Ps(n,t.lazyResize),r=ha(n,t.lazyWire),o=Ws(n);Ia.registerCommands(n,r,e,o),Nr.registerEvents(n,o,r,e),Ls.addMenuItems(n,o),Ms.addButtons(n),Ms.addToolbars(n),n.on("PreInit",function(){n.serializer.addTempAttr(br.firstSelected()),n.serializer.addTempAttr(br.lastSelected())}),!1!==n.settings.table_tab_navigation&&n.on("keydown",function(e){ml.handle(e,n,r,t.lazyWire)}),n.on("remove",function(){t.destroy(),e.destroy()}),this.insertTable=function(t,e){return Pr.insert(n,t,e)},this.setClipboardRows=Ia.setClipboardRows,this.getClipboardRows=Ia.getClipboardRows})}();!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Delay"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),r={getTabFocus:function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))}},c=t.DOM,s=function(e){e.keyCode!==u.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},a=function(e){function t(t){var s,a,y,f;if(!(t.keyCode!==u.TAB||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented())&&(1===(y=l.explode(r.getTabFocus(e))).length&&(y[1]=y[0],y[0]=":prev"),a=t.shiftKey?":prev"===y[0]?m(-1):c.get(y[0]):":next"===y[1]?m(1):c.get(y[1]))){var d=n.get(a.id||a.name);a.id&&d?d.focus():o.setTimeout(function(){i.webkit||window.focus(),a.focus()},10),t.preventDefault()}function m(i){function o(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&n.get(t.id)&&-1!==e.tabIndex&&function i(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&i(e.parentNode)}(e)}if(a=c.select(":input:enabled,*[tabindex]:not(iframe)"),l.each(a,function(t,n){if(t.id===e.id)return s=n,!1}),i>0){for(f=s+1;f=0;f--)if(o(a[f]))return a[f];return null}}e.on("init",function(){e.inline&&c.setAttrib(e.getBody(),"tabIndex",null),e.on("keyup",s),i.gecko?e.on("keypress keydown",t):e.on("keydown",t)})};e.add("tabfocus",function(e){a(e)})}();!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!t.get("tinymcespellchecker")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},r=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},o=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},i=function(e){return e.getParam("spellchecker_rpc_url")},c=function(e){return e.getParam("spellchecker_callback")},a=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},l=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=tinymce.util.Tools.resolve("tinymce.util.URI"),u=tinymce.util.Tools.resolve("tinymce.util.XHR"),d=function(e){return e.fire("SpellcheckStart")},f=function(e){return e.fire("SpellcheckEnd")};function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var g,m=function(e,t){var n,r,o,i,c,a=[],l=t.dom;function s(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function u(t){var n=e.getElementsByTagName("*"),r=[];t="number"==typeof t?""+t:null;for(var o=0;o=u.end?(a=g,s=u.end-f):r&&d.push(g),!r&&g.length+f>u.start&&(r=g,l=u.start-f),f+=g.length),r&&a){if(g=n({startNode:r,startNodeIndex:l,endNode:a,endNodeIndex:s,innerNodes:d,match:u.text,matchIndex:m}),f-=a.length-s,r=null,a=null,d=[],m++,!(u=t.shift()))break}else if(i[g.nodeName]&&!o[g.nodeName]||!g.firstChild){if(g.nextSibling){g=g.nextSibling;continue}}else if(!h(g)){g=g.firstChild;continue}for(;;){if(g.nextSibling){g=g.nextSibling;break}if(g.parentNode===e)break e;g=g.parentNode}}}(e,a,function(e){function t(t,n){var r=a[n];r.stencil||(r.stencil=e(r));var o=r.stencil.cloneNode(!1);return o.setAttribute("data-mce-index",n),t&&o.appendChild(l.doc.createTextNode(t)),o}return function(e){var n,r,o,i=e.startNode,c=e.endNode,a=e.matchIndex,s=l.doc;if(i===c){var u=i;o=u.parentNode,e.startNodeIndex>0&&(n=s.createTextNode(u.data.substring(0,e.startNodeIndex)),o.insertBefore(n,u));var d=t(e.match,a);return o.insertBefore(d,u),e.endNodeIndex0&&r.insertNode(t.dom.doc.createTextNode(n)),r},rangeFromMatch:m,indexOf:d}},p=function(e,t){if(!t.get()){var n=m(e.getBody(),e);t.set(n)}return t.get()},v=function(e,t,n,r,o,a,d){var f,h,g,m=c(e);(m||(f=e,h=t,g=n,function(e,t,n,r){var o={method:e,lang:g.get()},c="";o["addToDictionary"===e?"word":"text"]=t,l.each(o,function(e,t){c&&(c+="&"),c+=t+"="+encodeURIComponent(e)}),u.send({url:new s(h).toAbsolute(i(f)),type:"post",content_type:"application/x-www-form-urlencoded",data:c,success:function(e){if(e=JSON.parse(e))e.error?r(e.error):n(e);else{var t=f.translate("Server response wasn't proper JSON.");r(t)}},error:function(){var e=f.translate("The spelling service was not found: (")+i(f)+f.translate(")");r(e)}})})).call(e.plugins.spellchecker,r,o,a,d)},x=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||N(e,t,n)},N=function(e,t,n){if(p(e,n).reset(),n.set(null),t.get())return t.set(!1),f(e),!0},k=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},y=function(e,t,n,r,o){var i,c;if(o.words?(c=!!o.dictionary,i=o.words):i=o,e.setProgressState(!1),function(e){for(var t in e)return!1;return!0}(i)){var l=e.translate("No misspellings found.");return e.notificationManager.open({text:l,type:"info"}),void t.set(!1)}r.set({suggestions:i,hasDictionarySupport:c}),p(e,n).find(a(e)).filter(function(e){return!!i[e.text]}).wrap(function(t){return e.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":t.text})}),t.set(!0),d(e)},S={spellcheck:function(e,t,n,r,o,i){N(e,n,r)||(e.setProgressState(!0),v(e,t,i,"spellcheck",p(e,r).text,function(t){y(e,n,r,o,t)},function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1),N(e,n,r)}),e.focus())},checkIfFinished:x,addToDictionary:function(e,t,n,r,o,i){e.setProgressState(!0),v(e,t,"addToDictionary",o,function(){e.setProgressState(!1),e.dom.remove(i,!0),x(e,n,r)},function(t){e.notificationManager.open({text:t,type:"error"}),e.setProgressState(!1)})},ignoreWord:function(e,t,n,r,o,i){e.selection.collapse(),i?l.each(e.dom.select("span.mce-spellchecker-word"),function(t){t.getAttribute("data-mce-word")===r&&e.dom.remove(t,!0)}):e.dom.remove(o,!0),x(e,t,n)},findSpansByIndex:function(e,t){var n,r=[];if((n=l.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o1&&(m.type="splitbutton",m.menu=h,m.onshow=(f=e,function(e){var t=o(f);e.control.items().each(function(e){e.active(e.settings.data===t)})}),m.onselect=function(e){c.set(e.control.settings.data)}),e.addButton("spellchecker",m),e.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:g,selectable:!0,onPostRender:function(){var t=this;t.active(n.get()),e.on("SpellcheckStart SpellcheckEnd",function(){t.active(n.get())})}})},I=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),E=tinymce.util.Tools.resolve("tinymce.ui.Factory"),P=function(e,t,n,r,o){e.on("click",function(i){var c=i.target;if("mce-spellchecker-word"===c.className){i.preventDefault();var a=S.findSpansByIndex(e,S.getElmIndex(c));if(a.length>0){var s=e.dom.createRng();s.setStartBefore(a[0]),s.setEndAfter(a[a.length-1]),e.selection.setRng(s),function(e,t,n,r,o,i,c){var a=[],s=n.get().suggestions[i];l.each(s,function(t){a.push({text:t,onclick:function(){e.insertContent(e.dom.encode(t)),e.dom.remove(c),S.checkIfFinished(e,r,o)}})}),a.push({text:"-"}),n.get().hasDictionarySupport&&a.push({text:"Add to Dictionary",onclick:function(){S.addToDictionary(e,t,r,o,i,c)}}),a.push.apply(a,[{text:"Ignore",onclick:function(){S.ignoreWord(e,r,o,i,c)}},{text:"Ignore all",onclick:function(){S.ignoreWord(e,r,o,i,c,!0)}}]),(g=E.create("menu",{items:a,context:"contextmenu",onautohide:function(e){-1!==e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){g.remove(),g=null}})).renderTo(document.body);var u=I.DOM.getPos(e.getContentAreaContainer()),d=e.dom.getPos(c[0]),f=e.dom.getRoot();"BODY"===f.nodeName?(d.x-=f.ownerDocument.documentElement.scrollLeft||f.scrollLeft,d.y-=f.ownerDocument.documentElement.scrollTop||f.scrollTop):(d.x-=f.scrollLeft,d.y-=f.scrollTop),u.x+=d.x,u.y+=d.y,g.moveTo(u.x,u.y+c[0].offsetHeight)}(e,t,n,r,o,c.getAttribute("data-mce-word"),a)}}})};t.add("spellchecker",function(t,r){if(!1===n(t)){var i=e(!1),c=e(o(t)),a=e(null),l=e({});return T(t,r,i,a,c,l),P(t,r,l,i,a),b(t,r,i,a,l,c),w(t,i,l,a,r)}})}();!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");function r(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var a={findAndReplaceDOMText:function(e,t,n,a,i){var o,d,c,l,s,u,f=[],p=0;function g(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(t>0){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(c=t.ownerDocument,l=i.getBlockElements(),s=i.getWhiteSpaceElements(),u=i.getShortEndedElements(),d=function h(e){var t;if(3===e.nodeType)return e.data;if(s[e.nodeName]&&!l[e.nodeName])return"";if(t="",r(e))return"\n";if((l[e.nodeName]||u[e.nodeName])&&(t+="\n"),e=e.firstChild)do{t+=h(e)}while(e=e.nextSibling);return t}(t)){if(e.global)for(;o=e.exec(d);)f.push(g(o,a));else o=d.match(e),f.push(g(o,a));return f.length&&(p=f.length,function(e,t,n){var a,i,o,d,c=[],f=0,p=e,g=t.shift(),h=0;e:for(;;){if((l[p.nodeName]||u[p.nodeName]||r(p))&&f++,3===p.nodeType&&(!i&&p.length+f>=g[1]?(i=p,d=g[1]-f):a&&c.push(p),!a&&p.length+f>g[0]&&(a=p,o=g[0]-f),f+=p.length),a&&i){if(p=n({startNode:a,startNodeIndex:o,endNode:i,endNodeIndex:d,innerNodes:c,match:g[2],matchIndex:h}),f-=i.length-d,a=null,i=null,c=[],h++,!(g=t.shift()))break}else if(s[p.nodeName]&&!l[p.nodeName]||!p.firstChild){if(p.nextSibling){p=p.nextSibling;continue}}else if(!r(p)){p=p.firstChild;continue}for(;;){if(p.nextSibling){p=p.nextSibling;break}if(p.parentNode===e)break e;p=p.parentNode}}}(t,f,function(e){var t;if("function"!=typeof e){var n=e.nodeType?e:c.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(c.createTextNode(e)),r}}else t=e;return function(e){var n,r,a,i=e.startNode,o=e.endNode,d=e.matchIndex;if(i===o){var l=i;a=l.parentNode,e.startNodeIndex>0&&(n=c.createTextNode(l.data.substring(0,e.startNodeIndex)),a.insertBefore(n,l));var s=t(e.match[0],d);return a.insertBefore(s,l),e.endNodeIndex0},p=function(e,t,r){var a,d,c,l;for(d=n.toArray(e.getBody().getElementsByTagName("span")),a=0;a0},h=function(e,t){return d(e,t.get()-1).length>0},m={done:p,find:function(e,t,n,r,i){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"\\s"),n=i?"\\b"+n+"\\b":n;var o,d,l,s,u,f=(o=e,d=t,l=new RegExp(n,r?"g":"gi"),(u=o.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",s=o.getBody(),p(o,d,!1),a.findAndReplaceDOMText(l,s,u,!1,o.schema));return f&&(t.set(-1),t.set(c(e,t,!0))),f},next:s,prev:u,replace:function(e,t,r,a,d){var c,p,m,v,x,b,N=t.get();for(a=!1!==a,m=e.getBody(),p=n.grep(n.toArray(m.getElementsByTagName("span")),f),c=0;ct.get()&&p[c].setAttribute("data-mce-index",x-1)}return t.set(N),a?(b=g(e,t),s(e,t)):(b=h(e,t),u(e,t)),!d&&b},hasNext:g,hasPrev:h},v=function(e,t){return{done:function(n){return m.done(e,t,n)},find:function(n,r,a){return m.find(e,t,n,r,a)},next:function(){return m.next(e,t)},prev:function(){return m.prev(e,t)},replace:function(n,r,a){return m.replace(e,t,n,r,a)}}},x=function(e,t){var r,a={};function i(){d.statusbar.find("#next").disabled(!1===m.hasNext(e,t)),d.statusbar.find("#prev").disabled(!1===m.hasPrev(e,t))}function o(){e.windowManager.alert("Could not find the specified string.",function(){d.find("#find")[0].focus()})}e.undoManager.add(),r=n.trim(e.selection.getContent({format:"text"}));var d=e.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){e.focus(),m.done(e,t),e.undoManager.add()},onSubmit:function(n){var r,c,l,s;return n.preventDefault(),c=d.find("#case").checked(),s=d.find("#words").checked(),(l=d.find("#find").value()).length?a.text===l&&a.caseState===c&&a.wholeWord===s?m.hasNext(e,t)?(m.next(e,t),void i()):void o():((r=m.find(e,t,l,c,s))||o(),d.statusbar.items().slice(1).disabled(0===r),i(),void(a={text:l,caseState:c,wholeWord:s})):(m.done(e,t,!1),void d.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){d.submit()}},{text:"Replace",disabled:!0,onclick:function(){m.replace(e,t,d.find("#replace").value())||(d.statusbar.items().slice(1).disabled(!0),t.set(-1),a={})}},{text:"Replace all",disabled:!0,onclick:function(){m.replace(e,t,d.find("#replace").value(),!0,!0),d.statusbar.items().slice(1).disabled(!0),a={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){m.prev(e,t),i()}},{text:"Next",name:"next",disabled:!0,onclick:function(){m.next(e,t),i()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:r},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},b=function(e,t){e.addCommand("SearchReplace",function(){x(e,t)})},N=function(e,t){return function(){x(e,t)}},y=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:N(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:N(e,t)}),e.shortcuts.add("Meta+F","",N(e,t))};t.add("searchreplace",function(t){var n=e(-1);return b(t,n),y(t,n),v(t,n)})}();!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(n){return n.getParam("save_enablewhendirty",!0)},o=function(n){return!!n.getParam("save_onsavecallback")},c=function(n){return!!n.getParam("save_oncancelcallback")},i=function(n,e){n.notificationManager.open({text:n.translate(e),type:"error"})},r=function(n){var t;if(t=e.DOM.getParent(n.id,"form"),!a(n)||n.isDirty()){if(n.save(),o(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();t?(n.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():i(n,"Error: Form submit field collision.")),n.nodeChanged()):i(n,"Error: No form element found.")}},l=function(n){var e=t.trim(n.startContent);c(n)?n.execCallback("save_oncancelcallback",n):(n.setContent(e),n.undoManager.clear(),n.nodeChanged())},d=function(n){n.addCommand("mceSave",function(){r(n)}),n.addCommand("mceCancel",function(){l(n)})},s=function(n){return function(e){var t=e.control;n.on("nodeChange dirty",function(){t.disabled(a(n)&&!n.isDirty())})}},u=function(n){n.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:s(n)}),n.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:s(n)}),n.addShortcut("Meta+S","","mceSave")};n.add("save",function(n){u(n),d(n)})}();!function(){"use strict";var t=function(t){t.addCommand("mcePrint",function(){t.getWin().print()})},n=function(t){t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("print",function(i){t(i),n(i),i.addShortcut("Meta+P","","mcePrint")})}();!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return parseInt(e.getParam("plugin_preview_width","650"),10)},i=function(e){return parseInt(e.getParam("plugin_preview_height","500"),10)},o=function(e){return e.getParam("content_style","")},r=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(e){var t="",n=e.dom.encode,i=o(e);t+='',i&&(t+='"),r.each(e.contentCSS,function(i){t+=''});var c=e.settings.body_id||"tinymce";-1!==c.indexOf("=")&&(c=(c=e.getParam("body_id","","hash"))[e.id]||c);var a=e.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=e.getParam("body_class","","hash"))[e.id]||"");var s=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";return""+t+'"+e.getContent()+'");
+ }
+ }
+ catch (Exception ex)
+ {
+ System.Web.HttpContext.Current.Response.Write("");
+ }
+ }
+
+ public static void DeleteExcel(ref string ServerPath)
+ {
+ System.IO.FileInfo file = new System.IO.FileInfo(ServerPath);
+ if (file.Exists == true)
+ {
+ File.Delete(ServerPath);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/DrawPicture.cs.2.exclude b/MES_Manage/App_code/DrawPicture.cs.2.exclude
new file mode 100644
index 0000000..a616272
--- /dev/null
+++ b/MES_Manage/App_code/DrawPicture.cs.2.exclude
@@ -0,0 +1,1177 @@
+namespace SPC.WebUI
+{
+ using System;
+ using System.Data;
+ using System.Drawing;
+ using System.Drawing.Imaging;
+ using System.Web;
+ using System.Web.UI;
+ using System.Web.UI.WebControls;
+ using System.Xml;
+ using SPC.SystemFrameworks;
+
+ using ASPNet_Drawing;
+ ///
+ /// DrawPicture ժҪ˵
+ ///
+ public class DrawPicture
+ {
+ private Graph obGraph = null;
+ ///
+ /// ͼ
+ ///
+ public Bitmap DrawTrendChart(DataTable[] mytable,String[] trendName,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_Trend_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( mytable, 2 ,trendName);
+ XmlDataDocument mydocument_Trend;
+
+ myStatisticalFunction.SPC_Trend(out mydocument_Trend);
+ obGraph.HasLegends = true;
+ obGraph.SetGraphData (mydocument_Trend);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ϸƷͼ
+ ///
+ public Bitmap DrawNPChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_NP_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = "ϸƷ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ XmlDataDocument mydocument_NP ;
+ myStatisticalFunction.SPC_NP(out mydocument_NP);
+
+ //Ĵͼ
+ obGraph.SetGraphData (mydocument_NP);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ϸƷʿͼ
+ ///
+ public Bitmap DrawPChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_P_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = "ϸƷ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ XmlDataDocument mydocument_P ;
+
+ myStatisticalFunction.SPC_P(out mydocument_P);
+
+ obGraph.SetGraphData (mydocument_P);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ˮƽͼ
+ ///
+ public Bitmap DrawXZChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_XZ_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 2 );
+ XmlDataDocument mydocument_H ;
+ myStatisticalFunction.SPC_H(out mydocument_H);
+
+ obGraph.SetGraphData (mydocument_H);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ˮƽͼ
+ ///
+ public Bitmap DrawXZChart(DataTable newTable,string columnName,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_XZ_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, columnName );
+ XmlDataDocument mydocument_H ;
+ myStatisticalFunction.SPC_H(out mydocument_H);
+
+ obGraph.SetGraphData (mydocument_H);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֱͼ
+ ///
+ public Bitmap DrawBARChart(DataTable newTable,out Unit height,out Unit width,out XmlDataDocument xmlDocument)
+ {
+ try
+ {
+ obGraph = new Spc_Bar_Graph2D();
+
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = "ݷ";
+ obGraph.YAxisLabel = "ݵƵֲ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ myStatisticalFunction.SPC_Bar(out xmlDocument);
+
+ obGraph.SetGraphData (xmlDocument);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֱͼ");
+ xmlDocument = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֱͼֵ
+ ///
+ public Bitmap DrawBARChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ XmlDataDocument xmlDocument;
+ obGraph = new Spc_Bar_Graph2D();
+
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = true;
+ obGraph.XAxisLabel = "ݷ";
+ obGraph.YAxisLabel = "ݵƵֲ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ myStatisticalFunction.SPC_Bar(out xmlDocument);
+
+ obGraph.SetGraphData (xmlDocument);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֱͼֵ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֵ-ͼ
+ ///
+ public Bitmap DrawXRChart(DataTable newTable,int Spc_GroupCount,out Unit height,out Unit width,out XmlDataDocument xmlDocument_X,out XmlDataDocument xmlDocument_R)
+ {
+ try
+ {
+ obGraph = new Spc_XR_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ Spc_XR_Graph2D obGraphXR = new Spc_XR_Graph2D();
+
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ֵ";
+
+ //ÿؼĸ߶ȣʹ֮XMLļһ
+ obGraphXR.LoadAndSetGraph();
+ myStatisticalFunction.SPC_XR(Spc_GroupCount,obGraphXR.Spc_XR_X_Digits,obGraphXR.Spc_XR_R_Digits ,out xmlDocument_X,out xmlDocument_R);
+
+ height = obGraphXR.Height;
+ width = obGraphXR.Width;
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_X);
+
+ obGraphXR.Title = "ֵͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap1 = obGraphXR.m_obBitmap;
+
+
+ obGraphXR = new Spc_XR_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ";
+
+ obGraphXR.LoadAndSetGraph();
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_R);
+
+ obGraphXR.Title = "ͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap2 = obGraphXR.m_obBitmap;
+
+ //ͼεճͼʱֻҪٺϳɾͿ
+ Bitmap mybBitmap = new Bitmap(obGraphXR.Width, obGraphXR.Height * 2);
+ Graphics mybGraphics = Graphics.FromImage(mybBitmap);
+ mybGraphics.DrawImage(m_obBitmap1,0,0,obGraphXR.Width,obGraphXR.Height);
+ mybGraphics.DrawImage(m_obBitmap2,0,obGraphXR.Height,obGraphXR.Width,obGraphXR.Height);
+
+ obGraph.m_obBitmap = mybBitmap;
+
+ if( m_obBitmap1 != null )
+ m_obBitmap1.Dispose();
+ if( m_obBitmap2 != null )
+ m_obBitmap2.Dispose();
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err," ֵ-ͼ");
+ xmlDocument_X = null;
+ xmlDocument_R= null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֵ-ͼֵ
+ ///
+ public Bitmap DrawXRChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ XmlDataDocument xmlDocument_X,xmlDocument_R;
+ int Spc_GroupCount = 5;
+ obGraph = new Spc_XR_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ Spc_XR_Graph2D obGraphXR = new Spc_XR_Graph2D();
+
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ֵ";
+
+ //ÿؼĸ߶ȣʹ֮XMLļһ
+ obGraphXR.LoadAndSetGraph();
+ myStatisticalFunction.SPC_XR(Spc_GroupCount,obGraphXR.Spc_XR_X_Digits,obGraphXR.Spc_XR_R_Digits ,out xmlDocument_X,out xmlDocument_R);
+
+ height = obGraphXR.Height;
+ width = obGraphXR.Width;
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_X);
+
+ obGraphXR.Title = "ֵͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap1 = obGraphXR.m_obBitmap;
+
+
+ obGraphXR = new Spc_XR_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ";
+
+ obGraphXR.LoadAndSetGraph();
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_R);
+
+ obGraphXR.Title = "ͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap2 = obGraphXR.m_obBitmap;
+
+ //ͼεճͼʱֻҪٺϳɾͿ
+ Bitmap mybBitmap = new Bitmap(obGraphXR.Width, obGraphXR.Height * 2);
+ Graphics mybGraphics = Graphics.FromImage(mybBitmap);
+ mybGraphics.DrawImage(m_obBitmap1,0,0,obGraphXR.Width,obGraphXR.Height);
+ mybGraphics.DrawImage(m_obBitmap2,0,obGraphXR.Height,obGraphXR.Width,obGraphXR.Height);
+
+ obGraph.m_obBitmap = mybBitmap;
+
+ if( m_obBitmap1 != null )
+ m_obBitmap1.Dispose();
+ if( m_obBitmap2 != null )
+ m_obBitmap2.Dispose();
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֵ-ͼֵ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֵ-ƫͼ
+ ///
+ public Bitmap DrawXSChart(DataTable newTable,int Spc_GroupCount,out Unit height,out Unit width,out XmlDataDocument xmlDocument_X,out XmlDataDocument xmlDocument_S)
+ {
+ try
+ {
+ obGraph = new Spc_XR_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ //Ĵͼ
+ Spc_XS_Graph2D obGraphXR = new Spc_XS_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ֵ";
+
+ obGraphXR.LoadAndSetGraph();
+ myStatisticalFunction.SPC_XS(Spc_GroupCount,obGraphXR.Spc_XS_X_Digits,obGraphXR.Spc_XS_S_Digits,out xmlDocument_X,out xmlDocument_S);
+
+ height = obGraphXR.Height;
+ width = obGraphXR.Width;
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_X);
+
+ obGraphXR.Title = "ֵͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap1 = obGraphXR.m_obBitmap;
+
+ obGraphXR = new Spc_XS_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = "ƫ ֵ";
+
+ obGraphXR.LoadAndSetGraph();
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_S);
+
+ obGraphXR.Title = "ƫͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap2 = obGraphXR.m_obBitmap;
+
+ //ͼεճͼʱֻҪٺϳɾͿ
+ Bitmap mybBitmap = new Bitmap(obGraphXR.Width, obGraphXR.Height * 2);
+ Graphics mybGraphics = Graphics.FromImage(mybBitmap);
+ mybGraphics.DrawImage(m_obBitmap1,0,0,obGraphXR.Width,obGraphXR.Height);
+ mybGraphics.DrawImage(m_obBitmap2,0,obGraphXR.Height,obGraphXR.Width,obGraphXR.Height);
+ obGraph.m_obBitmap = mybBitmap;
+
+ if( m_obBitmap1 != null )
+ m_obBitmap1.Dispose();
+ if( m_obBitmap2 != null )
+ m_obBitmap2.Dispose();
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֵ-ƫͼ");
+ xmlDocument_X = null;
+ xmlDocument_S = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֵ-ƫͼֵ
+ ///
+ public Bitmap DrawXSChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ XmlDataDocument xmlDocument_X,xmlDocument_S;
+ int Spc_GroupCount = 5;
+ obGraph = new Spc_XR_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ //Ĵͼ
+ Spc_XS_Graph2D obGraphXR = new Spc_XS_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = " ֵ";
+
+ obGraphXR.LoadAndSetGraph();
+ myStatisticalFunction.SPC_XS(Spc_GroupCount,obGraphXR.Spc_XS_X_Digits,obGraphXR.Spc_XS_S_Digits,out xmlDocument_X,out xmlDocument_S);
+
+ height = obGraphXR.Height;
+ width = obGraphXR.Width;
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_X);
+
+ obGraphXR.Title = "ֵͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap1 = obGraphXR.m_obBitmap;
+
+ obGraphXR = new Spc_XS_Graph2D();
+ obGraphXR.HasXAxisLabel = true;
+ obGraphXR.HasYAxisLabel = true;
+ obGraphXR.XAxisLabel = " ";
+ obGraphXR.YAxisLabel = "ƫ ֵ";
+
+ obGraphXR.LoadAndSetGraph();
+
+ obGraphXR.Width = obGraphXR.Width;
+ obGraphXR.Height = obGraphXR.Height/2;
+ obGraphXR.SetGraphData (xmlDocument_S);
+
+ obGraphXR.Title = "ƫͼ";
+ obGraphXR.DrawGraph(ImageFormat.Jpeg);
+ Bitmap m_obBitmap2 = obGraphXR.m_obBitmap;
+
+ //ͼεճͼʱֻҪٺϳɾͿ
+ Bitmap mybBitmap = new Bitmap(obGraphXR.Width, obGraphXR.Height * 2);
+ Graphics mybGraphics = Graphics.FromImage(mybBitmap);
+ mybGraphics.DrawImage(m_obBitmap1,0,0,obGraphXR.Width,obGraphXR.Height);
+ mybGraphics.DrawImage(m_obBitmap2,0,obGraphXR.Height,obGraphXR.Width,obGraphXR.Height);
+ obGraph.m_obBitmap = mybBitmap;
+
+ if( m_obBitmap1 != null )
+ m_obBitmap1.Dispose();
+ if( m_obBitmap2 != null )
+ m_obBitmap2.Dispose();
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֵ-ƫͼֵ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ͼ
+ ///
+ public Bitmap DrawPLChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_PL_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 2 );
+ XmlDataDocument mydocument_PL ;
+
+ myStatisticalFunction.SPC_PL(out mydocument_PL);
+
+ obGraph.SetGraphData (mydocument_PL);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ͼ
+ ///
+ ///
+ public Bitmap DrawPIEChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_Pie_Graph2D();
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 2 );
+ XmlDataDocument mydocument_Pie ;//= new XmlDataDocument();
+ myStatisticalFunction.SPC_Pie(out mydocument_Pie);
+
+ obGraph.SetGraphData (mydocument_Pie);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+ }
+ ///
+ ///
+ ///
+ public Bitmap DrawGXNL(DataTable newTable,out Unit height,out Unit width,double m_GXNL_UpParam,double m_GXNL_DownParam,
+ out XmlDataDocument xmlDocument,out string[] m_Spc_GXNL_Param)
+ {
+ try
+ {
+ obGraph = new Spc_GXNL_Graph2D();
+
+ Spc_GXNL_Graph2D obGraph_GXNL = new Spc_GXNL_Graph2D();
+ obGraph_GXNL.HasXAxisLabel = true;
+ obGraph_GXNL.HasYAxisLabel = false;
+ obGraph_GXNL.XAxisLabel = "ݷ";
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ obGraph_GXNL.LoadAndSetGraph();
+ myStatisticalFunction.GXNL_Analysis( m_GXNL_UpParam,m_GXNL_DownParam,obGraph_GXNL.Spc_GXNL_ParamDigits,
+ out xmlDocument,out m_Spc_GXNL_Param);
+
+ //زȷͼĴС
+ height = obGraph_GXNL.Height;
+ width = obGraph_GXNL.Width;
+ obGraph_GXNL.SetGraphData (xmlDocument);
+
+ obGraph_GXNL.DrawGraph(ImageFormat.Jpeg);
+
+ obGraph.m_obBitmap = obGraph_GXNL.m_obBitmap;
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"");
+ xmlDocument = null;
+ m_Spc_GXNL_Param = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+
+ ///
+ ///
+ ///
+ /// ݱ
+ /// ݵ
+ /// ߶
+ ///
+ ///
+ ///
+ /// ݵĵ
+ /// б
+ ///
+ public Bitmap DrawGXNL(DataTable newTable,string columnName,out Unit height,out Unit width,double m_GXNL_UpParam,double m_GXNL_DownParam,
+ out XmlDataDocument xmlDocument,out string[] m_Spc_GXNL_Param)
+ {
+ try
+ {
+ obGraph = new Spc_GXNL_Graph2D();
+
+ Spc_GXNL_Graph2D obGraph_GXNL = new Spc_GXNL_Graph2D();
+ obGraph_GXNL.HasXAxisLabel = true;
+ obGraph_GXNL.HasYAxisLabel = false;
+ obGraph_GXNL.XAxisLabel = "ݷ";
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, columnName );
+
+ obGraph_GXNL.LoadAndSetGraph();
+
+ if(myStatisticalFunction.GXNL_Analysis( m_GXNL_UpParam,m_GXNL_DownParam,obGraph_GXNL.Spc_GXNL_ParamDigits,
+ out xmlDocument,out m_Spc_GXNL_Param))
+ {
+
+ //زȷͼĴС
+ height = obGraph_GXNL.Height;
+ width = obGraph_GXNL.Width;
+ obGraph_GXNL.SetGraphData (xmlDocument);
+
+ obGraph_GXNL.DrawGraph(ImageFormat.Jpeg);
+
+ obGraph.m_obBitmap = obGraph_GXNL.m_obBitmap;
+ return obGraph.m_obBitmap;
+ }
+ else
+ {
+ height = 0;
+ width = 0;
+ m_Spc_GXNL_Param = null;
+ return null;
+
+ }
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"");
+ xmlDocument = null;
+ m_Spc_GXNL_Param = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ֵ
+ ///
+ public Bitmap DrawGXNL(DataTable newTable,out Unit height,out Unit width,double m_GXNL_UpParam,double m_GXNL_DownParam)
+ {
+ try
+ {
+ XmlDataDocument xmlDocument;
+ string[] m_Spc_GXNL_Param;
+ obGraph = new Spc_GXNL_Graph2D();
+
+ Spc_GXNL_Graph2D obGraph_GXNL = new Spc_GXNL_Graph2D();
+ obGraph_GXNL.HasXAxisLabel = true;
+ obGraph_GXNL.HasYAxisLabel = false;
+ obGraph_GXNL.XAxisLabel = "ݷ";
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+
+ obGraph_GXNL.LoadAndSetGraph();
+ myStatisticalFunction.GXNL_Analysis( m_GXNL_UpParam,m_GXNL_DownParam,obGraph_GXNL.Spc_GXNL_ParamDigits,
+ out xmlDocument,out m_Spc_GXNL_Param);
+
+ //زȷͼĴС
+ height = obGraph_GXNL.Height;
+ width = obGraph_GXNL.Width;
+ obGraph_GXNL.SetGraphData (xmlDocument);
+
+ obGraph_GXNL.DrawGraph(ImageFormat.Jpeg);
+
+ obGraph.m_obBitmap = obGraph_GXNL.m_obBitmap;
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ֵ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// Ƴͼ
+ ///
+ ///
+ public Bitmap DrawGroupBarChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_GroupBarGraph2D();
+ obGraph.Title = "ȫ豸Чͳ";
+ obGraph.HasGridLines = false;
+ obGraph.HasLegends = true;
+
+ ((Spc_GroupBarGraph2D)obGraph).GraphAlignment = Alignment.Vertical;
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ XmlDataDocument mydocument_GroupBar ;
+ myStatisticalFunction.SPC_GroupBar(out mydocument_GroupBar);
+
+ obGraph.SetGraphData (mydocument_GroupBar);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"Ƴͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+ }
+
+ ///
+ /// ݵͼxmlļ
+ ///
+ /// ݱ
+ ///
+ /// ߶
+ ///
+ /// ݵxmlļ
+ ///
+ static public Bitmap DrawCustomBarChart(DataTable newTable,string textColumnName,string dataColumnName,out Unit height,out Unit width,out XmlDataDocument mydocument_CustomBar)
+ {
+ try
+ {
+ obGraph = new Spc_CustomBar_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable,textColumnName,dataColumnName );
+ myStatisticalFunction.SPC_CustomBar(out mydocument_CustomBar);
+ obGraph.SetGraphData (mydocument_CustomBar);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵͼxmlļ");
+ mydocument_CustomBar = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+
+ }
+ ///
+ /// ݵͼ
+ ///
+ /// ݱ
+ ///
+ /// ߶
+ ///
+ ///
+ public Bitmap DrawCustomBarChart(DataTable newTable,string textColumnName,string dataColumnName,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_CustomBar_Graph2D();
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+ XmlDataDocument mydocument_CustomBar;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable,textColumnName,dataColumnName );
+ myStatisticalFunction.SPC_CustomBar(out mydocument_CustomBar);
+ obGraph.SetGraphData (mydocument_CustomBar);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+
+ }
+ ///
+ /// ݵֱͼ:xmlĵ
+ ///
+ /// ʵ
+ /// ݵ
+ ///
+ ///
+ /// ߶
+ ///
+ ///
+ public Bitmap DrawCustomLineChart(DataTable newTable,string columnName,float UCL_Value,float LCL_Value,out Unit height,out Unit width,out XmlDataDocument xmlDocument)
+ {
+ try
+ {
+ Spc_CustomLine_Graph2D obGraph = new Spc_CustomLine_Graph2D();
+ obGraph.Spc_CustomLine_UCL_Value = UCL_Value;
+ obGraph.Spc_CustomLine_LCL_Value= LCL_Value;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, columnName );
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+ obGraph.Spc_CustomLine_UCL_Value = UCL_Value;
+ obGraph.Spc_CustomLine_LCL_Value = LCL_Value;
+
+ myStatisticalFunction.UCL_Value = UCL_Value;
+ myStatisticalFunction.LCL_Value = LCL_Value;
+
+
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ myStatisticalFunction.SPC_CustomLine( out xmlDocument );
+ height = obGraph.Height;
+ width = obGraph.Width;
+ obGraph.SetGraphData (xmlDocument);
+
+ obGraph.Title = " ͼ";
+
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵֱͼ:xmlĵ");
+ xmlDocument = null;
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ݵֱͼ
+ ///
+ /// ʵ
+ ///
+ ///
+ /// ߶
+ ///
+ ///
+ public Bitmap DrawCustomLineChart(DataTable newTable,float UCL_Value,float LCL_Value,out Unit height,out Unit width)
+ {
+ try
+ {
+ Spc_CustomLine_Graph2D obGraph = new Spc_CustomLine_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 5 );
+
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+
+
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ XmlDataDocument mydocument_CustomLine;
+ myStatisticalFunction.SPC_CustomLine( out mydocument_CustomLine );
+ height = obGraph.Height;
+ width = obGraph.Width;
+ obGraph.SetGraphData (mydocument_CustomLine);
+
+ obGraph.Title = " ͼ";
+
+ obGraph.Spc_CustomLine_LCL_Value= LCL_Value;
+ obGraph.Spc_CustomLine_UCL_Value = UCL_Value;
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵֱͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// ݵֱͼ:һ
+ ///
+ /// ݱ
+ /// ݵ
+ ///
+ ///
+ /// ߶
+ ///
+ ///
+ public Bitmap DrawCustomLineChart(DataTable newTable,string columnName,float UCL_Value,float LCL_Value,out Unit height,out Unit width)
+ {
+ try
+ {
+ Spc_CustomLine_Graph2D obGraph = new Spc_CustomLine_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 5 );
+
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+
+
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ XmlDataDocument mydocument_CustomLine;
+ myStatisticalFunction.SPC_CustomLine( out mydocument_CustomLine );
+ height = obGraph.Height;
+ width = obGraph.Width;
+ obGraph.SetGraphData (mydocument_CustomLine);
+
+ obGraph.Title = " ͼ";
+
+ obGraph.Spc_CustomLine_LCL_Value= LCL_Value;
+ obGraph.Spc_CustomLine_UCL_Value = UCL_Value;
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵֱͼ:һ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+ }
+ ///
+ /// ݵֱͼ:ͼԵ
+ ///
+ /// ʵ
+ /// ʵ
+ /// ߶
+ ///
+ ///
+ public Bitmap DrawCustomLineChart(DataTable newTable,string columnName,out Unit height,out Unit width)
+ {
+ try
+ {
+ Spc_CustomLine_Graph2D obGraph = new Spc_CustomLine_Graph2D();
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, columnName );
+
+ obGraph.HasXAxisLabel = true;
+ obGraph.HasYAxisLabel = false;
+ obGraph.XAxisLabel = " ";
+ obGraph.YAxisLabel = " ֵ";
+
+ obGraph.LoadAndSetGraph();
+
+
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ XmlDataDocument mydocument_CustomLine;
+ myStatisticalFunction.SPC_CustomLine( out mydocument_CustomLine );
+ height = obGraph.Height;
+ width = obGraph.Width;
+ obGraph.SetGraphData (mydocument_CustomLine);
+
+ obGraph.Title = " ͼ";
+
+ // obGraph.Spc_CustomLine_LCL_Value= LCL_Value;
+ // obGraph.Spc_CustomLine_UCL_Value = UCL_Value;
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"ݵֱͼ:ͼԵ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+ }
+ ///
+ /// Ƴͼ
+ ///
+ ///
+ static public Bitmap DrawOEEChart(DataTable newTable,out Unit height,out Unit width)
+ {
+ try
+ {
+ obGraph = new Spc_OEEGraph2D();
+
+ obGraph.Title = "ȫ豸Чͳ";
+ obGraph.HasGridLines = false;
+ obGraph.HasLegends = false;
+
+ ((Spc_OEEGraph2D)obGraph).GraphAlignment = Alignment.Vertical;
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 1 );
+ XmlDataDocument mydocument_GroupBar ;
+ myStatisticalFunction.SPC_GroupBar(out mydocument_GroupBar);
+
+ obGraph.SetGraphData (mydocument_GroupBar);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"Ƴͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+ ///
+ /// Ʋͼ
+ ///
+ ///
+ public Bitmap DrawStackBarChart(DataTable[] newTable,string[] trendName,out Unit height,out Unit width)
+ {
+ try
+ {
+ Spc_StackBar_Graph2D obGraph = new Spc_StackBar_Graph2D();
+ obGraph.Title = "豸ʷ״̬ͳ";
+ obGraph.HasGridLines = false;
+ obGraph.HasLegends = true;
+
+ ((Spc_StackBar_Graph2D)obGraph).GraphAlignment = Alignment.Horizontal;
+
+ obGraph.LoadAndSetGraph();
+ height = obGraph.Height;
+ width = obGraph.Width;
+
+ StatisticalFunction myStatisticalFunction = new StatisticalFunction( newTable, 2 ,trendName);
+ XmlDataDocument mydocument_StackBar ;
+ myStatisticalFunction.SPC_Trend(out mydocument_StackBar);
+ obGraph.SetGraphData (mydocument_StackBar);
+
+ obGraph.DrawGraph(ImageFormat.Jpeg);
+ return obGraph.m_obBitmap;
+ }
+ catch(Exception err)
+ {
+ ApplicationLog.WriteLog(err,"Ʋͼ");
+ height = 0;
+ width = 0;
+ return null;
+ }
+
+ }
+
+ }
+}
diff --git a/MES_Manage/App_code/DrawPicture.cs.exclude b/MES_Manage/App_code/DrawPicture.cs.exclude
new file mode 100644
index 0000000..3415e21
--- /dev/null
+++ b/MES_Manage/App_code/DrawPicture.cs.exclude
@@ -0,0 +1,29 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Xml;
+using SPC.SystemFrameworks;
+
+using ASPNet_Drawing;
+
+namespace SPC.WebUI
+{
+ ///
+ ///DrawPicture 的摘要说明
+ ///
+ public class DrawPicture
+ {
+ private Graph obGraph = null;
+
+ public DrawPicture()
+ {
+ //
+ //TODO: 在此处添加构造函数逻辑
+ //
+ }
+ }
+}
diff --git a/MES_Manage/App_code/GetSQL_Output.cs b/MES_Manage/App_code/GetSQL_Output.cs
new file mode 100644
index 0000000..f1772e1
--- /dev/null
+++ b/MES_Manage/App_code/GetSQL_Output.cs
@@ -0,0 +1,587 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data.SqlClient;
+using System.Data;
+using System.Collections;
+using MES_SPC;
+
+///
+///GetSQL_Output 的摘要说明
+///
+public class GetSQL_Output
+{//返回新的SQL语句
+ public GetSQL_Output()
+ {
+ //
+ //TODO: 在此处添加构造函数逻辑
+ //
+ }
+ //-----------------------专门由于导出excel数据量过多,而造成下载速度慢和打开excel慢而做的存储过程--------------------------------------------------------------------
+
+
+ ///
+ /// 质量数据查询
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectGoodDataReport_ADODB_New
+ (bool EnginIDCheck, string EnginID,
+ bool OPNameCheck, string OPName,
+ bool shaftNameCheck, string shaftName,
+ bool itemNameCheck, string itemName,
+ string startTime, string endTime, int isOK, bool Isuse, out string sql, out int Count,out int ColCount,out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "质量数据查询_综合查询_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号_ischeck", OPNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号", OPName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置_ischeck", shaftNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置", shaftName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量项目_ischeck", itemNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量项目", itemName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@合格标志", isOK.ToString()));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@是否禁用", Isuse));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar,4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = ColsArrayString[i];
+ }
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+
+ ///
+ /// 质量数据查询_数据备份_综合查询_ReturnSql
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectGoodDataReport_ADODB_New_DataBak
+ (bool EngineTypeCheck, string EngineType, bool EnginIDCheck, string EnginID,
+ bool OPNameCheck, string OPName,
+ bool shaftNameCheck, string shaftName,
+ bool itemNameCheck, string itemName,
+ string startTime, string endTime, int isOK, bool Isuse, out string sql, out int Count, out int ColCount, out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "质量数据查询_数据备份_综合查询_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandTimeout = 120;
+ MyCommand.CommandType = CommandType.StoredProcedure;
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号_ischeck", EngineTypeCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号", EngineType));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号_ischeck", OPNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号", OPName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置_ischeck", shaftNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置", shaftName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量项目_ischeck", itemNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量项目", itemName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@合格标志", isOK.ToString()));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@是否禁用", Isuse));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = ColsArrayString[i];
+ }
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+
+ ///
+ /// 工件总成质量数据报表
+ /// 引用页QualityData_Query_2.aspx(质量数据导出excel)
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectGoodDataReport_2_ADODB_New
+ (bool EnginIDCheck, string EnginID,
+ bool OPNameCheck, string OPName,
+ bool engineTypeIDCheck, int engineTypeID,
+ bool itemNameCheck, string itemName,
+ string startTime, string endTime, int isOK, out string sql, out int Count,out int ColCount,out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "测量数据合格_合并_视图_查询_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号_ischeck", OPNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号", OPName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号代码_ischeck", engineTypeIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号代码", engineTypeID));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置_ischeck", itemNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置", itemName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@总合格标志", isOK.ToString()));
+
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+ MyCommand.CommandTimeout = 120;
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = GetColumnName_Ver(ColsArrayString[i]);
+ }
+
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+
+ ///
+ /// 不合格质量数据
+ /// 引用页QualityData_Query_2.aspx
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectGoodDataReport_2_ADODB_New
+ (bool EnginIDCheck, string EnginID,
+ bool OPNameCheck, string OPName,
+ bool engineTypeIDCheck, int engineTypeID,
+ bool itemNameCheck, string itemName,
+ string startTime, string endTime, out string sql, out int Count, out int ColCount, out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "测量数据合格_合并_视图_不合格数据_查询_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号_ischeck", OPNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号", OPName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号代码_ischeck", engineTypeIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机型号代码", engineTypeID));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置_ischeck", itemNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@测量位置", itemName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = GetColumnName_Ver(ColsArrayString[i]);
+ }
+
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+
+ ///
+ /// 测量数据合格_变速器总成称重_报表
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectGoodData_weight_Report_ADODB_New
+(bool EnginIDCheck, string EnginID,
+ string startTime, string endTime, int isOK, out string sql, out int Count, out int ColCount, out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "测量数据合格_变速器总成称重_报表_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@合格标志", isOK.ToString()));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = ColsArrayString[i];
+ }
+
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+ public static void SelectGoodData_OKGO_Report_ADODB
+(bool EnginIDCheck, string EnginID,
+ string startTime, string endTime, out string sql, out int Count, out int ColCount, out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "电子看板_发动机号_人工合格放行记录_查询_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@领班工号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@领班工号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = ColsArrayString[i];
+ }
+
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+ ///
+ /// 物料数据报表
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void SelectMaterialReport_ADODB_New
+ (bool EnginIDCheck, string EnginID,
+ bool OPNameCheck, string OPName,
+ string startTime, string endTime, out string sql, out int Count, out int ColCount, out object[,] ColsArray)
+ {
+ try
+ {
+ string procedureName;
+ procedureName = "物料数据查询_报表_ReturnSql";
+ DateTime dt_startTime;
+ DateTime dt_endTime;
+ dt_startTime = DateTime.Parse(startTime);
+ dt_endTime = DateTime.Parse(endTime);
+
+ string constr = ApplicationConfiguration.ERP_ConnectionString;
+ SqlConnection conn = new SqlConnection(constr);
+ conn.Open();
+ SqlCommand MyCommand = new SqlCommand(procedureName, conn);
+ MyCommand.CommandType = CommandType.StoredProcedure;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号_ischeck", EnginIDCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发动机号", EnginID));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号_ischeck", OPNameCheck));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工位号", OPName));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@开始时间", dt_startTime));
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@结束时间", dt_endTime));
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@selectStr_OutPut", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@selectStr_OutPut"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Count", SqlDbType.Int));
+ MyCommand.Parameters["@Count"].Direction = ParameterDirection.Output;
+
+ MyCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ColsArray", SqlDbType.NVarChar, 4000));
+ MyCommand.Parameters["@ColsArray"].Direction = ParameterDirection.Output;
+
+ MyCommand.ExecuteNonQuery();
+
+ sql = Convert.ToString(MyCommand.Parameters["@selectStr_OutPut"].Value);
+ Count = Convert.ToInt32(MyCommand.Parameters["@Count"].Value);//返回SQL语句
+
+
+ string[] ColsArrayString = Convert.ToString(MyCommand.Parameters["@ColsArray"].Value).Split('|'); ;//所有列名的集合
+ ColsArray = new object[1, ColsArrayString.Length];
+ for (int i = 0; i < ColsArrayString.Length; i++)
+ {
+ ColsArray[0, i] = ColsArrayString[i];
+ }
+
+ ColCount = ColsArrayString.Length;
+ }
+ catch
+ {
+ sql = "";
+ Count = 0;
+ ColsArray = null;
+ ColCount = 0;
+ }
+ }
+
+
+ ///
+ /// 字段名称各个字符中间增加回车,以保证文本竖着书写。
+ ///
+ ///
+ ///
+ private static string GetColumnName_Ver(string columnName)
+ {
+ string columnName_tr;
+ columnName_tr = "";
+ for (int i = 0; i < columnName.Length; i++)
+ {
+ columnName_tr = columnName_tr + columnName[i] + Environment.NewLine;
+ }
+ return columnName_tr;
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/PageBase.cs b/MES_Manage/App_code/PageBase.cs
new file mode 100644
index 0000000..5d29402
--- /dev/null
+++ b/MES_Manage/App_code/PageBase.cs
@@ -0,0 +1,190 @@
+using System;
+using System.Web;
+using System.Web.UI;
+using System.ComponentModel;
+using System.Data;
+
+//using SPC.Common;
+//using SPC.Common.Data;
+
+///
+///PageBase 的摘要说明
+///
+namespace SPC.WebUI
+{
+ public class PageBase:System.Web.UI.Page
+ {
+ private const String UNHANDLED_EXCEPTION = "Unhandled Exception:";
+ private const String KEY_CACHEUSERS = "Cache:Users";
+ private const String KEY_CACHEASSEMBLELINEWORKPLACE = "Cache:AssembleLineWorkPlace";
+ private const String KEY_CACHEWORKPLACEMEASUREPART = "Cache:WorkPlaceMeasurePart";
+ private const String KEY_CACHEWORKPLACEMEASUREPARTCONTENT = "Cache:WorkPlaceMeasurePartContent";
+
+ private static string UrlSuffix
+ {
+ get
+ {
+ //return HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath; //多加端口号与网站发布方式有关,与发布网站带不带端口号有关
+ return HttpContext.Current.Request.Url.Host + ":" + HttpContext.Current.Request.Url.Port + HttpContext.Current.Request.ApplicationPath;
+ }
+ }
+
+ public static String SecureUrlBase
+ {
+ get
+ {
+ //return (SPCWebConfiguration.EnableSsl ? @"https://" : @"http://") + UrlSuffix;
+ return @"http://" + UrlSuffix;
+ }
+ }
+ public static String UrlBase
+ {
+ get
+ {
+ return @"http://" + UrlSuffix;
+ }
+ }
+
+ public DataSet UserSys
+ {
+ get
+ {
+ try
+ {
+ return (DataSet)(Session[KEY_CACHEUSERS]);
+ }
+ catch
+ {
+ return (null);
+ }
+ }
+ set
+ {
+ if (null == value)
+ {
+ Session.Remove(KEY_CACHEUSERS);
+ }
+ else
+ {
+ Session[KEY_CACHEUSERS] = value;
+ }
+ }
+ }
+ /////
+ ///// Retrieves the Cart for the session, forcing it to be created
+ ///// if it does not already exist.
+ /////
+ //public MeasureContent AssembleLineWorkPlace()
+ //{
+ // return AssembleLineWorkPlace(true);
+ //}
+ /////
+ ///// Retrieves the Cart for the session, optionally forcing it to
+ ///// be created if it does not already exist.
+ ///// Create the shopping cart if it does not exist.
+ /////
+ //public MeasureContent AssembleLineWorkPlace(bool forceCreate)
+ //{
+ // //
+ // // Try to get the cart from the Session
+ // //
+ // MeasureContent returnValue = (MeasureContent)(Session[KEY_CACHEASSEMBLELINEWORKPLACE]);
+
+ // if (null == returnValue)
+ // {
+ // //
+ // // If there is no cart, create it now
+ // //
+ // returnValue = new MeasureContent();
+
+ // //
+ // // Save it for later
+ // //
+ // Session.Add(KEY_CACHEASSEMBLELINEWORKPLACE, returnValue);
+ // }
+
+ // if (forceCreate) returnValue.EnsureWritable();
+
+ // return returnValue;
+ //}
+ /////
+ ///// Retrieves the Cart for the session, forcing it to be created
+ ///// if it does not already exist.
+ /////
+ //public MeasureContent WorkPlaceMeasurePart()
+ //{
+ // return WorkPlaceMeasurePart(true);
+ //}
+ /////
+ ///// Retrieves the Cart for the session, optionally forcing it to
+ ///// be created if it does not already exist.
+ ///// Create the shopping cart if it does not exist.
+ /////
+ //public MeasureContent WorkPlaceMeasurePart(bool forceCreate)
+ //{
+ // //
+ // // Try to get the cart from the Session
+ // //
+ // MeasureContent returnValue = (MeasureContent)(Session[KEY_CACHEWORKPLACEMEASUREPART]);
+
+ // if (null == returnValue)
+ // {
+ // //
+ // // If there is no cart, create it now
+ // //
+ // returnValue = new MeasureContent();
+
+ // //
+ // // Save it for later
+ // //
+ // Session.Add(KEY_CACHEWORKPLACEMEASUREPART, returnValue);
+ // }
+
+ // if (forceCreate) returnValue.EnsureWritable();
+
+ // return returnValue;
+ //}
+ /////
+ ///// Retrieves the Cart for the session, forcing it to be created
+ ///// if it does not already exist.
+ /////
+ //public MeasureContent WorkPlaceMeasurePartContent()
+ //{
+ // return WorkPlaceMeasurePartContent(true);
+ //}
+ /////
+ ///// Retrieves the Cart for the session, optionally forcing it to
+ ///// be created if it does not already exist.
+ ///// Create the shopping cart if it does not exist.
+ /////
+ //public MeasureContent WorkPlaceMeasurePartContent(bool forceCreate)
+ //{
+ // //
+ // // Try to get the cart from the Session
+ // //
+ // MeasureContent returnValue = (MeasureContent)(Session[KEY_CACHEWORKPLACEMEASUREPARTCONTENT]);
+
+ // if (null == returnValue)
+ // {
+ // //
+ // // If there is no cart, create it now
+ // //
+ // returnValue = new MeasureContent();
+
+ // //
+ // // Save it for later
+ // //
+ // Session.Add(KEY_CACHEWORKPLACEMEASUREPARTCONTENT, returnValue);
+ // }
+
+ // if (forceCreate) returnValue.EnsureWritable();
+
+ // return returnValue;
+ //}
+ protected override void OnError(EventArgs e)
+ {
+ //ApplicationLog.WriteError(ApplicationLog.FormatException(Server.GetLastError(), UNHANDLED_EXCEPTION));
+ base.OnError(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/QualityData2.cs b/MES_Manage/App_code/QualityData2.cs
new file mode 100644
index 0000000..e61ee24
--- /dev/null
+++ b/MES_Manage/App_code/QualityData2.cs
@@ -0,0 +1,79 @@
+#region 程序集 MES_SPC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+// F:\项目文件备份\15.潍柴\MES_Manage\Bin\MES_SPC.dll
+// Decompiled with ICSharpCode.Decompiler 8.1.1.7464
+#endregion
+
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using DataLinkMesWork;
+using MES_SPC;
+
+namespace MES_SPC2
+{
+ public class QualityData2
+ {
+ public static void GetQualityDataEveryOpNameDataListTable_Trend(string startTime, string endTime, bool EngineTypeIDCheck, string EngineTypeID, bool EnginIDCheck, string EnginID, bool OPNameCheck, string OPName, bool shaftNameCheck, string shaftName, bool itemNameCheck, string itemName, int isOK, string uuidCheck,string uuid , int PageCurrent, int PageSize, out int PageCount, out int ItemCount, out DataTable dt)
+ {
+ dt = null;
+ PageCount = 0;
+ ItemCount = 0;
+ string procedureName = "[质量数据_发动机质量数据_各个工位_视图_综合查询_趋势图_LLJ]";
+ SqlParameter[] sqlParameters = new SqlParameter[16]
+ {
+ new SqlParameter("@开始时间", startTime),
+ new SqlParameter("@结束时间", endTime),
+ new SqlParameter("@发动机型号代码_ischeck", EngineTypeIDCheck),
+ new SqlParameter("@发动机型号代码", EngineTypeID),
+ new SqlParameter("@工位号_ischeck", OPNameCheck),
+ new SqlParameter("@工位号", OPName),
+ new SqlParameter("@测量位置_ischeck", shaftNameCheck),
+ new SqlParameter("@测量位置", shaftName),
+ new SqlParameter("@测量项目_ischeck", itemNameCheck),
+ new SqlParameter("@测量项目", itemName),
+ new SqlParameter("@导入编号_ischeck", uuidCheck),
+ new SqlParameter("@导入编号", uuid),
+ new SqlParameter("@PageCurrent", PageCurrent),
+ new SqlParameter("@PageSize", PageSize),
+ new SqlParameter("@PageCount", PageCount),
+ new SqlParameter("@ItemCount", ItemCount)
+ };
+ //sqlParameters[14].Direction = ParameterDirection.Output;
+ //sqlParameters[15].Direction = ParameterDirection.Output;
+ string errorMessage;
+ SQLCommon.ExecuteStoredProcedure(procedureName, ApplicationConfiguration.ERP_ConnectionString, ref sqlParameters, out dt, out errorMessage);
+ }
+ public static void SelectGoodDataReport_TrendPictureBasic(bool EnginIDCheck, string EnginID, bool OPNameCheck, string OPName, bool shaftNameCheck, string shaftName, bool itemNameCheck, string itemName, string startTime, string endTime, string uuidCheck, string uuid, out DataTable dt)
+ {
+ try
+ {
+ string procedureName = "质量数据查询_综合查询_绘趋势图";
+ DateTime dateTime = DateTime.Parse(startTime);
+ DateTime dateTime2 = DateTime.Parse(endTime);
+ SqlParameter[] sqlParameters = new SqlParameter[10]
+ {
+ new SqlParameter("@发动机号_ischeck", EnginIDCheck),
+ new SqlParameter("@发动机号", EnginID),
+ new SqlParameter("@工位号_ischeck", OPNameCheck),
+ new SqlParameter("@工位号", OPName),
+ new SqlParameter("@测量位置_ischeck", shaftNameCheck),
+ new SqlParameter("@测量位置", shaftName),
+ new SqlParameter("@测量项目_ischeck", itemNameCheck),
+ new SqlParameter("@测量项目", itemName),
+ //new SqlParameter("@导入编号_ischeck", uuidCheck),
+ //new SqlParameter("@导入编号", uuid),
+ new SqlParameter("@开始时间", dateTime),
+ new SqlParameter("@结束时间", dateTime2)
+ };
+ string errorMessage;
+ SQLCommon.ExecuteStoredProcedure(procedureName, ApplicationConfiguration.ERP_ConnectionString, ref sqlParameters, out dt, out errorMessage);
+ }
+ catch
+ {
+ dt = null;
+ }
+ }
+ }
+}
+
+
diff --git a/MES_Manage/App_code/SendGPRS.cs b/MES_Manage/App_code/SendGPRS.cs
new file mode 100644
index 0000000..5b4e03f
--- /dev/null
+++ b/MES_Manage/App_code/SendGPRS.cs
@@ -0,0 +1,139 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using ChatClient;
+
+///
+///SendGPRS 的摘要说明
+///
+public static class SendGPRS
+{
+
+ private static string GPRShead = "GPRS|WEB|";
+ ///
+ ///1.通断器实时数据查询
+ ///命令格式:CXTD|通断器编号||!
+ ///
+ ///
+ ///
+ public static void SendGPRS_CXTD(string CJQ,string TDQ)
+ {
+ //"GPRS|WEB|0001|CXTD|0002|!";
+ string command = GPRShead + CJQ + "|" + "CXTD|" + TDQ + "||!";
+ webChatClient.sentmessage(command);
+ }
+ ///
+ //2、 热量表实时数据查询
+ //命令格式:CXRB|热量表类型|热量表编号|!
+ ///
+ public static void SendGPRS_CXRB(string CJQ, string RLBtype, string RLB)
+ {
+ string command = GPRShead + CJQ +"|" + "CXRB|" + RLBtype + "|" + RLB + "|!";
+ webChatClient.sentmessage(command);
+ }
+ ///
+ //3、 中心统一校时命令
+ //命令格式:TIME|采集器编号|时间(20130805171824)|!
+ ///
+ public static void SendGPRS_TIME(string CJQ)
+ {
+ string time = System.DateTime.Now.ToString("yyyyMMddHHmmss");
+ string command = GPRShead + CJQ + "|" + "TIME|" + CJQ + "|" + time + "|!";
+ webChatClient.sentmessage(command);
+ }
+ ///
+ //4,强制关断阀门
+ //命令格式:QZGD|通断器编号|ON/OFF|!
+ //GPRS收到后回传格式:QZGD |通断器编号|OK|!
+ ///
+ public static void SendGPRS_QZGD(string CJQ, string TDQ, string ONorOFF)
+ {
+ string command = GPRShead + CJQ +"|" + "QZGD|" + TDQ+"|" + ONorOFF + "|!";
+ webChatClient.sentmessage(command);
+ }
+ ///
+ //5、 设定用户温度 0005 0105
+ //命令格式:TEMP|通断器编号|温度|!
+ //GPRS收到后回传格式:TEMP |通断器编号|OK|!
+ ///
+ public static void SendGPRS_TEMP(string CJQ, string TDQ, string WD)
+ {
+ if (WD.Length == 1)
+ {
+ WD = "0" + WD;
+ }
+ string command = GPRShead +CJQ + "|" + "TEMP|" + TDQ +"|"+WD+ "|!";
+ webChatClient.sentmessage(command);
+ }
+
+ ///
+ //7、 遥控器设温使能 00/01
+ //命令格式:YKSN|通断器编号|遥控器不可以控制/遥控器可以控制|!
+ //GPRS收到后回传格式:YKSN|通断器编号|OK|!
+ ///
+ public static void SendGPRS_TEMPControl(string CJQ, string TDQ, string ONOFF)
+ {
+
+ if (ONOFF == "ON")
+ {
+ ONOFF = "01";
+ }
+ else
+ {
+ ONOFF = "00";
+ }
+ string command = GPRShead + CJQ + "|" + "YKSN|" + TDQ + "|" + ONOFF + "|!";
+ webChatClient.sentmessage(command);
+ }
+ ///
+ //6、 配置面积信息
+ //命令格式:AREA|通断器编号|面积|!
+ //GPRS收到后回传格式:AREA|通断器编号|OK|!
+ ///
+ public static void SendGPRS_AREA(string CJQ, string TDQ, string AREA)
+ {
+ string command = GPRShead + CJQ +"|" + "AREA|" + TDQ + "|" + AREA + "|!";
+ webChatClient.sentmessage(command);
+ }
+
+
+ ///
+ ///7 供暖启停
+ /// 命令格式:GNQT|采集器编号| ON/OFF|!
+ ///GPRS收到后回传格式:GNQT|采集器编号|OK|!
+ ///
+
+ public static void SendGPRS_GNQT(string CJQ,string ONOFF)
+ {
+ string command = GPRShead + CJQ + "|" + "GNQT|" + CJQ + "|" + ONOFF + "|!";
+ webChatClient.sentmessage(command);
+ }
+
+ ///
+ ///8更换热表
+ /// 命令格式:GHRB|旧热表编号|新热表编号|!
+ ///GPRS收到后回传格式:GHRB |新热表编号|OK|!
+ ///
+
+ public static void SendGPRS_GHRB(string CJQ, string OldNum, string NewNum, string newtype)
+ {
+ string command = GPRShead + CJQ + "|" + "GHRB|" + OldNum + "|" + newtype+"+" + NewNum + "|!";
+ webChatClient.sentmessage(command);
+ }
+
+
+ ///
+ ///9更换通断
+ /// 命令格式:GHTD|旧通断编号|新通断编号|!
+ ///GPRS收到后回传格式:GHTD |新通断编号|OK|!
+ ///
+
+ public static void SendGPRS_GHTD(string CJQ, string OldNum, string NewNum)
+ {
+ string command = GPRShead + CJQ + "|" + "GHTD|" + OldNum + "|" + NewNum + "|!";
+ webChatClient.sentmessage(command);
+ }
+
+
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/TcpClientConnector.cs b/MES_Manage/App_code/TcpClientConnector.cs
new file mode 100644
index 0000000..1a2d5f4
--- /dev/null
+++ b/MES_Manage/App_code/TcpClientConnector.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Net.Sockets;
+
+namespace ChatClient
+{
+ class TcpClientConnector
+ {
+ ///
+ /// 在指定时间内尝试连接指定主机上的指定端口。
+ ///
+ /// 要连接到的远程主机的 DNS 名。
+ /// 要连接到的远程主机的端口号。
+ /// 要等待的毫秒数,或 -1 表示无限期等待。
+ /// 已连接的一个 TcpClient 实例。
+ /// 本方法可能抛出的异常与 TcpClient 的构造函数重载之一
+ /// public TcpClient(string, int) 相同,并若指定的等待时间是个负数且不等于
+ /// -1,将会抛出 ArgumentOutOfRangeException。
+ public static TcpClient Connect(string hostname, int port, int millisecondsTimeout)
+ {
+ ConnectorState cs = new ConnectorState();
+ cs.Hostname = hostname;
+ cs.Port = port;
+ ThreadPool.QueueUserWorkItem(new WaitCallback(ConnectThreaded), cs);
+ if (cs.Completed.WaitOne(millisecondsTimeout, false))
+ {
+ if (cs.TcpClient != null) return cs.TcpClient;
+ throw cs.Exception;
+ }
+ else
+ {
+ cs.Abort();
+ throw new SocketException(11001); // cannot connect
+ }
+ }
+
+ private static void ConnectThreaded(object state)
+ {
+ ConnectorState cs = (ConnectorState)state;
+ cs.Thread = Thread.CurrentThread;
+ try
+ {
+ TcpClient tc = new TcpClient(cs.Hostname, cs.Port);
+ if (cs.Aborted)
+ {
+ try { tc.GetStream().Close(); }
+ catch { }
+ try { tc.Close(); }
+ catch { }
+ }
+ else
+ {
+ cs.TcpClient = tc;
+ cs.Completed.Set();
+ }
+ }
+ catch (Exception e)
+ {
+ cs.Exception = e;
+ cs.Completed.Set();
+ }
+ }
+
+ private class ConnectorState
+ {
+ public string Hostname;
+ public int Port;
+ public volatile Thread Thread;
+ public readonly ManualResetEvent Completed = new ManualResetEvent(false);
+ public volatile TcpClient TcpClient;
+ public volatile Exception Exception;
+ public volatile bool Aborted;
+ public void Abort()
+ {
+ if (Aborted != true)
+ {
+ Aborted = true;
+ try { Thread.Abort(); }
+ catch { }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/Utilities/ChartDataTableHelper/ChartDataTableHelper.cs b/MES_Manage/App_code/Utilities/ChartDataTableHelper/ChartDataTableHelper.cs
new file mode 100644
index 0000000..22f3862
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/ChartDataTableHelper/ChartDataTableHelper.cs
@@ -0,0 +1,623 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Web.UI.DataVisualization.Charting;
+using System.Collections;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// .
+ ///
+ public class ChartDataTableHelper
+ {
+ #region Members
+ protected System.Web.UI.DataVisualization.Charting.Chart ChartObj = null;
+ protected ArrayList ChartAreas = null;
+ protected bool AddTableTotals = false;
+ protected System.Drawing.Color tableColor = Color.White;
+ protected System.Drawing.Color borderColor = Color.Black;
+ protected bool enabled = true;
+ protected bool Initialized = false;
+
+ #endregion
+
+ #region Properties
+
+ ///
+ /// Enables or Disables the painting of the Data Table.
+ ///
+ public bool Enabled
+ {
+ get
+ {
+ return Enabled;
+ }
+ set
+ {
+ enabled = value;
+ }
+ }
+
+ ///
+ /// Sets or gets the Chart object.
+ ///
+ public System.Web.UI.DataVisualization.Charting.Chart Chart
+ {
+ get
+ {
+ return ChartObj;
+ }
+ set
+ {
+ ChartObj = value;
+ }
+ }
+
+
+ ///
+ /// Sets or gets the Table Color that will be painted.
+ ///
+ public System.Drawing.Color TableColor
+ {
+ get
+ {
+ return tableColor;
+ }
+ set
+ {
+ tableColor = value;
+ }
+ }
+
+ ///
+ /// Sets or gets the Table Border Color that will be painted.
+ ///
+ public System.Drawing.Color BorderColor
+ {
+ get
+ {
+ return borderColor;
+ }
+ set
+ {
+ borderColor = value;
+ }
+ }
+
+ #endregion
+
+ #region Constructors
+ ///
+ /// Construct a ChartDataTableHelper instance.
+ ///
+ public ChartDataTableHelper()
+ {
+ ChartObj = null;
+ ChartAreas = new ArrayList();
+ }
+
+ ///
+ /// Construct a ChartDataTableHelper instance and Initialize all ChartAreas with a table.
+ ///
+ public ChartDataTableHelper(System.Web.UI.DataVisualization.Charting.Chart chartObj)
+ {
+ ChartAreas = new ArrayList();
+ Initialize(chartObj);
+ }
+
+
+ ///
+ /// Construct a ChartDataTableHelper instance and Initialize the specified ChartArea with a table.
+ ///
+ public ChartDataTableHelper(System.Web.UI.DataVisualization.Charting.Chart chartObj, string chartAreaName)
+ {
+ ChartAreas = new ArrayList();
+ Initialize(chartObj, chartAreaName);
+
+ }
+
+ ///
+ /// Construct a ChartDataTableHelper instance, Initialize the specified ChartArea with a table and
+ /// set a boolean to show or hide total columns.
+ ///
+ public ChartDataTableHelper(System.Web.UI.DataVisualization.Charting.Chart chartObj, string chartAreaName, bool addTableTotals)
+ {
+ ChartAreas = new ArrayList();
+ Initialize(chartObj, chartAreaName, addTableTotals);
+
+ }
+
+ #endregion
+
+ #region Initialization Methods
+ ///
+ /// Initialize all ChartAreas with a table.
+ ///
+ public void Initialize(System.Web.UI.DataVisualization.Charting.Chart chartObj)
+ {
+ ChartObj = chartObj;
+
+ foreach(ChartArea area in ChartObj.ChartAreas)
+ {
+ AddDataTable(area.Name);
+ }
+
+ if(!Initialized)
+ ChartObj.PostPaint +=new EventHandler(this.Chart_PostPaint);
+
+ Initialized = true;
+ }
+
+
+
+ ///
+ /// Initialize all ChartAreas with a table and
+ /// set a boolean to show or hide total columns.
+ ///
+ public void Initialize(System.Web.UI.DataVisualization.Charting.Chart chartObj, bool addTableTotals)
+ {
+ AddTableTotals = addTableTotals;
+ Initialize(chartObj);
+ }
+
+ ///
+ /// Initialize the specified ChartArea with a table.
+ ///
+ public void Initialize(System.Web.UI.DataVisualization.Charting.Chart chartObj, string chartAreaName)
+ {
+ ChartObj = chartObj;
+
+ AddDataTable(chartAreaName);
+
+ if(!Initialized)
+ ChartObj.PostPaint +=new EventHandler(this.Chart_PostPaint);
+
+ Initialized = true;
+ }
+
+ ///
+ /// Initialize the specified ChartArea with a table and
+ /// set a boolean to show or hide total columns.
+ ///
+ public void Initialize(System.Web.UI.DataVisualization.Charting.Chart chartObj, string chartAreaName, bool addTableTotals)
+ {
+ ChartObj = chartObj;
+ AddTableTotals = addTableTotals;
+
+ AddDataTable(chartAreaName);
+
+ if(!Initialized)
+ ChartObj.PostPaint +=new EventHandler(this.Chart_PostPaint);
+
+ Initialized = true;
+ }
+
+ ///
+ /// Initialize the specified ChartArea with a table.
+ ///
+ public void AddDataTable(string chartAreaName)
+ {
+ if(ChartObj == null || ChartAreas.IndexOf(chartAreaName) >= 0)
+ return;
+
+ // add this chart area to the list of chart areas that need to
+ // have a data table attached
+ ChartAreas.Add(chartAreaName);
+
+ int Row = 0;
+
+
+ if(AddTableTotals)
+ {
+ // create a dummy series that will not be shown but is used for
+ // showing the totals in the data table
+ ChartObj.Series.Add("DUMMY");
+ ChartObj.Series["DUMMY"].ChartArea = chartAreaName;
+ ChartObj.Series["DUMMY"].Enabled = false;
+ ChartObj.Series["DUMMY"].Color = Color.Gainsboro;
+ }
+
+
+ // for each of the series that are attached to this
+ // named chart area, create a custom axis label.
+ // All tables lines will be drawn on a paint event.
+ // ****************************************************
+ // NOTE: ALL SERIES MUST HAVE THE SAME NUMBER OF POINTS!
+ // ****************************************************
+ foreach(Series ser in ChartObj.Series)
+ {
+ if(chartAreaName == ser.ChartArea)
+ {
+ if(AddTableTotals)
+ {
+ // shadows must be turned off otherwise
+ // they will still show up for the transparent points
+ ser.ShadowOffset = 0;
+
+ // adjust the series values to ensure they are not
+ // indexed and they are sorted... plus adding each point
+ // to make the dummy series data
+ AdjustXValues(ser);
+ }
+
+
+ Row++;
+ double From = 0.0;
+ double To = 0.0;
+ bool firstPoint = true;
+
+ double YValueTotal = 0;
+
+ foreach(DataPoint dp in ser.Points)
+ {
+ if(AddTableTotals)
+ YValueTotal += dp.YValues[0];
+
+ if(firstPoint && dp.XValue == 0)
+ From = 0.5;
+ else if(firstPoint)
+ From = dp.XValue - 0.5;
+
+ if(firstPoint)
+ {
+ ChartObj.ChartAreas[chartAreaName].AxisX.Minimum = From;
+ ChartObj.ChartAreas[chartAreaName].AxisX.MajorGrid.Interval = 1;
+ ChartObj.ChartAreas[chartAreaName].AxisX.MajorTickMark.Interval = 1;
+ ChartObj.ChartAreas[chartAreaName].AxisX.LabelStyle.Interval = 1;
+ ChartObj.ChartAreas[chartAreaName].AxisX.MajorGrid.IntervalOffset = 0.5;
+ ChartObj.ChartAreas[chartAreaName].AxisX.MajorTickMark.IntervalOffset = 0.5;
+ ChartObj.ChartAreas[chartAreaName].AxisX.LabelStyle.IntervalOffset = 0.5;
+ }
+
+ To = From + 1;
+
+ ChartObj.ChartAreas[chartAreaName].AxisX.CustomLabels.Add(
+ From, To,
+ " ", // space used as a placeholder
+ Row, LabelMarkStyle.None, GridTickTypes.None
+ );
+
+ firstPoint = false;
+ From += 1;
+ }
+
+ if(AddTableTotals)
+ ser.Points[ser.Points.Count-1].YValues[0] = YValueTotal;
+
+ ChartObj.ChartAreas[chartAreaName].AxisX.Maximum = To;
+
+ }
+ }
+
+ if(AddTableTotals)
+ AdjustYMaximum(chartAreaName);
+
+ }
+
+ ///
+ /// With the addition of Totals, the chart will try to set the maximum
+ /// values according to these totals. This will cause some series to be
+ /// barely visible. Since the points are transparent this is a poor behavior.
+ /// This method will find and explicitly set the YAxis maximum to something
+ /// a little more with the user expectations.
+ ///
+ private void AdjustYMaximum(string chartAreaName)
+ {
+ double MaxYValue = 0;
+
+ // find the max YValue from all points in all series
+ foreach(Series ser in ChartObj.Series)
+ {
+ if(chartAreaName == ser.ChartArea && ser.Enabled)
+ {
+ // check agains all points except the last point
+ // which is the totals column
+ for(int index = 0; index < ser.Points.Count-1; index++)
+ {
+ DataPoint pt = ser.Points[index];
+ if(pt.YValues[0] > MaxYValue)
+ MaxYValue = pt.YValues[0];
+ }
+ }
+ }
+
+ double LogValue = (int)(Math.Log10(MaxYValue)) + 1;
+ double NewMaxYValue = Math.Pow(10, LogValue);
+ double ratio = MaxYValue / NewMaxYValue;
+ double divisor = 1;
+
+ if(ratio <= 0.1)
+ divisor = 10;
+ else if(ratio < 0.2)
+ divisor = 5;
+ else if(ratio < 0.25)
+ divisor = 4;
+ else if(ratio < 0.4)
+ divisor = 2.5;
+ else if(ratio < 0.5)
+ divisor = 2;
+ else if(ratio < 0.8)
+ divisor = 1.25;
+
+ ChartObj.ChartAreas[chartAreaName].AxisY.Maximum = NewMaxYValue / divisor;
+ ChartObj.ChartAreas[chartAreaName].AxisY.RoundAxisValues();
+
+ }
+
+
+ ///
+ /// A cleanup method that ensures the XValues are sorted accordingly and set explicitly.
+ /// It will also create the totals for the DUMMY series.
+ ///
+ private void AdjustXValues(System.Web.UI.DataVisualization.Charting.Series series)
+ {
+ bool AddDummyPoints = true;
+
+ if(series.Name == "DUMMY")
+ return;
+ else if(ChartObj.Series["DUMMY"].Points.Count > 0)
+ AddDummyPoints = false;
+
+ // sort the series
+ series.Sort(PointSortOrder.Ascending, "X");
+
+ bool IsIndexed = false;
+
+ if(series.IsXValueIndexed)
+ IsIndexed = true;
+ else
+ {
+ bool IsFirstPoint = true;
+ bool IsLastPointZero = false;
+
+ // the series X values must be set and greater than zero
+ foreach(DataPoint pt in series.Points)
+ {
+ if(pt.XValue == 0 && !IsFirstPoint && IsLastPointZero)
+ {
+ IsIndexed = true;
+ break;
+ }
+ else if (pt.XValue == 0 && IsFirstPoint)
+ IsLastPointZero = true;
+
+ IsFirstPoint = false;
+ }
+ }
+
+ if(IsIndexed)
+ {
+ series.IsXValueIndexed = false;
+ int XValue = 0;
+
+ foreach(DataPoint pt in series.Points)
+ pt.XValue = ++XValue;
+ }
+
+ series.Points.AddXY(series.Points[series.Points.Count-1].XValue + 1, 0);
+ series.Points[series.Points.Count-1].AxisLabel = "Total";
+ series.Points[series.Points.Count-1].Color = Color.Transparent;
+ series.Points[series.Points.Count-1].BorderColor = Color.Transparent;
+
+ int index = 0;
+ foreach(DataPoint pt in series.Points)
+ {
+ if(AddDummyPoints)
+ {
+ ChartObj.Series["DUMMY"].Points.AddXY(pt.XValue, pt.YValues[0]);
+ }
+ else
+ {
+ ChartObj.Series["DUMMY"].Points[index].YValues[0] += pt.YValues[0];
+ }
+
+ index++;
+ }
+ }
+
+
+ #endregion
+
+ #region Remove Table
+
+ public void RemoveDataTable(string chartAreaName)
+ {
+ if (ChartObj.ChartAreas.IndexOf(chartAreaName) >= 0)
+ ChartObj.ChartAreas[chartAreaName].AxisX.CustomLabels.Clear();
+
+ if(ChartAreas.IndexOf(chartAreaName) >= 0)
+ {
+ ChartAreas.RemoveAt(ChartAreas.IndexOf(chartAreaName));
+ }
+ }
+
+ #endregion
+
+ #region Paint Event Handling
+
+ ///
+ /// Chart Paint event handler.
+ ///
+ private void Chart_PostPaint(object sender, System.Web.UI.DataVisualization.Charting.ChartPaintEventArgs e)
+ {
+ if( e.ChartElement is ChartArea )
+ {
+ ChartArea area = (ChartArea)e.ChartElement;
+ // call the paint method.
+ if(ChartAreas.IndexOf(area.Name) >= 0 && enabled)
+ {
+ PaintDataTable(sender, e);
+ }
+ }
+
+ }
+
+ ///
+ /// This method does all the work for the painting of the data table.
+ ///
+ private void PaintDataTable(object sender, System.Web.UI.DataVisualization.Charting.ChartPaintEventArgs e)
+ {
+ ChartArea area = (ChartArea)e.ChartElement;
+
+ // get the rect of the chart area
+ RectangleF rect = e.ChartGraphics.GetAbsoluteRectangle( area.Position.ToRectangleF() );
+
+ // get the inner plot position
+ ElementPosition elemPos = area.InnerPlotPosition;
+
+ // find the coordinates of the inner plot position
+ float x = rect.X + (rect.Width / 100 * elemPos.X);
+ float y = rect.Y + (rect.Height / 100 * elemPos.Y);
+ float ChartAreaBottomY = rect.Y + rect.Height;
+
+ float width = (rect.Width / 100 * elemPos.Width);
+ float height = (rect.Height / 100 * elemPos.Height);
+
+ // find the height of the font that will be used
+ Font axisFont = area.AxisX.LabelStyle.Font;
+ string testString = "ForFontHeight";
+ SizeF axisFontSize = e.ChartGraphics.Graphics.MeasureString(testString, axisFont);
+
+ // find the height of the font that will be used
+ Font titleFont = area.AxisX.TitleFont;
+ testString = area.AxisX.Title;
+ SizeF titleFontSize = e.ChartGraphics.Graphics.MeasureString(testString, titleFont);
+
+ int seriesCount = 0;
+
+ // for each series that is attached to the chart area,
+ // draw some boxes around the labels in the color provided
+ for(int i = e.Chart.Series.Count-1; i >= 0; i--)
+ {
+ if(area.Name == e.Chart.Series[i].ChartArea)
+ {
+ seriesCount++;
+ }
+ }
+
+ // now, if a box was actually drawn, then draw
+ // the verticle lines to separate the columns of the table.
+ if(seriesCount > 0)
+ {
+ for(int i = 0; i < e.Chart.Series.Count; i++)
+ {
+ if(area.Name == e.Chart.Series[i].ChartArea)
+ {
+ double min = area.AxisX.Minimum;
+ double max = area.AxisX.Maximum;
+
+ // modify the min value for the current axis view
+ if(area.AxisX.ScaleView.Position-1 > min)
+ min = area.AxisX.ScaleView.Position-1;
+
+ // modify the max value for the currect axis view
+ if( (area.AxisX.ScaleView.Position + area.AxisX.ScaleView.Size + 0.5) < max)
+ max = area.AxisX.ScaleView.Position + area.AxisX.ScaleView.Size + 0.5;
+
+
+ // find the starting point that will be display.
+ // this is dependent on the current axis view.
+ // this sample assumes the same number of points in each
+ // series so always take from the zeroth series
+ int pointIndex = 0;
+ foreach(DataPoint pt in ChartObj.Series[0].Points)
+ {
+ if(pt.XValue > min)
+ break;
+
+ pointIndex++;
+ }
+
+ bool TableLegendDrawn = false;
+
+ for(double AxisValue = min; AxisValue < max; AxisValue++)
+ {
+ float pixelX = (float)e.ChartGraphics.GetPositionFromAxis(area.Name, AxisName.X, AxisValue);
+ float nextPixelX = (float)e.ChartGraphics.GetPositionFromAxis(area.Name, AxisName.X, AxisValue + 1);
+ float pixelY = ChartAreaBottomY - titleFontSize.Height - (seriesCount * axisFontSize.Height);
+
+ PointF point1 = PointF.Empty;
+ PointF point2 = PointF.Empty;
+
+ // Set Maximum and minimum points
+ point1.X = pixelX;
+ point1.Y = 0;
+
+ // Convert relative coordinates to absolute coordinates.
+ point1 = e.ChartGraphics.GetAbsolutePoint(point1);
+ point2.X = point1.X;
+ point2.Y = ChartAreaBottomY - titleFontSize.Height;
+ point1.Y = pixelY;
+
+ // Draw connection line
+ e.ChartGraphics.Graphics.DrawLine(new Pen(borderColor), point1,point2);
+
+
+ point2.X = nextPixelX;
+ point2.Y = 0;
+ point2 = e.ChartGraphics.GetAbsolutePoint(point2);
+
+ StringFormat format = new StringFormat();
+ format.Alignment = StringAlignment.Center;
+ format.LineAlignment = StringAlignment.Center;
+
+ // for each series draw one value in the column
+ int row = 0;
+ foreach(Series ser in ChartObj.Series)
+ {
+ if(area.Name == ser.ChartArea)
+ {
+ if(!TableLegendDrawn)
+ {
+ // draw the series color box
+ e.ChartGraphics.Graphics.FillRectangle(new SolidBrush(ser.Color),
+ x-10, row*(axisFont.Height)+(point1.Y), 10, axisFontSize.Height);
+
+ e.ChartGraphics.Graphics.DrawRectangle(new Pen(borderColor),
+ x-10, row*(axisFont.Height)+(point1.Y), 10, axisFontSize.Height);
+
+ e.ChartGraphics.Graphics.FillRectangle(new SolidBrush(tableColor),
+ x,
+ row*(axisFont.Height)+(point1.Y),
+ width,
+ axisFontSize.Height);
+
+ e.ChartGraphics.Graphics.DrawRectangle(new Pen(borderColor),
+ x,
+ row*(axisFont.Height)+(point1.Y),
+ width,
+ axisFontSize.Height);
+
+ }
+
+ if(pointIndex < ser.Points.Count)
+ {
+ string label = ser.Points[pointIndex].YValues[0].ToString();
+ RectangleF textRect = new RectangleF(point1.X, row*(axisFont.Height)+(point1.Y+1), point2.X-point1.X, axisFont.Height);
+ e.ChartGraphics.Graphics.DrawString(label, axisFont, new SolidBrush(area.AxisX.LabelStyle.ForeColor), textRect, format);
+ }
+
+ row++;
+
+ }
+ }
+
+ TableLegendDrawn = true;
+
+ pointIndex++;
+ }
+
+ // do this only once so break!
+ break;
+ }
+ }
+ }
+ }
+
+
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/Utilities/ChartDataTableHelper/_system~.ini b/MES_Manage/App_code/Utilities/ChartDataTableHelper/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/ChartDataTableHelper/vssver2.scc b/MES_Manage/App_code/Utilities/ChartDataTableHelper/vssver2.scc
new file mode 100644
index 0000000..293b675
Binary files /dev/null and b/MES_Manage/App_code/Utilities/ChartDataTableHelper/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/HistogramchartHelper/HistogramchartHelper.cs b/MES_Manage/App_code/Utilities/HistogramchartHelper/HistogramchartHelper.cs
new file mode 100644
index 0000000..0347b7b
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/HistogramchartHelper/HistogramchartHelper.cs
@@ -0,0 +1,258 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Web.UI.DataVisualization.Charting;
+using System.Collections;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// Helper class that creates a histogram chart. Histogram is a data
+ /// distribution chart which shows how many values, from the data series,
+ /// are inside each segment interval.
+ ///
+ /// You can define how many intervals you want to have using the SegmentIntervalNumber
+ /// field or the exact length of the interval using the SegmentIntervalWidth
+ /// field. Actual segment interval number can be slightly different due
+ /// to the automatic interval rounding.
+ ///
+ public class HistogramChartHelper
+ {
+ #region Fields
+
+ ///
+ /// Number of class intervals the data range is devided in.
+ /// This property only has affect when "SegmentIntervalWidth" is
+ /// set to double.NaN.
+ ///
+ public int SegmentIntervalNumber = 20;
+
+ ///
+ /// Histogram class interval width. Setting this value to "double.NaN"
+ /// will result in automatic width calculation based on the data range
+ /// and number of required interval specified in "SegmentIntervalNumber".
+ ///
+ public double SegmentIntervalWidth = double.NaN;
+
+ ///
+ /// Indicates that percent frequency should be shown on the right axis
+ ///
+ public bool ShowPercentOnSecondaryYAxis = true;
+
+ #endregion // Fields
+
+ #region Methods
+
+ ///
+ /// Creates a histogram chart.
+ ///
+ /// Chart control reference.
+ /// Name of the series which stores the original data.
+ /// Name of the histogram series.
+ public void CreateHistogram(
+ Chart chartControl,
+ string dataSeriesName,
+ string histogramSeriesName)
+ {
+ // Validate input
+ if (chartControl == null)
+ {
+ throw (new ArgumentNullException("chartControl"));
+ }
+ if (chartControl.Series.IndexOf(dataSeriesName) < 0)
+ {
+ throw (new ArgumentException("Series with name'" + dataSeriesName + "' was not found.", "dataSeriesName"));
+ }
+
+ // Make data series invisible
+ chartControl.Series[dataSeriesName].Enabled = false;
+
+ // Check if histogram series exsists
+ Series histogramSeries = null;
+ if (chartControl.Series.IndexOf(histogramSeriesName) < 0)
+ {
+ // Add new series
+ histogramSeries = chartControl.Series.Add(histogramSeriesName);
+
+ // Set new series chart type and other attributes
+ histogramSeries.ChartType = SeriesChartType.Column;
+ histogramSeries.BorderColor = Color.Black;
+ histogramSeries.BorderWidth = 1;
+ histogramSeries.BorderDashStyle = ChartDashStyle.Solid;
+ }
+ else
+ {
+ histogramSeries = chartControl.Series[histogramSeriesName];
+ histogramSeries.Points.Clear();
+ }
+
+ // Get data series minimum and maximum values
+ double minValue = double.MaxValue;
+ double maxValue = double.MinValue;
+ int pointCount = 0;
+ foreach (DataPoint dataPoint in chartControl.Series[dataSeriesName].Points)
+ {
+ // Process only non-empty data points
+ if (!dataPoint.IsEmpty)
+ {
+ if (dataPoint.YValues[0] > maxValue)
+ {
+ maxValue = dataPoint.YValues[0];
+ }
+ if (dataPoint.YValues[0] < minValue)
+ {
+ minValue = dataPoint.YValues[0];
+ }
+ ++pointCount;
+ }
+ }
+
+ // Calculate interval width if it's not set
+ if (double.IsNaN(this.SegmentIntervalWidth))
+ {
+ this.SegmentIntervalWidth = (maxValue - minValue) / SegmentIntervalNumber;
+ this.SegmentIntervalWidth = RoundInterval(this.SegmentIntervalWidth);
+ }
+
+ // Round minimum and maximum values
+ minValue = Math.Floor(minValue / this.SegmentIntervalWidth) * this.SegmentIntervalWidth;
+ maxValue = Math.Ceiling(maxValue / this.SegmentIntervalWidth) * this.SegmentIntervalWidth;
+
+ // Create histogram series points
+ double currentPosition = minValue;
+ for (currentPosition = minValue; currentPosition <= maxValue; currentPosition += this.SegmentIntervalWidth)
+ {
+ // Count all points from data series that are in current interval
+ int count = 0;
+ foreach (DataPoint dataPoint in chartControl.Series[dataSeriesName].Points)
+ {
+ if (!dataPoint.IsEmpty)
+ {
+ double endPosition = currentPosition + this.SegmentIntervalWidth;
+ if (dataPoint.YValues[0] >= currentPosition &&
+ dataPoint.YValues[0] < endPosition)
+ {
+ ++count;
+ }
+
+ // Last segment includes point values on both segment boundaries
+ else if (endPosition >= maxValue)
+ {
+ if (dataPoint.YValues[0] >= currentPosition &&
+ dataPoint.YValues[0] <= endPosition)
+ {
+ ++count;
+ }
+ }
+ }
+ }
+
+
+ // Add data point into the histogram series
+ histogramSeries.Points.AddXY(currentPosition + this.SegmentIntervalWidth / 2.0, count);
+ //histogramSeries.Points.AddXY("", count);
+ //histogramSeries.Points.AddY( count);
+
+ }
+
+
+ // Adjust series attributes
+ histogramSeries["PointWidth"] = "1";
+
+ // Adjust chart area
+ ChartArea chartArea = chartControl.ChartAreas[histogramSeries.ChartArea];
+ chartArea.AxisY.Title = "Ƶ";
+ chartArea.AxisX.Minimum = minValue;
+ chartArea.AxisX.Maximum = maxValue;
+
+ // Set axis interval based on the histogram class interval
+ // and do not allow more than 10 labels on the axis.
+ double axisInterval = this.SegmentIntervalWidth;
+ while ((maxValue - minValue) / axisInterval > 10.0)
+ {
+ axisInterval *= 2.0;
+ }
+ chartArea.AxisX.Interval = axisInterval;
+
+ // Set chart area secondary Y axis
+ chartArea.AxisY2.Enabled = AxisEnabled.Auto;
+ if (this.ShowPercentOnSecondaryYAxis)
+ {
+ chartArea.RecalculateAxesScale();
+
+ chartArea.AxisY2.Enabled = AxisEnabled.True;
+ chartArea.AxisY2.LabelStyle.Format = "P0";
+ chartArea.AxisY2.MajorGrid.Enabled = false;
+ chartArea.AxisY2.Title = "Percent of Total";
+
+ chartArea.AxisY2.Minimum = 0;
+ chartArea.AxisY2.Maximum = chartArea.AxisY.Maximum / (pointCount / 100.0);
+ double minStep = (chartArea.AxisY2.Maximum > 20.0) ? 5.0 : 1.0;
+ chartArea.AxisY2.Interval = Math.Ceiling((chartArea.AxisY2.Maximum / 5.0 / minStep)) * minStep;
+
+ }
+ }
+ ///
+ /// Helper method which rounds specified axsi interval.
+ ///
+ /// Calculated axis interval.
+ /// Rounded axis interval.
+ public double RoundInterval( double interval )
+ {
+ // If the interval is zero return error
+ if( interval == 0.0 )
+ {
+ throw( new ArgumentOutOfRangeException("interval", "Interval can not be zero."));
+ }
+
+ // If the real interval is > 1.0
+ double step = -1;
+ double tempValue = interval;
+ while( tempValue > 1.0 )
+ {
+ step ++;
+ tempValue = tempValue / 10.0;
+ if( step > 1000 )
+ {
+ throw( new InvalidOperationException( "Auto interval error due to invalid point values or axis minimum/maximum." ) );
+ }
+ }
+
+ // If the real interval is < 1.0
+ tempValue = interval;
+ if( tempValue < 1.0 )
+ {
+ step = 0;
+ }
+
+ while( tempValue < 1.0 )
+ {
+ step --;
+ tempValue = tempValue * 10.0;
+ if( step < -1000 )
+ {
+ throw( new InvalidOperationException( "Auto interval error due to invalid point values or axis minimum/maximum." ) );
+ }
+ }
+
+ double tempDiff = interval / Math.Pow( 10.0, step );
+ if( tempDiff < 3.0 )
+ {
+ tempDiff = 2.0;
+ }
+ else if( tempDiff < 7.0 )
+ {
+ tempDiff = 5.0;
+ }
+ else
+ {
+ tempDiff = 10.0;
+ }
+
+ // Make a correction of the real interval
+ return tempDiff * Math.Pow( 10.0, step );
+ }
+
+ #endregion // Methods
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/Utilities/HistogramchartHelper/_system~.ini b/MES_Manage/App_code/Utilities/HistogramchartHelper/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/HistogramchartHelper/vssver2.scc b/MES_Manage/App_code/Utilities/HistogramchartHelper/vssver2.scc
new file mode 100644
index 0000000..7c1694a
Binary files /dev/null and b/MES_Manage/App_code/Utilities/HistogramchartHelper/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/PassBandFilter/FFT.cs b/MES_Manage/App_code/Utilities/PassBandFilter/FFT.cs
new file mode 100644
index 0000000..55d12c6
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/PassBandFilter/FFT.cs
@@ -0,0 +1,326 @@
+//=================================================================
+// File: FFT.cs
+//
+// Namespace: System.Web.UI.DataVisualization.Charting.Utilities
+//
+// Classes: FFT
+//
+// Purpose: Used for the fast fourier transformation algorithm
+//
+//===================================================================
+// Chart Control for ASP.Net
+//===================================================================
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// Helper class which implements the various window functions for determination of the filter
+ /// coefficients.
+ ///
+ class FFT
+ {
+ #region Members
+ ///
+ /// Filter type enumeration for identification of what type of filter we want coefficients
+ /// for.
+ ///
+ public enum FilterType { HighPass, LowPass, BandPass };
+
+ ///
+ /// Algorithm enumeration for choice of algorithm
+ ///
+ public enum Algorithm { Kaiser, Hann, Hamming, Blackman, Rectangular };
+
+ private float myRate;
+ private float myFreqFrom;
+ private float myFreqTo;
+ private float myAttenuation;
+ private float myBand;
+ private float myAlpha;
+ private int myOrder;
+
+ ///
+ /// Shannon sampling frequency
+ ///
+ private float myFS;
+ #endregion
+
+ #region Properties
+ ///
+ /// Sampling rate
+ ///
+ public float Rate
+ {
+ get { return myRate; }
+ set
+ {
+ myRate = value;
+ myFS = 0.5f * myRate;
+ }
+ }
+
+ ///
+ /// Starting frequency for passband. Must be lower than the ending frequency.
+ ///
+ public float FreqFrom
+ {
+ get { return myFreqFrom; }
+ set { myFreqFrom = value; }
+ }
+
+ ///
+ /// Ending frequency for passband. Must be higher than the starting frequency.
+ ///
+ public float FreqTo
+ {
+ get { return myFreqTo; }
+ set { myFreqTo = value; }
+ }
+
+ ///
+ /// Stopband attenuation.
+ ///
+ public float StopBandAttenuation
+ {
+ get { return myAttenuation; }
+ set { myAttenuation = value; }
+ }
+
+ ///
+ /// Transition band.
+ ///
+ public float TransitionBand
+ {
+ get { return myBand; }
+ set { myBand = value; }
+ }
+
+ ///
+ /// Alpha value used for the Kaiser algorithm.
+ ///
+ public float Alpha
+ {
+ get { return myAlpha; }
+ set { myAlpha = value; }
+ }
+
+ ///
+ /// Filter order. Must be an even number.
+ ///
+ public int Order
+ {
+ get { return myOrder; }
+ set { myOrder = value; }
+ }
+ #endregion
+
+ #region Constructors
+ ///
+ /// Construct a FFT instance and initialize with default values.
+ ///
+ public FFT()
+ {
+ //default rate to 8000
+ Rate = 8000;
+
+ //default attenuation to 60db
+ this.myAttenuation = 60;
+
+ //default transition band to 500hz
+ this.myBand = 500;
+
+ //default order to 0 so that we'll know if it was changed by the user or not
+ this.myOrder = 0;
+
+ //default Alpha to 4
+ this.myAlpha = 4;
+ }
+ #endregion
+
+ #region Mathematical Functions
+ ///
+ /// Bessel is the zeroth order Bessel function which is used in the Kaiser window.
+ /// This is a polynomial approximation of the zeroth order modified Bessel function found in:
+ /// W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling.
+ /// Numerical Recipes in C: The Art of Scientific Computing.
+ /// Cambridge UP, 1988.
+ /// P. 237
+ ///
+ /// Input number which the Bessel will be performed on
+ private float Bessel(float x)
+ {
+ double ax, ans;
+ double y;
+
+ ax = System.Math.Abs(x);
+ if (ax < 3.75)
+ {
+ y = x / 3.75;
+ y *= y;
+ ans = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492
+ + y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2)))));
+ }
+ else
+ {
+ y = 3.75 / ax;
+ ans = (System.Math.Exp(ax) / System.Math.Sqrt(ax)) * (0.39894228 + y * (0.1328592e-1
+ + y * (0.225319e-2 + y * (-0.157565e-2 + y * (0.916281e-2
+ + y * (-0.2057706e-1 + y * (0.2635537e-1 + y * (-0.1647633e-1
+ + y * 0.392377e-2))))))));
+ }
+
+ return (float)ans;
+ }
+ #endregion
+
+ #region Generate Coefficients
+ ///
+ /// Calculate the coefficients to be used by the filter function.
+ ///
+ /// Enum type which specifies the filter to be performed.
+ /// Enum type which specifies which algorithm to be used for the window
+ /// algorithm.
+ public float[] GenerateCoefficients(FilterType filterType, Algorithm alg)
+ {
+ //Calculate order if it hasn't been set
+ if (this.myOrder == 0)
+ this.myOrder = (int)(((this.myAttenuation - 7.95f) / (this.myBand * 14.36f / this.myFS) + 1.0f) * 2.0f) - 1;
+
+ float[] window = new float[(this.myOrder / 2) + 1];
+ float[] coEff = new float[this.myOrder + 1];
+ float ps;
+ float pe;
+ const float PI = (float)System.Math.PI;
+ int o2 = this.myOrder / 2;
+
+ //Switch based on algorithm
+ switch (alg)
+ {
+ case Algorithm.Kaiser:
+ //Kaiser Window function
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = Bessel(this.myAlpha * (float)System.Math.Sqrt(1.0f - (float)System.Math.Pow((float)i / o2, 2))) / Bessel(this.myAlpha);
+ }
+
+ //Stopband attenuation and transition band should be set by the user
+ break;
+
+ case Algorithm.Hann:
+ //Hann window function
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = 0.5f + 0.5f * (float)System.Math.Cos((PI / (o2 + 1)) * i);
+ }
+
+ //Set the min stopband attenuation
+ this.StopBandAttenuation = 44.0f;
+
+ //Set the transition band
+ this.TransitionBand = 6.22f * this.myFS / this.myOrder;
+ break;
+
+ case Algorithm.Hamming:
+ //Hamming window function
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = 0.54f + 0.46f * (float)System.Math.Cos((PI / o2) * i);
+ }
+
+ //Set the min stopband attenuation
+ this.StopBandAttenuation = 53.0f;
+
+ //Set the transition band
+ this.TransitionBand = 6.64f * this.myFS / this.myOrder;
+ break;
+
+ case Algorithm.Blackman:
+ //Blackman window function
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = 0.42f + 0.5f * (float)Math.Cos((PI / o2) * i) + 0.08f * (float)Math.Cos(2.0f * (PI / o2) * i);
+ }
+
+ //Set the min stopband attenuation
+ this.StopBandAttenuation = 74.0f;
+
+ //Set the transition band
+ this.TransitionBand = 11.13f * this.myFS / this.myOrder;
+ break;
+
+ case Algorithm.Rectangular:
+ //Rectangular window function
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = 1.0f;
+ }
+
+ //Set the min stopband attenuation
+ this.StopBandAttenuation = 21.0f;
+
+ //Set the transition band
+ this.TransitionBand = 1.84f * this.myFS / this.myOrder;
+ break;
+
+ default:
+ //Zero all values if nothing was set (error)
+ for (int i = 1; i <= o2; i++)
+ {
+ window[i] = 0.0f;
+ }
+ break;
+ }
+
+ //Switch based on filtertype
+ switch (filterType)
+ {
+ case FilterType.BandPass:
+ pe = PI / 2 * (this.FreqTo - this.FreqFrom + this.myBand) / this.myFS;
+ ps = PI / 2 * (this.FreqFrom + this.FreqTo) / this.myFS;
+ break;
+
+ case FilterType.LowPass:
+ pe = PI * (this.FreqTo + this.myBand / 2) / this.myFS;
+ ps = 0.0f;
+ break;
+
+ case FilterType.HighPass:
+ pe = PI * (1.0f - (this.FreqFrom - this.myBand / 2) / this.myFS);
+ ps = PI;
+ break;
+
+ default:
+ pe = 0.0f;
+ ps = 0.0f;
+ break;
+ }
+
+ //Set first coefficient value
+ coEff[0] = pe / PI;
+
+ //Calculate coefficientsw
+ for (int i = 1; i <= o2; i++)
+ {
+ coEff[i] = window[i] * (float)System.Math.Sin(i * pe) * (float)System.Math.Cos(i * ps) / (i * PI);
+ }
+
+ //Shift Impulse
+ for (int i = o2 + 1; i <= this.myOrder; i++)
+ {
+ coEff[i] = coEff[i - o2];
+ }
+ for (int i = 0; i <= o2 - 1; i++)
+ {
+ coEff[i] = coEff[this.myOrder - i];
+ }
+ coEff[o2] = pe / PI;
+
+ return coEff;
+ }
+ #endregion
+ }
+}
diff --git a/MES_Manage/App_code/Utilities/PassBandFilter/FIRFilters.cs b/MES_Manage/App_code/Utilities/PassBandFilter/FIRFilters.cs
new file mode 100644
index 0000000..aaef716
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/PassBandFilter/FIRFilters.cs
@@ -0,0 +1,324 @@
+//=================================================================
+// File: FIRFilters.cs
+//
+// Namespace: System.Web.UI.DataVisualization.Charting.Utilities
+//
+// Classes: FIRFilters, FFT
+//
+// Purpose: Used to perform digital filters on charts
+//
+//===================================================================
+// Chart Control for ASP.Net
+//===================================================================
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Web.UI.DataVisualization.Charting;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// Helper class which implements the filtering functions. Currently Low Pass, High Pass and
+ /// Band Pass are implemented.
+ ///
+ class FIRFilters
+ {
+ #region Members
+ ///
+ /// The number of samples is the same as the number of points
+ ///
+ private int mySamples;
+
+ ///
+ /// Holds the coefficient from the window function
+ ///
+ private float[] myCoeff;
+
+ ///
+ /// Holds the series which has the input data
+ ///
+ private Series myInputSeries;
+
+ ///
+ /// Holds the series which we are outputting to
+ ///
+ private Series myFilterSeries;
+
+ ///
+ /// FFT algorithm object
+ ///
+ private FFT myFFT;
+
+ ///
+ /// Holds the current algorithm selected. Enumeration type is drawn from the FFT object.
+ ///
+ public FFT.Algorithm CurrentAlgorithm;
+
+ private float myFreqFrom;
+ private float myFreqTo;
+ private float myAttenuation;
+ private float myBand;
+ private float myAlpha;
+ private int myTaps;
+ private int myOrder;
+ #endregion
+
+ #region Properties
+ ///
+ /// The starting passband frequency, must be lower than ending frequency.
+ ///
+ public float FreqFrom
+ {
+ get { return myFreqFrom; }
+ set { myFreqFrom = value; }
+ }
+
+ ///
+ /// The ending passband frequency, must be higher than starting frequency.
+ ///
+ public float FreqTo
+ {
+ get { return myFreqTo; }
+ set { myFreqTo = value; }
+ }
+
+ ///
+ /// Stopband attenuation
+ ///
+ public float StopBandAttenuation
+ {
+ get { return myAttenuation; }
+ set {
+ myAttenuation = value;
+ this.myFFT.StopBandAttenuation = myAttenuation;
+ }
+ }
+
+ ///
+ /// Transition band
+ ///
+ public float TransitionBand
+ {
+ get { return myBand; }
+ set {
+ myBand = value;
+ this.myFFT.TransitionBand = myBand;
+ }
+ }
+
+ ///
+ /// Alpha value used for the Kaiser algorithm.
+ ///
+ public float Alpha
+ {
+ get { return myAlpha; }
+ set {
+ myAlpha = value;
+ this.myFFT.Alpha = myAlpha;
+ }
+ }
+
+ ///
+ /// Number of taps to be used. Taps is the number of samples processed at any one time.
+ ///
+ public int Taps
+ {
+ get { return myTaps; }
+ set { myTaps = value; }
+ }
+
+ ///
+ /// Filter order. Must be an even number.
+ ///
+ public int Order
+ {
+ get { return myOrder; }
+ set
+ {
+ //Assure value is even
+ if ((value % 2) == 0)
+ {
+ myOrder = value;
+ this.myFFT.Order = myOrder;
+ }
+ else
+ throw new ArgumentOutOfRangeException("Order", "Filter order must be an even number.");
+ }
+ }
+ #endregion
+
+ #region Constructors
+ ///
+ /// Main constructor. Resets all settings within the FFT algorithm object.
+ ///
+ public FIRFilters()
+ {
+ //Create a new FFT object
+ this.myFFT = new FFT();
+
+ //Default algorithm to Kaiser
+ this.CurrentAlgorithm = FFT.Algorithm.Kaiser;
+
+ //Default taps to 35
+ this.myTaps = 35;
+ }
+ #endregion
+
+ #region Methods
+ ///
+ /// Performs a low pass filter. Output series will be cleared before being
+ /// output to. If passband start and end frequencies are left at 0, defaults are used.
+ ///
+ /// Input series that contains input data. Input Y-Values must be contained in YValues[0] or unexpected output will occur
+ /// Output series to which filter will be written. Output Y-Values are written to YValues[0]
+ public void LowPassFilter(Series iseries, Series oseries)
+ {
+ //If no start and end frequencies are specified, default low pass frequency range to:
+ //0 - 1000hz
+ if (this.myFreqFrom == 0.0f && this.myFreqTo == 0.0f)
+ {
+ this.myFFT.FreqFrom = 0.0f;
+ this.myFFT.FreqTo = 1000.0f;
+ }
+ else
+ {
+ this.myFFT.FreqFrom = this.myFreqFrom;
+ this.myFFT.FreqTo = this.myFreqTo;
+ }
+
+ //Generate the actual coefficients
+ this.myCoeff = this.myFFT.GenerateCoefficients(FFT.FilterType.LowPass, CurrentAlgorithm);
+
+ //Filter the series based on the coefficients generated
+ Filter(iseries, oseries);
+ }
+
+ ///
+ /// Performs a high pass filter. Output series will be cleared before being
+ /// output to. If passband start and end frequencies are left at 0, defaults are used.
+ ///
+ /// Input series that contains input data. Input Y-Values must be contained in YValues[0] or unexpected output will occur
+ /// Output series to which filter will be written. Output Y-Values are written to YValues[0]
+ public void HighPassFilter(Series iseries, Series oseries)
+ {
+ //If no start and end frequencies are specified, default high pass frequency range to:
+ //2000 - 4000hz
+ if (this.myFreqFrom == 0.0f && this.myFreqTo == 0.0f)
+ {
+ this.myFFT.FreqFrom = 2000.0f;
+ this.myFFT.FreqTo = 4000.0f;
+ }
+ else
+ {
+ this.myFFT.FreqFrom = this.myFreqFrom;
+ this.myFFT.FreqTo = this.myFreqTo;
+ }
+
+ //Generate the actual coefficients
+ this.myCoeff = this.myFFT.GenerateCoefficients(FFT.FilterType.HighPass, CurrentAlgorithm);
+
+ //Filter the series based on the coefficients generated
+ Filter(iseries, oseries);
+ }
+
+ ///
+ /// Performs a band pass filter. Output series will be cleared before being
+ /// output to. If passband start and end frequencies are left at 0, defaults are used.
+ ///
+ /// Input series that contains input data. Input Y-Values must be contained in YValues[0] or unexpected output will occur
+ /// Output series to which filter will be written. Output Y-Values are written to YValues[0]
+ public void BandPassFilter(Series iseries, Series oseries)
+ {
+ //If no start and end frequencies are specified, default band pass frequency range to:
+ //1000 - 1000hz
+ if (this.myFreqFrom == 0.0f && this.myFreqTo == 0.0f)
+ {
+ this.myFFT.FreqFrom = 1000.0f;
+ this.myFFT.FreqTo = 1000.0f;
+ }
+ else
+ {
+ this.myFFT.FreqFrom = this.myFreqFrom;
+ this.myFFT.FreqTo = this.myFreqTo;
+ }
+
+ //Generate the actual coefficients
+ this.myCoeff = this.myFFT.GenerateCoefficients(FFT.FilterType.BandPass, CurrentAlgorithm);
+
+ //Filter the series based on the coefficients generated
+ Filter(iseries, oseries);
+ }
+ #endregion
+
+ #region Initialization
+ ///
+ /// Initializes the FIRFilters object by setting the input and output series members for use
+ /// by the filter.
+ ///
+ /// Input series that contains input data
+ /// Output series to which filter will be written
+ private void SetIOSeries(Series iseries, Series oseries)
+ {
+ this.myInputSeries = iseries;
+ this.myFilterSeries = oseries;
+
+ //Samples is the number of points contained in the input
+ this.mySamples = myInputSeries.Points.Count;
+ }
+ #endregion
+
+ #region Filter
+ ///
+ /// Performs the actual filter. Coefficients should have already be generated by the calling
+ /// function, this function merely applies them and physically adds the points to the output series.
+ ///
+ /// Input series that contains input data
+ /// Output series to which filter will be written
+ private void Filter(Series iseries, Series oseries)
+ {
+ float[] x = new float[myTaps];
+ float y;
+
+ //Set the series
+ SetIOSeries(iseries, oseries);
+
+ //Clear series
+ myFilterSeries.Points.Clear();
+
+ //Initialize x
+ for (int i = 1; i < myTaps; i++)
+ x[i] = 0.0f;
+
+ //Loop through every data point
+ for (int i = 0; i < mySamples; i++)
+ {
+ //Initialize y
+ y = 0.0f;
+
+ //Obtain the data value (Y value) at the specified X value (i)
+ x[0] = Convert.ToSingle(myInputSeries.Points[i].YValues[0]);
+
+ //Loop through from 0 to number of taps and calculate the sum
+ try
+ {
+ for (int j = 0; j < myTaps; j++)
+ y = y + (x[j] * myCoeff[j]);
+ }
+ catch (Exception e)
+ {
+ System.Diagnostics.Debug.WriteLine(e.Message + " Check filter order.");
+ throw;
+ }
+
+ //Shift all x values by 1 to the right
+ for (int j = myTaps - 1; j > 0; j--)
+ x[j] = x[j - 1];
+
+ //Add the y value to the output series at the current x value
+ myFilterSeries.Points.Add(new System.Web.UI.DataVisualization.Charting.DataPoint(i, y));
+ }
+ }
+ #endregion
+ }
+}
diff --git a/MES_Manage/App_code/Utilities/PassBandFilter/_system~.ini b/MES_Manage/App_code/Utilities/PassBandFilter/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/PassBandFilter/vssver2.scc b/MES_Manage/App_code/Utilities/PassBandFilter/vssver2.scc
new file mode 100644
index 0000000..c003f68
Binary files /dev/null and b/MES_Manage/App_code/Utilities/PassBandFilter/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/PieCollectedDataHelper/PieCollectedDataHelper.cs b/MES_Manage/App_code/Utilities/PieCollectedDataHelper/PieCollectedDataHelper.cs
new file mode 100644
index 0000000..1b60ba9
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/PieCollectedDataHelper/PieCollectedDataHelper.cs
@@ -0,0 +1,372 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Web.UI.DataVisualization.Charting;
+using System.Collections;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// Helper class which improves the readability of the small segments in the Pie chart.
+ /// Pie segments which are too small are shown in a supplemental pie chart series.
+ ///
+ public class PieCollectedDataHelper
+ {
+ #region Fields
+
+ ///
+ /// Specifies the percentage of the total series values. This value determines
+ /// if the data point value is a "small" value and should be shown as collected.
+ ///
+ public double CollectedPercentage = 5.0;
+
+ ///
+ /// Position in relative coordinates ( 0,0 - top left corner; 100,100 - bottom right corner)
+ /// where original and supplemental pie charts should be placed.
+ ///
+ public RectangleF ChartAreaPosition = new RectangleF(5f, 5f, 90f, 90f);
+
+ ///
+ /// Indicates if small segments should be shown as one "collected" segment in the original series
+ ///
+ public bool ShowCollectedDataAsOneSlice = false;
+
+ ///
+ /// Spacing between the original and supplemental chart areas in percentage
+ ///
+ public float ChartAreaSpacing = 5f;
+
+ ///
+ /// Size ratio between the original and supplemental chart areas.
+ /// Value of 1.0f indicates that same area size will be used.
+ ///
+ public float SupplementedAreaSizeRatio = 0.9f;
+
+ ///
+ /// Color of the connection lines
+ ///
+ public Color ConnectionLinesColor = Color.FromArgb(64, 64, 64);
+
+ ///
+ /// Collected pie segment label
+ ///
+ public string CollectedLabel = "Other";
+
+
+ // Reference to the parameters
+ private Chart chartControl = null;
+ private Series series = null;
+
+ // Internal use fields
+ private Series supplementalSeries = null;
+ private ChartArea originalChartArea = null;
+ private ChartArea supplementalChartArea = null;
+ private float collectedPieSliceAngle = 0f;
+
+ #endregion // Fields
+
+ #region Constructor
+
+ ///
+ /// Public constructor.
+ ///
+ /// Reference to the chart control.
+ public PieCollectedDataHelper(Chart chartControl)
+ {
+ this.chartControl = chartControl;
+
+ // Handle chart PostPaint event to draw the "connection" between the
+ // collected pie slice and supplemental chart.
+ this.chartControl.PostPaint +=new EventHandler(this.chart_PostPaint);
+ }
+
+ #endregion // Constructor
+
+ #region Methods
+
+ ///
+ /// Shows small pie segments as supplemental pie chart series in the new chart area.
+ ///
+ /// Series name
+ public void ShowSmallSegmentsAsSupplementalPie(string seriesName)
+ {
+ // Validate input
+ if(this.chartControl == null)
+ {
+ throw(new ArgumentNullException("chartControl"));
+ }
+ if(this.CollectedPercentage > 100.0 || this.CollectedPercentage < 0.0)
+ {
+ throw(new ArgumentException("Value must be in range from 0 to 100 percent.", "CollectedPercentage"));
+ }
+
+ // Initialize reference to the series
+ this.series = this.chartControl.Series[seriesName];
+
+ // Check input series type
+ if(this.series.ChartType != SeriesChartType.Pie &&
+ this.series.ChartType != SeriesChartType.Doughnut)
+ {
+ throw(new InvalidOperationException("Only series with Pie or Doughnut chart type can be used."));
+ }
+
+ // Check if specified series has data points
+ if(series.Points.Count == 0)
+ {
+ throw(new InvalidOperationException("Cannot perform operatiuon on an empty series."));
+ }
+
+ // Create "collected" pie slice in original series
+ this.supplementalChartArea = null;
+ if( CreateCollectedPie() )
+ {
+ // Calculate width of supplemental chart area
+ float supplementalWidth = (this.ChartAreaPosition.Width - this.ChartAreaSpacing) / 2f * this.SupplementedAreaSizeRatio;
+
+ // Adjust position of the original chart area
+ this.originalChartArea = this.chartControl.ChartAreas[this.series.ChartArea];
+ originalChartArea.Position.X = this.ChartAreaPosition.X;
+ originalChartArea.Position.Y = this.ChartAreaPosition.Y;
+ originalChartArea.Position.Width = this.ChartAreaPosition.Width - supplementalWidth - this.ChartAreaSpacing;
+ originalChartArea.Position.Height = this.ChartAreaPosition.Height;
+
+ // Original chart area must be in 2D mode
+ originalChartArea.Area3DStyle.Enable3D = false;
+
+ // Create and adjust position of the supplemental chart area
+ this.supplementalChartArea = new ChartArea();
+ supplementalChartArea.Name = originalChartArea.Name + "_Supplemental";
+ supplementalChartArea.Position.X = originalChartArea.Position.Right + this.ChartAreaSpacing;
+ supplementalChartArea.Position.Y = this.ChartAreaPosition.Y;
+ supplementalChartArea.Position.Width = supplementalWidth;
+ supplementalChartArea.Position.Height = this.ChartAreaPosition.Height;
+ this.chartControl.ChartAreas.Add(supplementalChartArea);
+
+ // Create supplemental pie chart series to show all the collected data
+ this.supplementalSeries.Name = this.series.Name + "_Supplemental";
+ this.supplementalSeries.ChartArea = supplementalChartArea.Name;
+ this.chartControl.Series.Add(supplementalSeries);
+
+ // Copy some attributes from the original chart area
+ supplementalChartArea.BackColor = originalChartArea.BackColor;
+ supplementalChartArea.BorderColor = originalChartArea.BorderColor;
+ supplementalChartArea.BorderWidth = originalChartArea.BorderWidth;
+ supplementalChartArea.ShadowOffset = originalChartArea.ShadowOffset;
+
+ // Copy some attributes from the original series
+ this.supplementalSeries.ChartType = this.series.ChartType;
+ this.supplementalSeries.Palette = this.series.Palette;
+ this.supplementalSeries.ShadowOffset = this.series.ShadowOffset;
+ this.supplementalSeries.BorderColor = this.series.BorderColor;
+ this.supplementalSeries.BorderWidth = this.series.BorderWidth;
+ this.supplementalSeries.IsValueShownAsLabel = this.series.IsValueShownAsLabel;
+ this.supplementalSeries.LabelBackColor = this.series.LabelBackColor;
+ this.supplementalSeries.LabelBorderColor = this.series.LabelBorderColor;
+ this.supplementalSeries.LabelBorderWidth = this.series.LabelBorderWidth;
+ this.supplementalSeries.LabelFormat = this.series.LabelFormat;
+ this.supplementalSeries.Font = this.series.Font;
+ }
+ }
+
+ ///
+ /// Creates the "collected" pie slice data point by re moving and accumulating all
+ /// the values of the data points which values are less then specified percentage.
+ ///
+ /// True if collected pie slice was created.
+ private bool CreateCollectedPie()
+ {
+ // Create supplemental series
+ this.supplementalSeries = new Series();
+
+ // Calculate total vale of all point in series
+ double total = 0.0;
+ foreach(DataPoint dataPoint in this.series.Points)
+ {
+ total += Math.Abs(dataPoint.YValues[0]);
+ }
+
+ // Count how many data points will be presented as collected
+ double minValue = total / 100.0 * this.CollectedPercentage;
+ int collectedPointsCount = 0;
+ for(int index = 0; index < this.series.Points.Count; index++)
+ {
+ double pointValue = Math.Abs(this.series.Points[index].YValues[0]);
+ if(pointValue <= minValue)
+ {
+ ++collectedPointsCount;
+ }
+ }
+
+ // Do not collect data points if one or less points left in the original series
+ if( (this.series.Points.Count - collectedPointsCount) <= 1 ||
+ collectedPointsCount <= 1)
+ {
+ return false;
+ }
+
+ // Add Collected data point into series before applying palette colors
+ DataPoint colectedDataPoint = null;
+ if(this.ShowCollectedDataAsOneSlice)
+ {
+ colectedDataPoint = new DataPoint(this.series);
+ this.series.Points.Add(colectedDataPoint);
+ }
+
+
+ // Apply pallete colors to series to save same data point colors
+ // in supplemental series.
+ this.chartControl.ApplyPaletteColors();
+ foreach(DataPoint dataPoint in this.series.Points)
+ {
+ // Setting data point color to itself will clear the internal flag which
+ // indicates that point color should be taken from the palette again when
+ // control is rendered next time.
+ dataPoint.Color = dataPoint.Color;
+ }
+
+ // Remove points which value is less than specified percentage from total
+ double collectedValue = 0.0;
+ for(int index = 0; index < this.series.Points.Count; index++)
+ {
+ double pointValue = Math.Abs(this.series.Points[index].YValues[0]);
+ if(pointValue <= minValue &&
+ this.series.Points[index] != colectedDataPoint)
+ {
+ // Add point value to the collected value
+ collectedValue += pointValue;
+
+ // Add point to supplemental series
+ this.supplementalSeries.Points.Add(this.series.Points[index].Clone());
+
+ // Remove point from the series
+ this.series.Points.RemoveAt(index);
+ --index;
+ }
+ }
+
+ // Add all collected data points at the end of the series
+ if(!ShowCollectedDataAsOneSlice)
+ {
+ foreach(DataPoint dataPoint in this.supplementalSeries.Points)
+ {
+ DataPoint dataPointCollected = dataPoint.Clone();
+ dataPoint.IsVisibleInLegend = false;
+ this.series.Points.Add(dataPointCollected);
+
+ // Disable labels in collected slices
+ dataPointCollected.Label = String.Empty;
+ dataPointCollected.LegendText = dataPointCollected.AxisLabel;
+ dataPointCollected.AxisLabel = String.Empty;
+ dataPointCollected.IsValueShownAsLabel = false;
+ }
+ }
+
+ // Check if we need to add the "collected" data point
+ if(collectedValue > 0.0)
+ {
+ // Set collected data point value and other attributes
+ if(this.ShowCollectedDataAsOneSlice)
+ {
+ colectedDataPoint.YValues[0] = collectedValue;
+ colectedDataPoint.Label = this.CollectedLabel;
+ colectedDataPoint.IsVisibleInLegend = false;
+
+ // Note: Collected data point may be exploded
+ //colectedDataPoint["Exploded"] = "true";
+ }
+
+ // Calculate collected pie slice angle
+ this.collectedPieSliceAngle = (float) ( (360f / 100f) * (collectedValue / (total / 100) ) );
+
+ // Adjust the Pie chart start angle, so that the middle of the
+ // collected slice looks directly at 3 o'clock.
+ int startAngle = (int)Math.Round(this.collectedPieSliceAngle / 2.0);
+ this.series["PieStartAngle"] = startAngle.ToString();
+
+ return true;
+ }
+ else if(colectedDataPoint != null)
+ {
+ // Remove collected data point
+ this.series.Points.Remove(colectedDataPoint);
+ }
+
+ return false;
+ }
+
+ ///
+ /// Chart post paint event handler.
+ /// Used to draw the "connection" lines between the original and supplemental pies.
+ ///
+ /// Event sender.
+ /// Event arguments.
+ private void chart_PostPaint(object sender, System.Web.UI.DataVisualization.Charting.ChartPaintEventArgs e)
+ {
+ if(sender is ChartArea)
+ {
+ ChartArea area = (ChartArea)sender;
+ if(this.supplementalChartArea != null &&
+ area.Name == this.supplementalChartArea.Name)
+ {
+ // Get position of the plotting areas in pixels
+ RectangleF originalPosition = GetChartAreaPlottingPosition(this.originalChartArea, e.ChartGraphics);
+ RectangleF supplementalPosition = GetChartAreaPlottingPosition(this.supplementalChartArea, e.ChartGraphics);
+
+ // Get coordinates of the "connection" lines
+ PointF p1 = GetRotatedPlotAreaPoint(supplementalPosition, 325f);
+ PointF p2 = GetRotatedPlotAreaPoint(supplementalPosition, 215f);
+ PointF p3 = GetRotatedPlotAreaPoint(originalPosition, 90f - this.collectedPieSliceAngle / 2f);
+ PointF p4 = GetRotatedPlotAreaPoint(originalPosition, 90f + this.collectedPieSliceAngle / 2f);
+
+ // Draw "connection lines"
+ using( Pen pen = new Pen(this.ConnectionLinesColor, 1) )
+ {
+ e.ChartGraphics.Graphics.DrawLine(pen, p1, p3);
+ e.ChartGraphics.Graphics.DrawLine(pen, p2, p4);
+ }
+ }
+ }
+ }
+
+ ///
+ /// Helper method which calculates a point on the edje of the pie chart using
+ /// specified angle.
+ ///
+ /// Chart are position in pixels.
+ /// Point angle in degrees.
+ /// Point location in pixels.
+ private PointF GetRotatedPlotAreaPoint(RectangleF areaPosition, float angle)
+ {
+ PointF[] points = new PointF[1];
+ points[0] = new PointF(areaPosition.X + areaPosition.Width / 2f, areaPosition.Y);
+ using( Matrix transformMatrix = new Matrix() )
+ {
+ transformMatrix.RotateAt(angle, new PointF(
+ areaPosition.X + areaPosition.Width / 2f,
+ areaPosition.Y + areaPosition.Height / 2f) );
+
+ transformMatrix.TransformPoints(points);
+ }
+ return points[0];
+ }
+
+ ///
+ /// Helper method which calculates chart area plotting position in pixels.
+ ///
+ /// Chart area to get the plotting area position.
+ /// Chart graphics object.
+ /// Chart area ploting area position in pixels.
+ private RectangleF GetChartAreaPlottingPosition(ChartArea area, ChartGraphics chartGraphics)
+ {
+ RectangleF plottingRect = area.Position.ToRectangleF();
+ plottingRect.X += (area.Position.Width / 100F) * area.InnerPlotPosition.X;
+ plottingRect.Y += (area.Position.Height / 100F) * area.InnerPlotPosition.Y;
+ plottingRect.Width = (area.Position.Width / 100F) * area.InnerPlotPosition.Width;
+ plottingRect.Height = (area.Position.Height / 100F) * area.InnerPlotPosition.Height;
+ plottingRect = chartGraphics.GetAbsoluteRectangle(plottingRect);
+ return plottingRect;
+ }
+
+ #endregion // Methods
+ }
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/Utilities/PieCollectedDataHelper/_system~.ini b/MES_Manage/App_code/Utilities/PieCollectedDataHelper/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/PieCollectedDataHelper/vssver2.scc b/MES_Manage/App_code/Utilities/PieCollectedDataHelper/vssver2.scc
new file mode 100644
index 0000000..0f7fcf1
Binary files /dev/null and b/MES_Manage/App_code/Utilities/PieCollectedDataHelper/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/SixSigma/SixSigma.cs b/MES_Manage/App_code/Utilities/SixSigma/SixSigma.cs
new file mode 100644
index 0000000..3f3fbe5
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/SixSigma/SixSigma.cs
@@ -0,0 +1,1053 @@
+//=================================================================
+// File: SixSigma.cs
+//
+// Namespace: System.Web.UI.DataVisualization.Charting.Utilities
+//
+// Classes: SixSigma
+//
+// Purpose: To create SixSigma charts.
+//
+//===================================================================
+// Chart Control for ASP.Net
+// Copyright ?Microsoft Corporation, all rights reserved
+//===================================================================
+
+using System;
+using System.Data;
+using System.Configuration;
+using System.Drawing;
+using System.Web.UI.DataVisualization.Charting;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// SixSigma is a utility that includes useful functions related to the Six Sigma strategy.
+ /// This utility mainly focuses on those parts of the strategy that involve charting, and producing
+ /// those charts.
+ ///
+ public class SixSigma
+ {
+ #region Members
+ ///
+ /// sBar holds a value if an schart has been created. sBar is used for a XBAR chart.
+ ///
+ private float mysBar = 0;
+
+ ///
+ /// rBar holds a value if an rchart has been created. rBar is used for a XBAR chart.
+ ///
+ private float myrBar = 0;
+
+ ///
+ /// Holds the n value passed into sChart or rChart for use by XBAR.
+ ///
+ private int mynValue = 0;
+
+ private bool myAutoFitLines;
+ private bool myShowLineLabels;
+ private Color myLineColor;
+ private Color myForeColor;
+ private Font myFont;
+ #endregion
+
+ #region Properties
+ ///
+ /// Controls whether the AxisY will have an automatic Maximum set so that the chart will always
+ /// contain the UCL annotation. If left to false, it is up to the user to set a maximum AxisY value
+ /// such that all annotations appear on the graph.
+ ///
+ public bool AutoFitLines
+ {
+ get { return myAutoFitLines; }
+ set { myAutoFitLines = value; }
+ }
+
+ ///
+ /// Controls whether text is added to the lines to label what they are.
+ ///
+ public bool ShowLineLabels
+ {
+ get { return myShowLineLabels; }
+ set { myShowLineLabels = value; }
+ }
+
+ ///
+ /// Specifies the colour of the line annotations added to each chart.
+ ///
+ public Color LineColor
+ {
+ get { return myLineColor; }
+ set { myLineColor = value; }
+ }
+
+ ///
+ /// Specifies the colour of the text that will label the lines.
+ ///
+ public Color ForeColor
+ {
+ get { return myForeColor; }
+ set { myForeColor = value; }
+ }
+
+ ///
+ /// Specifies the font of the text that will label the lines.
+ ///
+ public Font Font
+ {
+ get { return myFont; }
+ set { myFont = value; }
+ }
+ #endregion
+
+ #region Constructors
+ ///
+ /// Default Constructor.
+ ///
+ public SixSigma()
+ {
+ myAutoFitLines = false;
+ myShowLineLabels = false;
+ myLineColor = Color.Red;
+ myForeColor = Color.Red;
+ myFont = new Font("Arial", 8);
+ }
+ #endregion
+
+ #region Chart Creation Methods
+ ///
+ /// Creates a C-Chart with lines indicating cBar, UCL and LCL. A C-Chart is a measure of the number of
+ /// non-conformities per unit, where unit is a fixed rate.
+ ///
+ /// An array holding the subgroups. Must aline with the nonconform array.
+ /// An array holding the non-conformity data associated with the subgroups. Must aline with the subgroups.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series cChart(float[] subgroup, float[] nonconform, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != nonconform.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, nonconform");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize cBar, LCL and UCL.
+ float cbar = 0;
+ float LCL = 0;
+ float UCL = 0;
+
+ //Calculate cbar.
+ for (int i = 0; i < c; i++)
+ {
+ cbar += (float)(nonconform[i]);
+ }
+ cbar /= c;
+
+ //Calculate UCL and LCL.
+ UCL = (float)(cbar + 3 * System.Math.Sqrt(cbar));
+ LCL = (float)(cbar - 3 * System.Math.Sqrt(cbar));
+
+ //If LCL is less than zero, then it should be zero.
+ if (LCL < 0)
+ LCL = 0;
+
+ //Create the series for the cchart data.
+ Series cseries = new Series("cseries");
+ //Graph subgroups vs. non-conformities.
+ for (int i = 0; i < c; i++)
+ cseries.Points.AddXY(subgroup[i], nonconform[i]);
+
+ //Set the series type to a line.
+ cseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(cseries);
+
+ //Add the lines to the graph as annotations.
+ //cBar line.
+ addLineAnnotation(output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, cbar, cseries.Points[c - 1].XValue, 0, output);
+
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, UCL, cseries.Points[c - 1].XValue, 0, output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, LCL, cseries.Points[c - 1].XValue, 0, output);
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("CBAR", output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, cbar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, UCL, output);
+
+ addTextAnnotation("LCL", output.ChartAreas[cseries.ChartArea].AxisX, output.ChartAreas[cseries.ChartArea].AxisY,
+ cseries.Points[0].XValue, LCL, output);
+ }
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL, cseries.ChartArea, output);
+
+ //Return the series.
+ return cseries;
+ }
+
+ ///
+ /// Creates a P-Chart with lines indicating pBar, UCL and LCL. A P-Chart is the same as an NP-Chart except
+ /// with a variable number of items in each subgroup.
+ ///
+ /// An array holding the subgroups. Must aline with the nonconform array and the number tested.
+ /// An array holding the non-conformity data associated with the subgroups. Must aline with the subgroups and the number tested.
+ /// An array holding the number of items in each subgroup. Must aline with the subgroups and the nonconform array.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series pChart(float[] subgroup, float[] nonconform, float[] numbertested, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if ((subgroup.Length != nonconform.Length) || (subgroup.Length != numbertested.Length) || (nonconform.Length != numbertested.Length))
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, nonconform, numbertested");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize phat, UCL, LCL and pBar.
+ float[] phat = new float[c];
+ float[] UCL = new float[c];
+ float[] LCL = new float[c];
+ float pbar = 0;
+
+ //Calculate phat(i).
+ for (int i = 0; i < c; i++)
+ phat[i] = nonconform[i] / numbertested[i];
+
+ //Calculate pbar.
+ for (int i = 0; i < c; i++)
+ {
+ pbar += phat[i];
+ }
+ pbar /= c;
+
+ //Calculate UCL and LCL.
+ for (int i = 0; i < c; i++)
+ {
+ UCL[i] = (float)(pbar + 3 * System.Math.Sqrt((pbar * (1 - pbar)) / numbertested[i]));
+ LCL[i] = (float)(pbar - 3 * System.Math.Sqrt((pbar * (1 - pbar)) / numbertested[i]));
+ }
+
+ //Create the series for the pchart data.
+ Series pseries = new Series("pseries");
+ //Graph subgroup vs. proportion.
+ for (int i = 0; i < c; i++)
+ pseries.Points.AddXY(subgroup[i], phat[i]);
+
+ //Set the series type to a line.
+ pseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(pseries);
+
+ //Add the lines to the graph as annotations.
+ //PBAR line.
+ addLineAnnotation(output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ pseries.Points[0].XValue, pbar, pseries.Points[c - 1].XValue, 0, output);
+
+ //Add the UCL and LCL line segments as individual line annotations.
+ for (int i = 0; i < c - 1; i++)
+ {
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ subgroup[i], UCL[i], subgroup[i + 1] - subgroup[i], UCL[i + 1] - UCL[i], output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ subgroup[i], LCL[i], subgroup[i + 1] - subgroup[i], LCL[i + 1] - LCL[i], output);
+ }
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("PBAR", output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ pseries.Points[0].XValue, pbar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ pseries.Points[0].XValue, UCL[0], output);
+
+ addTextAnnotation("LCL", output.ChartAreas[pseries.ChartArea].AxisX, output.ChartAreas[pseries.ChartArea].AxisY,
+ pseries.Points[0].XValue, LCL[0], output);
+ }
+
+ //Find the maximum UCL value and store the index of it.
+ int maxUCL = 0;
+ for (int i = 1; i < c; i++)
+ if (UCL[maxUCL] < UCL[i])
+ maxUCL = i;
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL[maxUCL], pseries.ChartArea, output);
+
+ //Return the series.
+ return pseries;
+ }
+
+ ///
+ /// Creates an NP-Chart with lines indicating CL, UCL and LCL. An NP chart is the same as a P-chart except
+ /// that the number of items in each subgroup is the same.
+ ///
+ /// An array holding the subgroups. Must aline with the nonconform array.
+ /// An array holding the non-conformity data associated with the subgroups. Must aline with the subgroups.
+ /// An array holding the number of items in each subgroup. Must aline with the subgroups and the nonconform array.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series npChart(float[] subgroup, float[] nonconform, int numbertested, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != nonconform.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, nonconform, numbertested");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize UCL, LCL and pBar.
+ float UCL = 0;
+ float LCL = 0;
+ float pbar = 0;
+
+ //Calculate pbar.
+ for (int i = 0; i < c; i++)
+ {
+ pbar += nonconform[i];
+ }
+ pbar /= (c * numbertested);
+
+ //Calculate UCL and LCL.
+ UCL = (float)(numbertested * pbar + 3 * System.Math.Sqrt(numbertested * pbar * (1 - pbar)));
+ LCL = (float)(numbertested * pbar - 3 * System.Math.Sqrt(numbertested * pbar * (1 - pbar)));
+
+ //If LCL is less than zero, then it should be zero.
+ if (LCL < 0)
+ LCL = 0;
+
+ //Create the npseries
+ Series npseries = new Series("npseries");
+ //Graph subgroup vs. non-conforming values.
+ for (int i = 0; i < c; i++)
+ npseries.Points.AddXY(subgroup[i], nonconform[i]);
+
+ //Set the type to line series.
+ npseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(npseries);
+
+ //Add the lines to the graph as annotations.
+ //CL line.
+ addLineAnnotation(output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, pbar * 100, npseries.Points[c - 1].XValue, 0, output);
+
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, UCL, npseries.Points[c - 1].XValue, 0, output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, LCL, npseries.Points[c - 1].XValue, 0, output);
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("PBAR", output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, pbar * 100, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, UCL, output);
+
+ addTextAnnotation("LCL", output.ChartAreas[npseries.ChartArea].AxisX, output.ChartAreas[npseries.ChartArea].AxisY,
+ npseries.Points[0].XValue, LCL, output);
+ }
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL, npseries.ChartArea, output);
+
+ //Return the series.
+ return npseries;
+ }
+
+ ///
+ /// Creates a U-Chart with UBar, UCL and LCL lines. A U-Chart is used when the desired chart
+ /// is that of the number of non-conformities per inspection unit, where the inspection unit is variable size.
+ ///
+ /// An array holding the subgroups. Must aline with the nonconform array.
+ /// An array holding the non-conformity data associated with the subgroups. Must aline with the subgroups.
+ /// The number of items in each subgroup.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series uChart(float[] subgroup, float[] nonconform, float[] numbertested, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if ((subgroup.Length != nonconform.Length) || (subgroup.Length != numbertested.Length) || (nonconform.Length != numbertested.Length))
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, nonconform, numbertested");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize UCL, LCL and uBar.
+ float[] UCL = new float[c];
+ float[] LCL = new float[c];
+ float ubar = 0;
+
+ //Initialize temporary variables to hold temp sums for the ubar calculation
+ float sumNumerator = 0;
+ float sumDenominator = 0;
+
+ //Calculate ubar.
+ for (int i = 0; i < c; i++)
+ {
+ sumNumerator += nonconform[i];
+ sumDenominator += numbertested[i];
+ }
+ ubar = sumNumerator / sumDenominator;
+
+ //Calculate the Yvalues
+ float[] yvalues = new float[c];
+ for (int i = 0; i < c; i++)
+ yvalues[i] = nonconform[i] / numbertested[i];
+
+ //Calculate UCL and LCL.
+ for (int i = 0; i < c; i++)
+ {
+ UCL[i] = (float)(ubar + 3 * System.Math.Sqrt(ubar / numbertested[i]));
+ LCL[i] = (float)(ubar - 3 * System.Math.Sqrt(ubar / numbertested[i]));
+ }
+
+ //Create the series for the pchart data.
+ Series useries = new Series("useries");
+ //Graph subgroup vs. proportion.
+ for (int i = 0; i < c; i++)
+ useries.Points.AddXY(subgroup[i], yvalues[i]);
+
+ //Set the series type to a line.
+ useries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(useries);
+
+ //Add the lines to the graph as annotations.
+ //UBAR line.
+ addLineAnnotation(output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ useries.Points[0].XValue, ubar, useries.Points[c - 1].XValue, 0, output);
+
+ //Add the UCL and LCL line segments as individual line annotations.
+ for (int i = 0; i < c - 1; i++)
+ {
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ subgroup[i], UCL[i], subgroup[i + 1] - subgroup[i], UCL[i + 1] - UCL[i], output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ subgroup[i], LCL[i], subgroup[i + 1] - subgroup[i], LCL[i + 1] - LCL[i], output);
+ }
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("UBAR", output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ useries.Points[0].XValue, ubar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ useries.Points[0].XValue, UCL[0], output);
+
+ addTextAnnotation("LCL", output.ChartAreas[useries.ChartArea].AxisX, output.ChartAreas[useries.ChartArea].AxisY,
+ useries.Points[0].XValue, LCL[0], output);
+ }
+
+ //Find the maximum UCL value and store the index of it.
+ int maxUCL = 0;
+ for (int i = 1; i < c; i++)
+ if (UCL[maxUCL] < UCL[i])
+ maxUCL = i;
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL[maxUCL], useries.ChartArea, output);
+
+ //Return the series.
+ return useries;
+ }
+
+ ///
+ /// Creates a Run Chart of the data and adds an average line. A run chart is a plot of the data without
+ /// manipulation along with a line indicating where the average of the points is.
+ ///
+ /// An array holding the subgroups. Must aline with the data array.
+ /// An array holding the data. Must aline with the subgroup array.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series runChart(float[] subgroup, float[] data, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != data.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, data");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize a variable to hold the average.
+ float average = 0;
+
+ //Create the series for the runchart data.
+ Series runseries = new Series("runseries");
+ //Graph subgroups vs. data.
+ for (int i = 0; i < c; i++)
+ runseries.Points.AddXY(subgroup[i], data[i]);
+
+ //Set the series type to a line.
+ runseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(runseries);
+
+ //Calculate the average.
+ average = (float)output.DataManipulator.Statistics.Mean("runseries");
+
+ //Add the lines to the graph as annotations.
+ //average line.
+ addLineAnnotation(output.ChartAreas[runseries.ChartArea].AxisX, output.ChartAreas[runseries.ChartArea].AxisY,
+ runseries.Points[0].XValue, average, runseries.Points[c - 1].XValue, 0, output);
+
+ //Return the series.
+ return runseries;
+ }
+
+ ///
+ /// Creates an S-Chart of prepared data that can be evaluated. If the data is deemed to be in statistical control
+ /// an XBAR chart can be created via XBARChart function.
+ ///
+ /// An array holding the subgroups. Must aline with the data array. There must be at least 20 subgroups.
+ /// Array holding the Standard Deviation of each subgroup.
+ /// Number of measurements per subgroup. Must be between 2 and 9.
+ /// Variable returning the process standard deviation estimation.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series sChart(float[] subgroup, float[] data, int n, out float processStdDev, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != data.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, data");
+
+ //Assure there are at least 20 subgroups
+ if (subgroup.Length < 20)
+ throw new ArgumentOutOfRangeException("There must be at least 20 subgroups.", "subgroup");
+
+ //Assure n is between 2 and 9
+ if (n < 2 || n > 9)
+ throw new ArgumentOutOfRangeException("n must be between 1 and 9.", "n");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize a variable to hold sbar, UCL and LCL.
+ float sbar = 0;
+ float UCL = 0;
+ float LCL = 0;
+
+ //Declare the constants needed for calculations.
+ float[] B3 ={ 0, 0, 0, 0, 0.03F, 0.118F, 0.185F, 0.239F };
+ float[] B4 ={ 3.267F, 2.568F, 2.266F, 2.089F, 1.970F, 1.882F, 1.815F, 1.761F };
+ float[] C4 ={ 0.7979F, 0.8862F, 0.9213F, 0.9400F, 0.9515F, 0.9594F, 0.9650F, 0.9693F };
+
+ //Calculate sbar which is the center line of the standard deviation of each subgroup.
+ for (int i = 0; i < c; i++)
+ sbar += data[i];
+ sbar /= c;
+
+ //Calculate UCL and LCL.
+ //It is n-2 as the number is between 2 and 9, but the array starts at 0.
+ UCL = B4[n - 2] * sbar;
+ LCL = B3[n - 2] * sbar;
+
+ //If LCL is less than zero, then it should be zero.
+ if (LCL < 0)
+ LCL = 0;
+
+ //Create the series for the sChart data.
+ Series sseries = new Series("sseries");
+ //Graph subgroups vs. data.
+ for (int i = 0; i < c; i++)
+ sseries.Points.AddXY(subgroup[i], data[i]);
+
+ //Set the series type to a line.
+ sseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(sseries);
+
+ //Add the lines to the graph as annotations.
+ //sbar line.
+ addLineAnnotation(output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, sbar, sseries.Points[c - 1].XValue, 0, output);
+
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, UCL, sseries.Points[c - 1].XValue, 0, output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, LCL, sseries.Points[c - 1].XValue, 0, output);
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("SBAR", output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, sbar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, UCL, output);
+
+ addTextAnnotation("LCL", output.ChartAreas[sseries.ChartArea].AxisX, output.ChartAreas[sseries.ChartArea].AxisY,
+ sseries.Points[0].XValue, LCL, output);
+ }
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL, sseries.ChartArea, output);
+
+ //Calculate process standard deviation.
+ processStdDev = (float)((sbar / C4[n - 2]) * System.Math.Sqrt(1 - System.Math.Pow(C4[n - 2], 2)));
+
+ //Set the sBar class variable and clear rBar.
+ this.mysBar = sbar;
+ this.myrBar = 0;
+
+ //Store the n value for use by XBAR.
+ this.mynValue = n;
+
+ //Return the series.
+ return sseries;
+ }
+
+ ///
+ /// Creates an R-Chart of prepared data that can be evaluated. If the data is deemed to be in statistical control
+ /// an XBAR chart can be created via XBARChart function.
+ ///
+ /// An array holding the subgroups. Must aline with the data array. There must be at least 20 subgroups.
+ /// Array holding the Range (biggest value - smallest value) of each subgroup.
+ /// Number of measurements per subgroup. Must be between 2 and 9.
+ /// Variable returning the process standard deviation estimation.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series rChart(float[] subgroup, float[] data, int n, out float processStdDev, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != data.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, data");
+
+ //Assure there are at least 20 subgroups
+ if (subgroup.Length < 20)
+ throw new ArgumentOutOfRangeException("There must be at least 20 subgroups.", "subgroup");
+
+ //Assure n is between 2 and 9
+ if (n < 2 || n > 9)
+ throw new ArgumentOutOfRangeException("n must be between 1 and 9.", "n");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize a variable to hold sbar, UCL and LCL.
+ float rbar = 0;
+ float UCL = 0;
+ float LCL = 0;
+
+ //Declare the constants needed for calculations.
+ float[] D3 ={ 0, 0, 0, 0, 0, 0.076F, 0.136F, 0.184F };
+ float[] D4 ={ 3.267F, 2.574F, 2.282F, 2.114F, 2.004F, 1.924F, 1.864F, 1.816F };
+ float[] D2 ={ 1.128F, 1.693F, 2.059F, 2.326F, 2.534F, 2.704F, 2.847F, 2.970F };
+
+ //Calculate rbar which is the center line of the range of each subgroup.
+ for (int i = 0; i < c; i++)
+ rbar += data[i];
+ rbar /= c;
+
+ //Calculate UCL and LCL.
+ //It is n-2 as the number is between 2 and 9, but the array starts at 0.
+ UCL = D4[n - 2] * rbar;
+ LCL = D3[n - 2] * rbar;
+
+ //If LCL is less than zero, then it should be zero.
+ if (LCL < 0)
+ LCL = 0;
+
+ //Create the series for the sChart data.
+ Series rseries = new Series("rseries");
+ //Graph subgroups vs. data.
+ for (int i = 0; i < c; i++)
+ rseries.Points.AddXY(subgroup[i], data[i]);
+
+ //Set the series type to a line.
+ rseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(rseries);
+
+ //Add the lines to the graph as annotations.
+ //sbar line.
+ addLineAnnotation(output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, rbar, rseries.Points[c - 1].XValue, 0, output);
+
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, UCL, rseries.Points[c - 1].XValue, 0, output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, LCL, rseries.Points[c - 1].XValue, 0, output);
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("RBAR", output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, rbar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, UCL, output);
+
+ addTextAnnotation("LCL", output.ChartAreas[rseries.ChartArea].AxisX, output.ChartAreas[rseries.ChartArea].AxisY,
+ rseries.Points[0].XValue, LCL, output);
+ }
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL, rseries.ChartArea, output);
+
+ //Calculate process standard deviation.
+ processStdDev = (float)(rbar / D2[n - 2]);
+
+ //Set the rBar class variable and clear sBar.
+ this.myrBar = rbar;
+ this.mysBar = 0;
+
+ //Store the n value for use by XBAR.
+ this.mynValue = n;
+
+ //Return the series.
+ return rseries;
+ }
+
+ ///
+ /// Creates an XBAR chart of the prepared data. sChart or rChart must have already been called to create a XBAR chart.
+ ///
+ /// An array holding the subgroups. Must aline with the data array.
+ /// Array holding the Mean of each subgroup. Must aline with the subgroup array.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series XBARChart(float[] subgroup, float[] data, Chart output)
+ {
+ //Call the private function with no MRBAR to graph a separate XBAR chart.
+ return XBARChartImplementation(subgroup, data, output, 0);
+ }
+
+ ///
+ /// Creates an Individuals Chart of the data and places the MRBar, XBAR, UCL and LCL upon it.
+ ///
+ /// An array holding the subgroups. Must aline with the data array.
+ /// An array holding the data. Must aline with the subgroup array.
+ /// Variable returning the process standard deviation estimation.
+ /// The chart which will have the created series added to it.
+ /// Series which has been created and added to the output chart.
+ public Series individualsChart(float[] subgroup, float[] data, out float processStdDev, Chart output)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != data.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, data");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize MRBAR.
+ float mrbar = 0;
+
+ //Calculate cbar.
+ for (int i = 0; i < c-1; i++)
+ {
+ mrbar += (float)System.Math.Abs(data[i + 1] - data[i]);
+ }
+ mrbar /= c - 1;
+
+ //Calculate the process standard deviation.
+ processStdDev = (float)(mrbar / 1.128);
+
+ //Return the series
+ return XBARChartImplementation(subgroup, data, output, mrbar);
+ }
+
+ ///
+ /// Creates an XBAR chart of the prepared data. This function contains the implementation for the public function with one extra
+ /// parameter for MRBAR. If MRBAR is specified, then only one chart is created with all the values.
+ ///
+ /// An array holding the subgroups. Must aline with the data array.
+ /// Array holding the Mean of each subgroup. Must aline with the subgroup array.
+ /// The chart which will have the created series added to it.
+ /// The value of MRBAR if it has been calculated by Individuals Chart.
+ /// Series which has been created and added to the output chart.
+ private Series XBARChartImplementation(float[] subgroup, float[] data, Chart output, float mrbar)
+ {
+ //Assure the input all have the same number of items.
+ if (subgroup.Length != data.Length)
+ throw new ArgumentException("Input arrays must all be the same length.", "subgroup, nonconform, numbertested");
+
+ //Assure that either rBar or sBar have a value, and n has a value. If MRBAR has been specified, do not check.
+ if (mrbar == 0)
+ if ((this.myrBar == 0 && this.mysBar == 0) || (this.mynValue < 2 || this.mynValue > 9))
+ throw new ArgumentException("sChart or rChart must be called before XBAR.");
+
+ //c holds the total number of items (subgroups).
+ int c = subgroup.Length;
+
+ //Declare and initialize a variable to hold sbar, UCL and LCL.
+ float xbar = 0;
+ float UCL = 0;
+ float LCL = 0;
+
+ //Declare the constants needed for calculations.
+ float[] A2 ={ 1.880F, 1.023F, 0.729F, 0.577F, 0.483F, 0.419F, 0.373F, 0.337F };
+ float[] A3 ={ 2.659F, 1.954F, 1.628F, 1.427F, 1.287F, 1.182F, 1.099F, 1.032F };
+
+ //Calculate xbar, which is the mean of all the subgroup means.
+ for (int i = 0; i < c; i++)
+ xbar += data[i];
+ xbar /= c;
+
+ //Calculate UCL and LCL.
+ //Switch based on if we're calculating from a rChart or a sChart, or if a MRBAR was given.
+ //It is n-2 as the number is between 2 and 9, but the array starts at 0
+ if (mrbar != 0)
+ {
+ UCL = (float)(xbar + 2.66 * mrbar);
+ LCL = (float)(xbar - 2.66 * mrbar);
+ }
+ else if (this.mysBar != 0)
+ {
+ UCL = xbar + A3[this.mynValue - 2] * this.mysBar;
+ LCL = xbar - A3[this.mynValue - 2] * this.mysBar;
+ }
+ else if (this.myrBar != 0)
+ {
+ UCL = xbar + A2[this.mynValue - 2] * this.myrBar;
+ LCL = xbar - A2[this.mynValue - 2] * this.myrBar;
+ }
+
+ //If LCL is less than zero, then it should be zero.
+ if (LCL < 0)
+ LCL = 0;
+
+ //Create the series for the xbar data.
+ Series xbarseries = new Series("xbarseries");
+ //Graph subgroups vs. data.
+ for (int i = 0; i < c; i++)
+ xbarseries.Points.AddXY(subgroup[i], data[i]);
+
+ //Set the series type to a line.
+ xbarseries.ChartType = SeriesChartType.Line;
+
+ //Add the series to the chart.
+ output.Series.Add(xbarseries);
+
+ //Add the lines to the graph as annotations.
+ //xbar line.
+ addLineAnnotation(output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, xbar, xbarseries.Points[c - 1].XValue, 0, output);
+
+ //UCL line.
+ addLineAnnotation(output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, UCL, xbarseries.Points[c - 1].XValue, 0, output);
+
+ //LCL line.
+ addLineAnnotation(output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, LCL, xbarseries.Points[c - 1].XValue, 0, output);
+
+ //MBAR line if it has been specified
+ if (mrbar != 0)
+ addLineAnnotation(output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, mrbar, xbarseries.Points[c - 1].XValue, 0, output);
+
+ //Add Text Annotations (line labels) if the user desired.
+ if (myShowLineLabels)
+ {
+ addTextAnnotation("XBAR", output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, xbar, output);
+
+ addTextAnnotation("UCL", output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, UCL, output);
+
+ addTextAnnotation("LCL", output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, LCL, output);
+
+ if (mrbar!=0)
+ addTextAnnotation("MRBAR", output.ChartAreas[xbarseries.ChartArea].AxisX, output.ChartAreas[xbarseries.ChartArea].AxisY,
+ xbarseries.Points[0].XValue, mrbar, output);
+ }
+
+ //Scale the chart if the user has requested it.
+ FitChart(UCL, xbarseries.ChartArea, output);
+
+ //Return the series.
+ return xbarseries;
+ }
+ #endregion
+
+ #region Math Methods
+ ///
+ /// Calculates the mean of an array of numbers.
+ ///
+ /// The input array of items of which the mean will be calculated.
+ /// The mean of the data.
+ public float Mean(float[] data)
+ {
+ //Create a temporary variable to hold the sum.
+ float sum = 0;
+
+ //Calculate the sum of the data items.
+ for (int i = 0; i < data.Length; i++)
+ sum += data[i];
+
+ //Divide them by the total number of items.
+ sum /= data.Length;
+
+ //Return the mean.
+ return sum;
+ }
+
+ ///
+ /// Calculates the range of an array of numbers.
+ ///
+ /// The input array of items of which the range will be calculated.
+ /// The range of the data.
+ public float Range(float[] data)
+ {
+ //Create two variables: one to hold the index of the largest value and one to hold the index of the smallest value.
+ int maxIndex = 0;
+ int minIndex = 0;
+
+ //Find the largest and smallest values in the array.
+ for (int i = 1; i < data.Length; i++)
+ {
+ if (data[maxIndex] < data[i])
+ maxIndex = i;
+ if (data[minIndex] > data[i])
+ minIndex = i;
+ }
+
+ //Return the Range.
+ return (data[maxIndex] - data[minIndex]);
+ }
+
+ ///
+ /// Calculates the standard deviation of an array of numbers.
+ ///
+ /// The input array of items of which the standard deviation will be calculated.
+ /// The standard deviation of the data.
+ public float StandardDeviation(float[] data)
+ {
+ //Create two variables: one to hold the sum of the deviations, and one to hold the mean of the data.
+ float sumdeviation = 0;
+ float mean = 0;
+
+ //Calculate the mean.
+ mean = Mean(data);
+
+ //Calculate the sum of the squared deviations.
+ for (int i = 0; i < data.Length; i++)
+ sumdeviation += (float)System.Math.Pow(data[i] - mean, 2);
+
+ //Return the standard deviation.
+ return (float)System.Math.Sqrt(sumdeviation / (data.Length - 1));
+ }
+ #endregion
+
+ #region Private Methods
+ ///
+ /// Scales the chart so that the UCL line will always be within the chart.
+ ///
+ /// The maximum UCL value.
+ /// The name of the chart area we are plotting to.
+ /// The chart which contains the chart area.
+ private void FitChart(float UCL, string ChartArea, Chart output)
+ {
+ //Check to see if scaling is enabled.
+ if (myAutoFitLines)
+ {
+ //Force the chartarea to recalculate the axis values so that we can find the Y-axis maximum.
+ output.ChartAreas[ChartArea].RecalculateAxesScale();
+
+ //Check if UCL is outside the maximum Y value.
+ if (UCL > (float)output.ChartAreas[ChartArea].AxisY.Maximum)
+ //If so set the Y-axis maximum to be the UCL value.
+ output.ChartAreas[ChartArea].AxisY.Maximum = UCL;
+ }
+ }
+
+ ///
+ /// Function to add a line annotation to the desired chart in the format which is followed by
+ /// all the line annotations in this add-on.
+ ///
+ /// X-Axis that the line annotation is to use for co-ordinates.
+ /// Y-Axis that the line annotation is to use for co-ordinates.
+ /// X value for the start of the line.
+ /// Y value for the start of the line.
+ /// Width of the line.
+ /// Height of the line.
+ /// The chart that the line annotation is being added to.
+ private void addLineAnnotation(Axis AxisX, Axis AxisY, double X, double Y, double Width, double Height, Chart output)
+ {
+ //Create a new line annotation.
+ LineAnnotation lineAnnotation = new LineAnnotation();
+
+ //Set each property to the parameters passed in.
+ lineAnnotation.AxisX = AxisX;
+ lineAnnotation.AxisY = AxisY;
+ lineAnnotation.Y = Y;
+ lineAnnotation.X = X;
+ lineAnnotation.Height = Height;
+ lineAnnotation.Width = Width;
+
+ //Turn off relative size to get graph-oriented co-ordinates and set the line color.
+ lineAnnotation.IsSizeAlwaysRelative = false;
+ lineAnnotation.LineColor = myLineColor;
+
+ //Add the annotation to the chart.
+ output.Annotations.Add(lineAnnotation);
+ }
+
+ ///
+ /// Function to add text as an annotation to the chart.
+ ///
+ /// The text that we wish to display.
+ /// X-Axis that the text annotation is to use for co-ordinates.
+ /// Y-Axis that the text annotation is to use for co-ordinates.
+ /// X value for the start of the text.
+ /// Y value for the start of the text.
+ /// The chart that the line annotation is being added to.
+ private void addTextAnnotation(string text, Axis AxisX, Axis AxisY, double X, double Y, Chart output)
+ {
+ //Create a new line annotation.
+ TextAnnotation textAnnotation = new TextAnnotation();
+
+ //Set each property to the parameters passed in.
+ textAnnotation.AxisX = AxisX;
+ textAnnotation.AxisY = AxisY;
+ textAnnotation.Y = Y;
+ textAnnotation.X = X;
+ textAnnotation.Text = text;
+
+ //Turn off relative size to get graph-oriented co-ordinates and set the aesthetic properties.
+ textAnnotation.IsSizeAlwaysRelative = false;
+ textAnnotation.ForeColor = myForeColor;
+ textAnnotation.Font = myFont;
+
+ //Add the annotation to the chart.
+ output.Annotations.Add(textAnnotation);
+ }
+ #endregion
+ }
+}
diff --git a/MES_Manage/App_code/Utilities/SixSigma/_system~.ini b/MES_Manage/App_code/Utilities/SixSigma/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/SixSigma/vssver2.scc b/MES_Manage/App_code/Utilities/SixSigma/vssver2.scc
new file mode 100644
index 0000000..7ba358c
Binary files /dev/null and b/MES_Manage/App_code/Utilities/SixSigma/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/SpikeRemoval/SpikeRemoval.cs b/MES_Manage/App_code/Utilities/SpikeRemoval/SpikeRemoval.cs
new file mode 100644
index 0000000..901b112
--- /dev/null
+++ b/MES_Manage/App_code/Utilities/SpikeRemoval/SpikeRemoval.cs
@@ -0,0 +1,187 @@
+//=================================================================
+// File: SpikeRemoval.cs
+//
+// Namespace: System.Web.UI.DataVisualization.Charting.Utilities
+//
+// Classes: SpikeRemoval
+//
+// Purpose: Removes spikes from data
+//
+//
+//===================================================================
+// Chart Control for ASP.Net
+// Copyright ?Microsoft Corporation, all rights reserved
+//===================================================================
+
+using System;
+using System.Data;
+using System.Configuration;
+using System.Drawing;
+using System.Web.UI.DataVisualization.Charting;
+
+namespace System.Web.UI.DataVisualization.Charting.Utilities
+{
+ ///
+ /// Spike removal is a utility used to remove high and low spikes from a graph. This means that the
+ /// chart axis scaling will be changed so that data that was difficult to see and analyze will be easier
+ /// to see after anomaly spikes have been removed.
+ ///
+ public class SpikeRemoval
+ {
+ #region Members
+ private bool mySetCutoffLabels;
+ private MarkerStyle myRemovedPointStyle;
+ private float myMaximum;
+ private float myMinimum;
+ #endregion
+
+ #region Properties
+ ///
+ /// Sets whether or not labels are set on each cut off point. If they are, they will show up on the chart and provide
+ /// extra clarification if the tooltip is not enough.
+ ///
+ public bool SetCutoffLabels
+ {
+ get { return mySetCutoffLabels; }
+ set { mySetCutoffLabels = value; }
+ }
+
+ ///
+ /// Holds the style that is used for the marker of any deleted points.
+ ///
+ public MarkerStyle RemovedPointStyle
+ {
+ get { return myRemovedPointStyle; }
+ set { myRemovedPointStyle = value; }
+ }
+
+ ///
+ /// Contains the maximum value of the data after it has had the spikes removed. This value also has
+ /// the tolerance factored in.
+ ///
+ public float Maximum
+ {
+ get { return myMaximum; }
+ }
+
+ ///
+ /// Contains the minimum value of the data after it has had the spikes removed. This value also has
+ /// the tolerance factored in.
+ ///
+ public float Minimum
+ {
+ get { return myMinimum; }
+ }
+ #endregion
+
+ #region Constructors
+ ///
+ /// Default Constructor.
+ ///
+ public SpikeRemoval()
+ {
+ //Default removed point style to a diamond.
+ myRemovedPointStyle = MarkerStyle.Diamond;
+
+ //Default labels to off.
+ mySetCutoffLabels = false;
+ }
+ #endregion
+
+ #region Public Methods
+ ///
+ /// RemoveSpikes will remove the high and low spikes off of a graph. The data within the series
+ /// provided will be modified, and for best results, the chart containing it should have axis
+ /// scaled automatically.
+ ///
+ /// The series which contains the data to be analyzed and modified. It is assumed that
+ /// Y-values are contained in YValues[0]. Cases contrary to this will produce unexpected results.
+ /// The percentage range of data to be kept. Anything that lies outside of the range
+ /// will be considered a spike.
+ /// The percentage a spike can be outside of the range but still included. The percentage
+ /// is based on the maximum or minimum value in the range.
+ public void RemoveSpikes(Series dataseries, int range, int tolerance)
+ {
+ //Assure range and tolerance are a percentage.
+ //Range is more strict in that at least 1% of the data must be included in the range, whereas it is
+ //possible to have 0% tolerance.
+ if ((range < 1 || range > 100))
+ throw new ArgumentOutOfRangeException("range", "Range must be a percentage between 1 and 100");
+ if ((tolerance < 0 || tolerance > 100))
+ throw new ArgumentOutOfRangeException("tolerance", "Tolerance must be a percentage between 0 and 100");
+
+ //Data values and indices hold the y values and the indices of the points in arrays.
+ float[] datavalues = new float[dataseries.Points.Count];
+ int[] indices = new int[dataseries.Points.Count];
+
+ //Percent and number hold the actual values calculated from the range.
+ float percent = 0.0f;
+ int number = 0;
+
+ //Copy all y values into an array and store the indices.
+ for (int i = 0; i < dataseries.Points.Count; i++)
+ {
+ datavalues[i] = (float)dataseries.Points[i].YValues[0];
+ indices[i] = i;
+ }
+
+ //Sort the array and indices.
+ Array.Sort(datavalues, indices);
+
+ //Calculate the percent that has to come off each side of the data.
+ //ie. With a range of 80%, 20% of the data is being cut off, and 10% is coming off each side.
+ percent = ((100 - (float)range) / 2) / 100;
+
+ //Calculate the actual number of points coming off of each side.
+ //ie. With a percent of 10% and 100 data points, 10 points are coming off of each side.
+ number = (int)System.Math.Round(dataseries.Points.Count * percent, 0);
+
+ //Set the maximum and minimum values.
+ myMinimum = (float)(dataseries.Points[indices[number]].YValues[0] - System.Math.Abs(dataseries.Points[indices[number]].YValues[0] * (((float)tolerance / 100))));
+ myMaximum = (float)(dataseries.Points[indices[dataseries.Points.Count - number - 1]].YValues[0] + System.Math.Abs(dataseries.Points[indices[dataseries.Points.Count - number - 1]].YValues[0] * (((float)tolerance / 100))));
+
+ //Cut the low spikes off.
+ for (int i = 0; i < number; i++)
+ {
+ //Don't cut the spike if it's within the tolerance value.
+ if (dataseries.Points[indices[i]].YValues[0] < (myMinimum))
+ {
+ //Assign the tooltip to the point
+ dataseries.Points[indices[i]].ToolTip = "Value: " + dataseries.Points[indices[i]].YValues[0];
+
+ //Assign the label to the point
+ if (mySetCutoffLabels)
+ dataseries.Points[indices[i]].Label = "Value: " + dataseries.Points[indices[i]].YValues[0];
+
+ //Reassign the value to the minimum number allowed
+ dataseries.Points[indices[i]].YValues[0] = myMinimum;
+
+ //Set the marker point
+ dataseries.Points[indices[i]].MarkerStyle = myRemovedPointStyle;
+ }
+ }
+
+ //Cut the high spikes off.
+ for (int i = dataseries.Points.Count - number; i < dataseries.Points.Count; i++)
+ {
+ //Don't cut the spike if it's within the tolerance value.
+ if (dataseries.Points[indices[i]].YValues[0] > (myMaximum))
+ {
+ //Assign the tooltip to the point
+ dataseries.Points[indices[i]].ToolTip = "Value: " + dataseries.Points[indices[i]].YValues[0];
+
+ //Assign the label to the point
+ if (mySetCutoffLabels)
+ dataseries.Points[indices[i]].Label = "Value: " + dataseries.Points[indices[i]].YValues[0];
+
+ //Reassign the value to the maximum number allowed
+ dataseries.Points[indices[i]].YValues[0] = myMaximum;
+
+ //Set the marker point
+ dataseries.Points[indices[i]].MarkerStyle = myRemovedPointStyle;
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/MES_Manage/App_code/Utilities/SpikeRemoval/_system~.ini b/MES_Manage/App_code/Utilities/SpikeRemoval/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/Utilities/SpikeRemoval/vssver2.scc b/MES_Manage/App_code/Utilities/SpikeRemoval/vssver2.scc
new file mode 100644
index 0000000..7216f4f
Binary files /dev/null and b/MES_Manage/App_code/Utilities/SpikeRemoval/vssver2.scc differ
diff --git a/MES_Manage/App_code/Utilities/_system~.ini b/MES_Manage/App_code/Utilities/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/_system~.ini b/MES_Manage/App_code/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/drawchart/CalculateData.cs b/MES_Manage/App_code/drawchart/CalculateData.cs
new file mode 100644
index 0000000..2ca308c
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/CalculateData.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data;
+using System.Web.UI.DataVisualization.Charting;
+
+///
+///CalculateData 的摘要说明
+///
+public class CalculateData
+{
+ public CalculateData()
+ {
+ //
+ //TODO: 在此处添加构造函数逻辑
+ //
+ }
+ ///
+ /// 观测值最大值
+ ///
+ /// 子组观测值
+ ///
+ static private double Max(double[] Xn)
+ {
+ double temp;
+ temp = Xn[0];
+ for (int i = 0; i < Xn.Length; i++)
+ {
+ temp = (Xn[i] > temp) ? Xn[i] : temp;
+ }
+ return temp;
+ }
+ ///
+ /// 观测值最小值
+ ///
+ /// 子组观测值
+ ///
+ static private double Min(double[] Xn)
+ {
+ double temp;
+ temp = Xn[0];
+ for (int i = 0; i < Xn.Length; i++)
+ {
+ temp = (Xn[i] < temp) ? Xn[i] : temp;
+ }
+ return temp;
+ }
+ ///
+ /// 计算X在区间[ValueDown,ValueUp]的数量
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ static private void SumRang(double[] X, int GroupCount, double[] ValueDown, double[] ValueUp, out double[] Yk, out double[] YkCount)
+ {
+ int temp = 0;
+ //总数量
+ int allCount = 0;
+ Yk = new double[GroupCount];
+ YkCount = new double[GroupCount];
+ for (int j = 0; j < GroupCount - 1; j++)
+ {
+ temp = 0;
+ for (int i = 0; i < X.Length; i++)
+ {
+
+ if (X[i] >= ValueDown[j] & X[i] < ValueUp[j])
+ {
+ temp = temp + 1;
+ allCount++;
+ }
+ }
+ Yk[j] = temp;
+ }
+
+ for (int i = 0; i < X.Length; i++)
+ {
+
+ if (X[i] >= ValueDown[GroupCount - 1] & X[i] <= ValueUp[GroupCount - 1])
+ {
+ temp = temp + 1;
+ allCount++;
+ }
+ }
+ Yk[GroupCount - 1] = temp;
+ for (int i = 0; i < Yk.Length; i++)
+ {
+ YkCount[i] = Yk[i];
+ Yk[i] = Yk[i] / (double)allCount * 100;
+ }
+ }
+ public static void DataPareto(double[] Data,int GroupCount)
+ {
+ Spc_Data_Pareto m_Spc_Data_Pareto = new Spc_Data_Pareto();
+ //数组最大值
+ double minValue = Min(Data);
+ //数组最小值
+ double maxValue = Max(Data);
+ //X轴刻度
+ double XSpan = (maxValue - minValue) / GroupCount;
+ //X轴下刻度线
+ double[] XSpanDown = new double[GroupCount];
+ //X轴上刻度线
+ double[] XSpanUp = new double[GroupCount];
+ double[] Yk=new double[GroupCount];
+
+ XSpanDown[0] = minValue;
+ XSpanUp[0] = minValue + XSpan;
+ for (int i = 1; i < GroupCount; i++)
+ {
+ XSpanDown[i] = minValue + i * XSpan;
+ XSpanUp[i] = minValue + (i + 1) * XSpan;
+ }
+ //数据在区间数组的数量
+ SumRang(Data, GroupCount, XSpanDown, XSpanUp, out Yk, out m_Spc_Data_Pareto.YCount);
+
+ for (int i = 0; i < GroupCount; i++)
+ {
+ if (i == 0)
+ {
+ m_Spc_Data_Pareto.AxisX[i] = minValue + XSpan / 2;
+ }
+ else
+ {
+ m_Spc_Data_Pareto.AxisX[i] = minValue + XSpan;
+ }
+ }
+
+ }
+}
+///
+/// 排列图数据
+///
+public class Spc_Data_Pareto
+{
+ //X轴数据
+ public double[] AxisX;
+ //所有数据在X轴各范围内的数量
+ public double[] YCount;
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/drawchart/DrawChart.SpcCaculator.cs b/MES_Manage/App_code/drawchart/DrawChart.SpcCaculator.cs
new file mode 100644
index 0000000..6df1bf7
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/DrawChart.SpcCaculator.cs
@@ -0,0 +1,225 @@
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data;
+using System.Web.UI.DataVisualization.Charting;
+using System.Data.SqlClient;
+using System.Web.UI.DataVisualization.Charting.Utilities;
+
+///
+///DrawChart 的摘要说明
+///
+public partial class DrawChart
+{
+ ///
+ /// 排列图
+ ///
+ ///
+ ///
+ public static void ChartQualityData_Pareto(double[] X,Chart chart1)
+ {
+ int n=8;
+ chart1.Series["RawData"].Points.DataBindY(X);
+
+ DrawPareto drawPareto = new DrawPareto();
+
+ drawPareto.SegmentIntervalNumber = n;
+ drawPareto.ShowPercentOnSecondaryYAxis = false;
+ drawPareto.CreatePareto(chart1, "RawData", "Histogram");
+ drawPareto.MakeParetoChart(chart1, "Histogram", "Pareto");
+ // Set chart types for output data
+ chart1.Series["Pareto"].ChartType = SeriesChartType.Line;
+ // set the markers for each point of the Pareto Line
+ chart1.Series["Pareto"].IsValueShownAsLabel = true;
+ chart1.Series["Pareto"].MarkerColor = Color.Red;
+ chart1.Series["Pareto"].MarkerBorderColor = Color.MidnightBlue;
+ chart1.Series["Pareto"].MarkerStyle = MarkerStyle.Circle;
+ chart1.Series["Pareto"].MarkerSize = 6;
+ chart1.Series["Pareto"].LabelFormat = "0.#"; // format with one decimal and leading zero
+ // Set Color of line Pareto chart
+ chart1.Series["Pareto"].Color = Color.FromArgb(252, 180, 65);
+
+
+
+ }
+ ///
+ /// 直方图
+ ///
+ ///
+ ///
+ public static void ChartQualityData_Histogram(double[] X, Chart chart1)
+ {
+ int n = 8;
+ chart1.Series["RawData"].Points.DataBindY(X);
+ // Populate single axis data distribution series. Show Y value of the
+ // data series as X value and set all Y values to 1.
+ foreach (DataPoint dataPoint in chart1.Series["RawData"].Points)
+ {
+ chart1.Series["DataDistribution"].Points.AddXY(dataPoint.YValues[0], 1);
+ }
+ // Create a histogram series
+ HistogramChartHelper histogramHelper = new HistogramChartHelper();
+ histogramHelper.SegmentIntervalNumber = n;
+ histogramHelper.ShowPercentOnSecondaryYAxis = false;
+ // NOTE: Interval width may be specified instead of interval number
+ //histogramHelper.SegmentIntervalWidth = 15;
+ histogramHelper.CreateHistogram(chart1, "RawData", "Histogram");
+ }
+
+ ///
+ /// 分析正态分布图
+ ///
+ /// 被分析数据组
+ /// 理论上限
+ /// 理论下限
+ ///
+ public static void ChartQualityData_NormalDistribution(double[] X, double Usl, double Lsl, Chart chart1)
+ {
+ double x;
+ double s;
+ double QU;
+ double QL;
+ double cp;
+ double cpk;
+ double[] sx;
+ double[] sy;
+
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+ //计算SPC参数
+ SpcCaculator.SpcValue(X, ref Usl, ref Lsl, out x, out s, out QU, out QL, out cp, out cpk, out sx, out sy);
+
+ //坐标轴
+ double ValueUpX = Convert.ToDouble(Max(sx).ToString("F4"));
+ double ValueDownX = Convert.ToDouble(Min(sx).ToString("F4"));
+ double ValueUpY = Convert.ToDouble(Max(sy).ToString("F4"));
+
+ ValueDownX = Math.Min(ValueDownX, Lsl);
+ ValueDownX = Math.Min(ValueDownX, QL);
+
+ ValueUpX = Math.Max(ValueUpX, Usl);
+ ValueUpX = Math.Max(ValueUpX, QU);
+
+
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea1"].AxisX.Minimum = Math.Round(ValueDownX - X1, 4);
+ chart1.ChartAreas["ChartArea1"].AxisX.Maximum = Math.Round(ValueUpX + X1, 4);
+ chart1.ChartAreas["ChartArea1"].AxisY.Minimum = 0;
+ chart1.ChartAreas["ChartArea1"].AxisY.Maximum = Math.Round(ValueUpY + ValueUpY / 10, 4);
+ //绘图正态分布曲线(共取了11个点)
+ for (int i = 0; i < sx.Length; i++)
+ {
+ chart1.Series[0].Points.AddXY(Math.Round(sx[i], 4), Math.Round(sy[i], 4));
+ }
+
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[1].IntervalOffset = sx[5];
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[1].Text = "SL=" + sx[5].ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[2].IntervalOffset = Usl;
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[2].Text = "USL=" + Usl.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[3].IntervalOffset = Lsl;
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[3].Text = "LSL=" + Lsl.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[4].IntervalOffset = QL;
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[4].Text = "QL=" + QL.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[5].IntervalOffset = QU;
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[5].Text = "QU=" + QU.ToString("F4");
+
+ //将CpCpk绘制到图形中
+ DarwCpCpk(chart1, cp, cpk);
+ //TextAnnotation annotation3;
+ //annotation3 = new TextAnnotation();
+ //annotation3.Text = "Cp=" + cp.ToString("F2");
+ //annotation3.ForeColor = Color.Black;
+ //annotation3.Font = new Font("Arial", 11); ;
+ //annotation3.X = 60;
+ //annotation3.Y = 90;
+ //chart1.Annotations.Add(annotation3);
+ //annotation3 = new TextAnnotation();
+ //annotation3.Text = "Cpk=" + cpk.ToString("F2");
+ //annotation3.ForeColor = Color.Black;
+ //annotation3.Font = new Font("Arial", 11); ;
+ //annotation3.X = 80;
+ //annotation3.Y = 90;
+ //chart1.Annotations.Add(annotation3);
+ }
+ ///
+ /// SPC分析基本趋势图
+ ///
+ ///
+ ///
+ public static void ChartQualityData_TrendPictureBasic_new(DataTable dt, double Usl, double Lsl, Chart chart1)
+ {
+
+ double x;
+ double s;
+ double QU;
+ double QL;
+ double cp;
+ double cpk;
+ double[] sx;
+ double[] sy;
+
+ double[] X;
+ if (dt.Rows.Count < 3) return;
+ X = new double[dt.Rows.Count];
+ for (int i = 0; i < dt.Rows.Count; i++)
+ {
+ X[i] = Convert.ToDouble(dt.Rows[i][0]);
+ }
+
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+
+
+
+
+ //计算SPC参数
+ SpcCaculator.SpcValue(X, ref Usl, ref Lsl, out x, out s, out QU, out QL, out cp, out cpk, out sx, out sy);
+
+ //坐标轴
+ double ValueUpX;
+ double ValueDownX;
+
+ ValueDownX = Math.Min(ValueDown, Lsl);
+ ValueDownX = Math.Min(ValueDownX, QL);
+
+ ValueUpX = Math.Max(ValueUp, Usl);
+ ValueUpX = Math.Max(ValueUpX, QU);
+
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea1"].AxisY.Minimum = Math.Round(ValueDownX - X1, 4);
+ chart1.ChartAreas["ChartArea1"].AxisY.Maximum = Math.Round(ValueUpX + X1, 4);
+
+
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[1].IntervalOffset = sx[5];
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[1].Text = "SL=" + sx[5].ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[2].IntervalOffset = Usl;
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[2].Text = "USL=" + Usl.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[3].IntervalOffset = Lsl;
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[3].Text = "LSL=" + Lsl.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[4].IntervalOffset = QU;
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[4].Text = "QU=" + QU.ToString("F4");
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[5].IntervalOffset = QL;
+ chart1.ChartAreas["ChartArea1"].AxisY.StripLines[5].Text = "QL=" + QL.ToString("F4");
+
+ chart1.Series[0].Points.DataBind(dt.DefaultView, "", "测量值", "Tooltip=ToolTip");
+ //将CpCpk绘制到图形中
+ DarwCpCpk(chart1, cp, cpk);
+ }
+ ///
+ /// 将CpCpk绘制到图形中
+ ///
+ ///
+ ///
+ ///
+ static private void DarwCpCpk(Chart chart1,double cp,double cpk)
+ {
+ TextAnnotation annotation;
+ annotation = (TextAnnotation)chart1.Annotations["TextAnnotationCp"];
+ annotation.Text = "Cp=" + cp.ToString("F2");
+ annotation = (TextAnnotation)chart1.Annotations["TextAnnotationCpk"];
+ annotation.Text = "Cpk=" + cpk.ToString("F2");
+ }
+
+}
diff --git a/MES_Manage/App_code/drawchart/DrawChart.cs b/MES_Manage/App_code/drawchart/DrawChart.cs
new file mode 100644
index 0000000..3229d98
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/DrawChart.cs
@@ -0,0 +1,787 @@
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data;
+using System.Web.UI.DataVisualization.Charting;
+using System.Data.SqlClient;
+
+
+///
+///DrawChart 的摘要说明
+///
+public partial class DrawChart
+{
+
+ public static void ChartQualityData_Pareto(DataTable dt,int n, Chart chart1)
+ {
+ chart1.Series["RawData"].Points.DataBindY(dt.Rows, "测量值");
+
+ DrawPareto drawPareto = new DrawPareto();
+ drawPareto.SegmentIntervalNumber = n;
+ drawPareto.ShowPercentOnSecondaryYAxis = false;
+ drawPareto.CreatePareto(chart1, "RawData", "Histogram");
+
+
+ drawPareto.MakeParetoChart(chart1, "Histogram", "Pareto");
+
+ // Set chart types for output data
+ chart1.Series["Pareto"].ChartType = SeriesChartType.Line;
+
+ // set the markers for each point of the Pareto Line
+ chart1.Series["Pareto"].IsValueShownAsLabel = true;
+ chart1.Series["Pareto"].MarkerColor = Color.Red;
+ chart1.Series["Pareto"].MarkerBorderColor = Color.MidnightBlue;
+ chart1.Series["Pareto"].MarkerStyle = MarkerStyle.Circle;
+ chart1.Series["Pareto"].MarkerSize = 6;
+ chart1.Series["Pareto"].LabelFormat = "0.#"; // format with one decimal and leading zero
+
+ // Set Color of line Pareto chart
+ chart1.Series["Pareto"].Color = Color.FromArgb(252, 180, 65);
+
+
+ }
+ ///
+ /// SPC分析正态分布图
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_NormalDistribution(double[] X, int n, Chart chart1)
+ {
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+ //绘图数据
+ ASPNet_Drawing.CSpc_Data_Cpk Spc_Data_Cpk = ASPNet_Drawing.Spc_Data.Cpk(X, n, ValueUp, ValueDown);
+ //坐标轴
+ double ValueUpX = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueDownX = Convert.ToDouble(Min(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueUpY = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionY).ToString("F2"));
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea1"].AxisX.Minimum = Math.Round(ValueDownX - X1, 2);
+ chart1.ChartAreas["ChartArea1"].AxisX.Maximum = Math.Round(ValueUpX + X1, 2);
+ chart1.ChartAreas["ChartArea1"].AxisY.Minimum = 0;
+ chart1.ChartAreas["ChartArea1"].AxisY.Maximum = Math.Round(ValueUpY + ValueUpY / 10, 2);
+ //绘图
+ for (int i = 0; i < Spc_Data_Cpk.NormalDistributionX.Length; i++)
+ {
+ chart1.Series[0].Points.AddXY(Math.Round(Spc_Data_Cpk.NormalDistributionX[i], 2), Math.Round(Spc_Data_Cpk.NormalDistributionY[i], 2));
+ }
+ // Set Strip line item
+ //chart1.ChartAreas["ChartArea1"].AxisX.StripLines[0].IntervalOffset = Spc_Data_Cpk.LSL;
+ //chart1.ChartAreas["ChartArea1"].AxisX.StripLines[0].StripWidth = Spc_Data_Cpk.USL - Spc_Data_Cpk.LSL;
+
+ // Set Strip line item
+ //double SL = (ValueUpX + ValueDownX) / 2;
+ //double USL = SL + 3 * Spc_Data_Cpk.Singma;
+ //double LSL = SL - 3 * Spc_Data_Cpk.Singma;
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[1].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[4];
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[1].Text = "SL=" + Spc_Data_Cpk.NormalDistributionX[4].ToString("F2");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[2].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[1];
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[2].Text = "USL=" + Spc_Data_Cpk.NormalDistributionX[1].ToString("F2");
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[3].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[7];
+ chart1.ChartAreas["ChartArea1"].AxisX.StripLines[3].Text = "LSL=" + Spc_Data_Cpk.NormalDistributionX[7].ToString("F2");
+
+ //TextAnnotation annotation1 = new TextAnnotation();
+ //annotation1.Text = "Cpk=" + Spc_Data_Cpk.Cpk.ToString("F2");
+ //annotation1.ForeColor = Color.Black;
+ //annotation1.Font = new Font("Arial", 11); ;
+ //annotation1.X = 80;
+ //annotation1.Y = 8;
+ //chart1.Annotations.Add(annotation1);
+
+ //TextAnnotation annotation2 = new TextAnnotation();
+ //annotation2.Text = "CPL=" + Spc_Data_Cpk.CPL.ToString("F2");
+ //annotation2.ForeColor = Color.Black;
+ //annotation2.Font = new Font("Arial", 11); ;
+ //annotation2.X = 80;
+ //annotation2.Y = 13;
+ //chart1.Annotations.Add(annotation2);
+
+ //TextAnnotation annotation3 = new TextAnnotation();
+ //annotation3.Text = "CPU=" + Spc_Data_Cpk.CPU.ToString("F2");
+ //annotation3.ForeColor = Color.Black;
+ //annotation3.Font = new Font("Arial", 11); ;
+ //annotation3.X = 80;
+ //annotation3.Y = 18;
+ //chart1.Annotations.Add(annotation3);
+
+
+ }
+
+ ///
+ /// SPC分析工序能力图
+ /// 在均值级差图中
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_Cpk_XR(double[] X, int n, Chart chart1)
+ {
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+ //绘图数据
+ ASPNet_Drawing.CSpc_Data_Cpk Spc_Data_Cpk = ASPNet_Drawing.Spc_Data.Cpk(X, n, ValueUp, ValueDown);
+ //坐标轴
+ double ValueUpX = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueDownX = Convert.ToDouble(Min(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueUpY = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionY).ToString("F2"));
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Minimum = Math.Round(ValueDownX - X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Maximum = Math.Round(ValueUpX + X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Minimum = 0;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Maximum = Math.Round(ValueUpY + ValueUpY / 10, 2);
+ //绘图
+ for (int i = 0; i < Spc_Data_Cpk.NormalDistributionX.Length; i++)
+ {
+ chart1.Series["Series_Cpk"].Points.AddXY(Math.Round(Spc_Data_Cpk.NormalDistributionX[i], 2), Math.Round(Spc_Data_Cpk.NormalDistributionY[i], 2));
+ }
+
+ ASPNet_Drawing.CSpc_Data_XR Spc_Data_XR = ASPNet_Drawing.Spc_Data.XR(X, n);
+
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[4];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].Text = "SL=" + Spc_Data_XR.CL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[1];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].Text = "USL=" + Spc_Data_XR.UCL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[7];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].Text = "LSL=" + Spc_Data_XR.LCL_X.ToString("F2");
+
+ TextAnnotation annotation1 = new TextAnnotation();
+ annotation1.Text = "Cpk=" + Spc_Data_Cpk.Cpk.ToString("F2");
+ annotation1.ForeColor = Color.Black;
+ annotation1.Font = new Font("Arial", 6); ;
+ annotation1.X = 27;
+ annotation1.Y = 3.5;
+ chart1.Annotations.Add(annotation1);
+
+ TextAnnotation annotation2 = new TextAnnotation();
+ annotation2.Text = "CPL=" + Spc_Data_Cpk.CPL.ToString("F2");
+ annotation2.ForeColor = Color.Black;
+ annotation2.Font = new Font("Arial", 6); ;
+ annotation2.X = 27;
+ annotation2.Y = 5;
+ chart1.Annotations.Add(annotation2);
+
+ TextAnnotation annotation3 = new TextAnnotation();
+ annotation3.Text = "CPU=" + Spc_Data_Cpk.CPU.ToString("F2");
+ annotation3.ForeColor = Color.Black;
+ annotation3.Font = new Font("Arial", 6); ;
+ annotation3.X = 27;
+ annotation3.Y = 6.5;
+ chart1.Annotations.Add(annotation3);
+
+
+ }
+
+ ///
+ /// SPC分析工序能力图
+ /// 在均值标准差图中
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_Cpk_XS(double[] X, int n, Chart chart1)
+ {
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+ //绘图数据
+ ASPNet_Drawing.CSpc_Data_Cpk Spc_Data_Cpk = ASPNet_Drawing.Spc_Data.Cpk(X, n, ValueUp, ValueDown);
+ //坐标轴
+ double ValueUpX = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueDownX = Convert.ToDouble(Min(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueUpY = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionY).ToString("F2"));
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Minimum = Math.Round(ValueDownX - X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Maximum = Math.Round(ValueUpX + X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Minimum = 0;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Maximum = Math.Round(ValueUpY + ValueUpY / 10, 2);
+ //绘图
+ for (int i = 0; i < Spc_Data_Cpk.NormalDistributionX.Length; i++)
+ {
+ chart1.Series["Series_Cpk"].Points.AddXY(Math.Round(Spc_Data_Cpk.NormalDistributionX[i], 2), Math.Round(Spc_Data_Cpk.NormalDistributionY[i], 2));
+ }
+
+ ASPNet_Drawing.CSpc_Data_XR Spc_Data_XR = ASPNet_Drawing.Spc_Data.XR(X, n);
+
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[4];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].Text = "SL=" + Spc_Data_XR.CL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[1];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].Text = "USL=" + Spc_Data_XR.UCL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[7];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].Text = "LSL=" + Spc_Data_XR.LCL_X.ToString("F2");
+
+ TextAnnotation annotation1 = new TextAnnotation();
+ annotation1.Text = "Cpk=" + Spc_Data_Cpk.Cpk.ToString("F2");
+ annotation1.ForeColor = Color.Black;
+ annotation1.Font = new Font("Arial", 6); ;
+ annotation1.X = 27;
+ annotation1.Y = 3.5;
+ chart1.Annotations.Add(annotation1);
+
+ TextAnnotation annotation2 = new TextAnnotation();
+ annotation2.Text = "CPL=" + Spc_Data_Cpk.CPL.ToString("F2");
+ annotation2.ForeColor = Color.Black;
+ annotation2.Font = new Font("Arial", 6); ;
+ annotation2.X = 27;
+ annotation2.Y = 5;
+ chart1.Annotations.Add(annotation2);
+
+ TextAnnotation annotation3 = new TextAnnotation();
+ annotation3.Text = "CPU=" + Spc_Data_Cpk.CPU.ToString("F2");
+ annotation3.ForeColor = Color.Black;
+ annotation3.Font = new Font("Arial", 6); ;
+ annotation3.X = 27;
+ annotation3.Y = 6.5;
+ chart1.Annotations.Add(annotation3);
+
+
+ }
+
+
+ ///
+ /// SPC分析工序能力图
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_Cpk(double[] X, int n, Chart chart1)
+ {
+ double ValueUp = Max(X);
+ double ValueDown = Min(X);
+ //绘图数据
+ ASPNet_Drawing.CSpc_Data_Cpk Spc_Data_Cpk = ASPNet_Drawing.Spc_Data.Cpk(X, n, ValueUp, ValueDown);
+ //坐标轴
+ double ValueUpX = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueDownX = Convert.ToDouble(Min(Spc_Data_Cpk.NormalDistributionX).ToString("F2"));
+ double ValueUpY = Convert.ToDouble(Max(Spc_Data_Cpk.NormalDistributionY).ToString("F2"));
+ double X1 = (ValueUpX - ValueDownX) / 10;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Minimum = Math.Round(ValueDownX - X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.Maximum = Math.Round(ValueUpX + X1, 2);
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Minimum = 0;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisY.Maximum = Math.Round(ValueUpY + ValueUpY / 10, 2);
+ //绘图
+ for (int i = 0; i < Spc_Data_Cpk.NormalDistributionX.Length; i++)
+ {
+ chart1.Series["Series_Cpk"].Points.AddXY(Math.Round(Spc_Data_Cpk.NormalDistributionX[i], 2), Math.Round(Spc_Data_Cpk.NormalDistributionY[i], 2));
+ }
+ // Set Strip line item
+ //chart1.ChartAreas["ChartArea1"].AxisX.StripLines[0].IntervalOffset = Spc_Data_Cpk.LSL;
+ //chart1.ChartAreas["ChartArea1"].AxisX.StripLines[0].StripWidth = Spc_Data_Cpk.USL - Spc_Data_Cpk.LSL;
+
+ // Set Strip line item
+ //double SL = (ValueUpX + ValueDownX) / 2;
+ //double USL = SL + 3 * Spc_Data_Cpk.Singma;
+ //double LSL = SL - 3 * Spc_Data_Cpk.Singma;
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[4];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[1].Text = "SL=" + Spc_Data_Cpk.NormalDistributionX[4].ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[1];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[2].Text = "USL=" + Spc_Data_Cpk.NormalDistributionX[1].ToString("F2");
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].IntervalOffset = Spc_Data_Cpk.NormalDistributionX[7];
+ chart1.ChartAreas["ChartArea_Cpk"].AxisX.StripLines[3].Text = "LSL=" + Spc_Data_Cpk.NormalDistributionX[7].ToString("F2");
+
+ TextAnnotation annotation1 = new TextAnnotation();
+ annotation1.Text = "Cpk=" + Spc_Data_Cpk.Cpk.ToString("F2");
+ annotation1.ForeColor = Color.Black;
+ annotation1.Font = new Font("Arial", 11); ;
+ annotation1.X = 80;
+ annotation1.Y = 8;
+ chart1.Annotations.Add(annotation1);
+
+ TextAnnotation annotation2 = new TextAnnotation();
+ annotation2.Text = "CPL=" + Spc_Data_Cpk.CPL.ToString("F2");
+ annotation2.ForeColor = Color.Black;
+ annotation2.Font = new Font("Arial", 11); ;
+ annotation2.X = 80;
+ annotation2.Y = 13;
+ chart1.Annotations.Add(annotation2);
+
+ TextAnnotation annotation3 = new TextAnnotation();
+ annotation3.Text = "CPU=" + Spc_Data_Cpk.CPU.ToString("F2");
+ annotation3.ForeColor = Color.Black;
+ annotation3.Font = new Font("Arial", 11); ;
+ annotation3.X = 80;
+ annotation3.Y = 18;
+ chart1.Annotations.Add(annotation3);
+
+
+ }
+
+ ///
+ /// 机床报警频次分析
+ ///
+ ///
+ ///
+ public static void ChartMachineAlarm(DataTable dt, Chart chart1)
+ {
+ if (dt.Rows.Count == 0)
+ return;
+ string seriesName = dt.Rows[0]["工位号"].ToString();
+ chart1.Series.Add(seriesName);
+ chart1.Series[seriesName].ChartType = SeriesChartType.Column;
+ chart1.Series[seriesName].BorderWidth = 2;
+ chart1.Series[seriesName].ToolTip = "报警文本:#VALX \n报警数量:#VALY";
+ chart1.Series[seriesName].Points.DataBindXY(dt.Rows, "报警文本", dt.Rows, "报警数量");
+ //for (int i = 0; i < 10; i++)
+ //{
+ // chart1.Series[seriesName].Points.AddXY(dt.Rows[i]["报警编号"], dt.Rows[i]["报警数量"]);
+ //}
+ //chart1.DataBind();
+ }
+
+ /////
+ ///// 机床状态频次分析
+ /////
+ /////
+ /////
+ //public static void ChartMachineStatus(DataTable dt, Chart chart1)
+ //{
+
+ // foreach (DataRow row in dt.Rows)
+ // {
+ // // For each Row add a new series
+ // string seriesName = row["工位号"].ToString();
+ // chart1.Series.Add(seriesName);
+ // chart1.Series[seriesName].ChartType = SeriesChartType.StackedBar;
+ // chart1.Series[seriesName].BorderWidth = 2;
+ // chart1.Series[seriesName].ToolTip = "工位号:" + seriesName + "\n 频次:= #VALY";
+
+ // for (int colIndex = 2; colIndex < dt.Columns.Count; colIndex++)
+ // {
+ // // For each column (column 1 and onward) add the value as a point
+ // string columnName = dt.Columns[colIndex].ColumnName;
+ // int YVal = (int)row[columnName];
+ // chart1.Series[seriesName].Points.AddXY(columnName, YVal);
+ // }
+ // }
+
+ //}
+ /////
+ ///// 成海 2012-04-05
+ /////
+ /////
+ /////
+ public static void ChartMachineStatus(DataTable dt, Chart chart1)
+ {
+ string seriesNameA = "机床上电";
+ chart1.Series.Add(seriesNameA);
+ chart1.Series[seriesNameA].ChartType = SeriesChartType.StackedColumn;
+ chart1.Series[seriesNameA].BorderWidth = 2;
+ chart1.Series[seriesNameA].ToolTip = "机床状态:" + seriesNameA + "\n 频次:= #VALY";
+ chart1.Series[seriesNameA].Color = System.Drawing.Color.DeepPink;
+ string seriesNameB = "循环开始";
+ chart1.Series.Add(seriesNameB);
+ chart1.Series[seriesNameB].ChartType = SeriesChartType.StackedColumn;
+ chart1.Series[seriesNameB].BorderWidth = 2;
+ chart1.Series[seriesNameB].ToolTip = "机床状态:" + seriesNameB + "\n 频次:= #VALY";
+ chart1.Series[seriesNameB].Color = System.Drawing.Color.Green;
+ string seriesNameC = "机床故障";
+ chart1.Series.Add(seriesNameC);
+ chart1.Series[seriesNameC].ChartType = SeriesChartType.StackedColumn;
+ chart1.Series[seriesNameC].BorderWidth = 2;
+ chart1.Series[seriesNameC].ToolTip = "机床状态:" + seriesNameC + "\n 频次:= #VALY";
+ chart1.Series[seriesNameC].Color = System.Drawing.Color.Red;
+ string seriesNameD = "上料无件";
+ chart1.Series.Add(seriesNameD);
+ chart1.Series[seriesNameD].ChartType = SeriesChartType.StackedColumn;
+ chart1.Series[seriesNameD].BorderWidth = 2;
+ chart1.Series[seriesNameD].ToolTip = "机床状态:" + seriesNameD + "\n 频次:= #VALY";
+ chart1.Series[seriesNameD].Color = System.Drawing.Color.Blue;
+ string seriesNameE = "下料堵塞";
+ chart1.Series.Add(seriesNameE);
+ chart1.Series[seriesNameE].ChartType = SeriesChartType.StackedColumn;
+ chart1.Series[seriesNameE].BorderWidth = 2;
+ chart1.Series[seriesNameE].ToolTip = "机床状态:" + seriesNameE + "\n 频次:= #VALY";
+ chart1.Series[seriesNameE].Color = System.Drawing.Color.Yellow;
+ foreach (DataRow row in dt.Rows)
+ {
+ string opName = row["工位号"].ToString();
+ int YValA = (int)row["机床上电"];
+ chart1.Series[seriesNameA].Points.AddXY(opName, YValA);
+ int YValB = (int)row["循环开始"];
+ chart1.Series[seriesNameB].Points.AddXY(opName, YValB);
+ int YValC = (int)row["机床故障"];
+ chart1.Series[seriesNameC].Points.AddXY(opName, YValC);
+ int YValD = (int)row["上料无件"];
+ chart1.Series[seriesNameD].Points.AddXY(opName, YValD);
+ int YValE = (int)row["下料堵塞"];
+ chart1.Series[seriesNameE].Points.AddXY(opName, YValE);
+
+ }
+
+
+ }
+ ///
+ /// SPC分析基本趋势图
+ ///
+ ///
+ ///
+ public static void ChartQualityData_TrendPictureBasic(DataTable dt, Chart chart1)
+ {
+ //string seriesName = "series1";
+ //chart1.Series.Add(seriesName);
+ //chart1.Series[seriesName].MarkerStyle = MarkerStyle.Circle;
+ //chart1.Series[seriesName].MarkerSize = 5;
+ //chart1.Series[seriesName].MasrkerColor = Color.Magenta;
+
+ //chart1.Series[seriesName].ChartType = SeriesChartType.Line;
+ //chart1.Series[seriesName].BorderWidth = 1;
+ chart1.Series[0].Points.DataBind(dt.DefaultView, "", "测量值", "Tooltip=ToolTip");
+ //chart1.DataBinds();
+
+ }
+ ///
+ /// 子组平均值的平均值
+ /// n 子组大小。单个子组观测值的个数
+ ///
+ /// 全部测量数据数组
+ /// 子组大小。单个子组观测值的个数
+ /// 子组平均值的数组
+ ///
+ static private double Average(double[] X, int n)
+ {
+ //k 子组个数
+ int k;
+ k = X.Length / n;
+ double[] Xi = new double[n];
+ double[] Xk = new double[k];
+ for (int j = 0; j < k; j++)
+ {
+ for (int i = 0; i < n; i++)
+ {
+ Xi[i] = X[j * n + i];
+ }
+ //子组平均值
+ Xk[j] = Average(Xi);
+ }
+ //子组平均值的平均值
+ return Average(Xk);
+ }
+ ///
+ /// 一组观测值的均值
+ ///
+ /// 子组观测值
+ ///
+ static private double Average(double[] Xn)
+ {
+ if (Xn.Length < 1) return 0;
+ return Sum(Xn) / (double)Xn.Length;
+ }
+ ///
+ /// 观测值和
+ ///
+ /// 子组观测值
+ ///
+ static private double Sum(double[] Xn)
+ {
+ double temp;
+ temp = 0;
+ for (int i = 0; i < Xn.Length; i++)
+ {
+ temp = temp + Xn[i];
+ }
+ return temp;
+ }
+ ///
+ /// 观测值最大值
+ ///
+ /// 子组观测值
+ ///
+ static private double Max(double[] Xn)
+ {
+ double temp;
+ temp = Xn[0];
+ for (int i = 0; i < Xn.Length; i++)
+ {
+ temp = (Xn[i] > temp) ? Xn[i] : temp;
+ }
+ return temp;
+ }
+ ///
+ /// 观测值最小值
+ ///
+ /// 子组观测值
+ ///
+ static private double Min(double[] Xn)
+ {
+ double temp;
+ temp = Xn[0];
+ for (int i = 0; i < Xn.Length; i++)
+ {
+ temp = (Xn[i] < temp) ? Xn[i] : temp;
+ }
+ return temp;
+ }
+
+
+ ///
+ /// 均值极差图
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_XR(double[] X, int n, Chart chart1)
+ {
+ //计算XR控制图的数据
+ ASPNet_Drawing.CSpc_Data_XR Spc_Data_XR = ASPNet_Drawing.Spc_Data.XR(X, n);
+ for (int i = 0; i < Spc_Data_XR.CL_Xk.Length; i++)
+ {
+ //X
+ chart1.Series["Series_X"].Points.AddXY(i + 1, Spc_Data_XR.CL_Xk[i]);
+ //R
+ chart1.Series["Series_R"].Points.AddXY(i + 1, Spc_Data_XR.CL_Rk[i]);
+ }
+ chart1.Series["Series_X"].ToolTip = "测量值:= #VALY";
+ chart1.Series["Series_R"].ToolTip = "测量值:= #VALY";
+
+ ////均值图Y轴范围
+ double gapAxis_X = Spc_Data_XR.UCL_X - Spc_Data_XR.LCL_X;
+ //均值的最大值
+ double maxXk = Max(Spc_Data_XR.CL_Xk);
+ //均值的最小值
+ double minXk = Min(Spc_Data_XR.CL_Xk);
+ if (maxXk > Spc_Data_XR.UCL_X)
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Maximum = Convert.ToDouble((maxXk + gapAxis_X / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Maximum = Convert.ToDouble((Spc_Data_XR.UCL_X + gapAxis_X / 8).ToString("F2"));
+ }
+ if (minXk < Spc_Data_XR.LCL_X)
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Minimum = Convert.ToDouble((minXk - gapAxis_X / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Minimum = Convert.ToDouble((Spc_Data_XR.LCL_X - gapAxis_X / 8).ToString("F2"));
+ }
+
+ ////极差图Y轴范围
+ double gapAxis_R = Spc_Data_XR.UCL_R - Spc_Data_XR.LCL_R;
+ //极差最大值
+ double maxRk = Max(Spc_Data_XR.CL_Rk);
+ //极差最小值
+ double minRk = Min(Spc_Data_XR.CL_Rk);
+ if (maxRk > Spc_Data_XR.UCL_R)
+ {
+ chart1.ChartAreas["ChartArea_R"].AxisY.Maximum = Convert.ToDouble((maxRk + gapAxis_R / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_R"].AxisY.Maximum = Convert.ToDouble((Spc_Data_XR.UCL_R + gapAxis_R / 8).ToString("F2"));
+ }
+ if (minRk < Spc_Data_XR.LCL_R)
+ {
+ chart1.ChartAreas["ChartArea_R"].AxisY.Minimum = Convert.ToDouble((minRk - gapAxis_R / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_R"].AxisY.Minimum = Convert.ToDouble((Spc_Data_XR.LCL_R - gapAxis_R / 8).ToString("F2"));
+ }
+
+
+ // Set axis title
+ chart1.ChartAreas["ChartArea_X"].AxisY.Title = "均值图";
+ chart1.ChartAreas["ChartArea_R"].AxisY.Title = "极差图";
+ chart1.ChartAreas["ChartArea_X"].AxisY.TitleFont = new Font("Microsoft Sans Serif", 8);
+ chart1.ChartAreas["ChartArea_R"].AxisY.TitleFont = new Font("Microsoft Sans Serif", 8);
+
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[0].IntervalOffset = Spc_Data_XR.LCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[0].StripWidth = Spc_Data_XR.UCL_X - Spc_Data_XR.LCL_X;
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[1].IntervalOffset = Spc_Data_XR.CL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[1].Text = "CL=" + Spc_Data_XR.CL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[2].IntervalOffset = Spc_Data_XR.UCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[2].Text = "UCL=" + Spc_Data_XR.UCL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[3].IntervalOffset = Spc_Data_XR.LCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[3].Text = "LCL=" + Spc_Data_XR.LCL_X.ToString("F2");
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[0].IntervalOffset = Spc_Data_XR.LCL_R;
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[0].StripWidth = Spc_Data_XR.UCL_R - Spc_Data_XR.LCL_R;
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[1].IntervalOffset = Spc_Data_XR.CL_R;
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[1].Text = "CL=" + Spc_Data_XR.CL_R.ToString("F2");
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[2].IntervalOffset = Spc_Data_XR.UCL_R;
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[2].Text = "UCL=" + Spc_Data_XR.UCL_R.ToString("F2");
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[3].IntervalOffset = Spc_Data_XR.LCL_R;
+ chart1.ChartAreas["ChartArea_R"].AxisY.StripLines[3].Text = "LCL=" + Spc_Data_XR.LCL_R.ToString("F2");
+
+ }
+
+ ///
+ /// 均值标准差图
+ ///
+ ///
+ ///
+ ///
+ public static void ChartQualityData_XS(double[] X, int n, Chart chart1)
+ {
+ //计算XS控制图的数据
+ ASPNet_Drawing.CSpc_Data_XS Spc_Data_XS = ASPNet_Drawing.Spc_Data.XS(X, n);
+ for (int i = 0; i < Spc_Data_XS.CL_Xk.Length; i++)
+ {
+ //X
+ chart1.Series["Series_X"].Points.AddXY(i + 1, Spc_Data_XS.CL_Xk[i]);
+ //S
+ chart1.Series["Series_S"].Points.AddXY(i + 1, Spc_Data_XS.CL_Sk[i]);
+ }
+ chart1.Series["Series_X"].ToolTip = "测量值:= #VALY";
+ chart1.Series["Series_S"].ToolTip = "测量值:= #VALY";
+
+ ////均值图Y轴范围
+ double gapAxis_X = Spc_Data_XS.UCL_X - Spc_Data_XS.LCL_X;
+ //均值的最大值
+ double maxXk = Max(Spc_Data_XS.CL_Xk);
+ //均值的最小值
+ double minXk = Min(Spc_Data_XS.CL_Xk);
+ if (maxXk > Spc_Data_XS.UCL_X)
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Maximum = Convert.ToDouble((maxXk + gapAxis_X / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Maximum = Convert.ToDouble((Spc_Data_XS.UCL_X + gapAxis_X / 8).ToString("F2"));
+ }
+ if (minXk < Spc_Data_XS.LCL_X)
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Minimum = Convert.ToDouble((minXk - gapAxis_X / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_X"].AxisY.Minimum = Convert.ToDouble((Spc_Data_XS.LCL_X - gapAxis_X / 8).ToString("F2"));
+ }
+
+ ////标准差图Y轴范围
+ double gapAxis_R = Spc_Data_XS.UCL_S - Spc_Data_XS.LCL_S;
+ //标准差最大值
+ double maxRk = Max(Spc_Data_XS.CL_Sk);
+ //标准差最小值
+ double minRk = Min(Spc_Data_XS.CL_Sk);
+ if (maxRk > Spc_Data_XS.UCL_S)
+ {
+ chart1.ChartAreas["ChartArea_S"].AxisY.Maximum = Convert.ToDouble((maxRk + gapAxis_R / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_S"].AxisY.Maximum = Convert.ToDouble((Spc_Data_XS.UCL_S + gapAxis_R / 8).ToString("F2"));
+ }
+ if (minRk < Spc_Data_XS.LCL_S)
+ {
+ chart1.ChartAreas["ChartArea_S"].AxisY.Minimum = Convert.ToDouble((minRk - gapAxis_R / 8).ToString("F2"));
+ }
+ else
+ {
+ chart1.ChartAreas["ChartArea_S"].AxisY.Minimum = Convert.ToDouble((Spc_Data_XS.LCL_S - gapAxis_R / 8).ToString("F2"));
+ }
+
+
+ // Set axis title
+ chart1.ChartAreas["ChartArea_X"].AxisY.Title = "均值图";
+ chart1.ChartAreas["ChartArea_S"].AxisY.Title = "标准差图";
+ chart1.ChartAreas["ChartArea_X"].AxisY.TitleFont = new Font("Microsoft Sans Serif", 8);
+ chart1.ChartAreas["ChartArea_S"].AxisY.TitleFont = new Font("Microsoft Sans Serif", 8);
+
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[0].IntervalOffset = Spc_Data_XS.LCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[0].StripWidth = Spc_Data_XS.UCL_X - Spc_Data_XS.LCL_X;
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[1].IntervalOffset = Spc_Data_XS.CL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[1].Text = "CL=" + Spc_Data_XS.CL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[2].IntervalOffset = Spc_Data_XS.UCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[2].Text = "UCL=" + Spc_Data_XS.UCL_X.ToString("F2");
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[3].IntervalOffset = Spc_Data_XS.LCL_X;
+ chart1.ChartAreas["ChartArea_X"].AxisY.StripLines[3].Text = "LCL=" + Spc_Data_XS.LCL_X.ToString("F2");
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[0].IntervalOffset = Spc_Data_XS.LCL_S;
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[0].StripWidth = Spc_Data_XS.UCL_S - Spc_Data_XS.LCL_S;
+
+ // Set Strip line item
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[1].IntervalOffset = Spc_Data_XS.CL_S;
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[1].Text = "CL=" + Spc_Data_XS.CL_S.ToString("F2");
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[2].IntervalOffset = Spc_Data_XS.UCL_S;
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[2].Text = "UCL=" + Spc_Data_XS.UCL_S.ToString("F2");
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[3].IntervalOffset = Spc_Data_XS.LCL_S;
+ chart1.ChartAreas["ChartArea_S"].AxisY.StripLines[3].Text = "LCL=" + Spc_Data_XS.LCL_S.ToString("F2");
+ }
+
+ /////
+ ///// 故障率 lvzhen
+ /////
+ /////
+ /////
+ //public static void ChartFaultPercent(DataTable dt, Chart chart1)
+ //{
+ // if (dt.Rows.Count == 0)
+ // return;
+ // foreach (DataRow row in dt.Rows)
+ // {
+ // string seriesName = row["工位号"].ToString();
+ // chart1.Series.Add(seriesName);
+ // chart1.Series[seriesName].ChartType = SeriesChartType.Column;
+ // chart1.Series[seriesName].BorderWidth = 2;
+ // chart1.Series[seriesName].ToolTip = "工位号:" + row["工位号"].ToString() + "\n运行时间: " + row["运行时间"].ToString() + "\n故障时间: " + row["故障时间"].ToString() + "\n故障率:#VALY";
+ // for (int colIndex = 3; colIndex < dt.Columns.Count; colIndex++)
+ // {
+ // // For each column (column 1 and onward) add the value as a point
+ // string columnName = dt.Columns[colIndex].ColumnName;
+ // string YVal = row[columnName].ToString();
+ // chart1.Series[seriesName].Points.AddXY(columnName, YVal);
+ // }
+ // //for (int i = 0; i < 10; i++)
+ // //{
+ // // chart1.Series[seriesName].Points.AddXY(dt.Rows[i]["报警编号"], dt.Rows[i]["报警数量"]);
+ // //}
+ // //chart1.DataBind();
+ // }
+ //}
+
+ /////
+ ///// 故障率 lvzhen
+ /////
+ /////
+ /////
+ //public static void ChartFaultPercentTrue(DataTable dt, Chart chart1)
+ //{
+ // if (dt.Rows.Count == 0)
+ // return;
+ // foreach (DataRow row in dt.Rows)
+ // {
+ // string seriesName = row["工位号"].ToString();
+ // chart1.Series.Add(seriesName);
+ // chart1.Series[seriesName].ChartType = SeriesChartType.Column;
+ // chart1.Series[seriesName].BorderWidth = 2;
+ // chart1.Series[seriesName].ToolTip = "工位号:" + row["工位号"].ToString() + " \n故障率:#VALY";
+ // for (int colIndex = 3; colIndex < dt.Columns.Count; colIndex++)
+ // {
+ // // For each column (column 1 and onward) add the value as a point
+ // string columnName = dt.Columns[colIndex].ColumnName;
+ // string YVal = row[columnName].ToString();
+ // chart1.Series[seriesName].Points.AddXY(columnName, YVal);
+ // }
+ // //for (int i = 0; i < 10; i++)
+ // //{
+ // // chart1.Series[seriesName].Points.AddXY(dt.Rows[i]["报警编号"], dt.Rows[i]["报警数量"]);
+ // //}
+ // //chart1.DataBind();
+ // }
+ //}
+ /////
+ ///// 开机率 lvzhen
+ /////
+ /////
+ /////
+ //public static void ChartKaijiProportion(DataTable dt, Chart chart1)
+ //{
+ // chart1.Series[0].Points.DataBind(dt.DefaultView, "操作日期", "开机率", "Tooltip=ToolTip");
+ //}
+
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/drawchart/DrawChartAddition.cs b/MES_Manage/App_code/drawchart/DrawChartAddition.cs
new file mode 100644
index 0000000..82853e0
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/DrawChartAddition.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data;
+using System.Web.UI.DataVisualization.Charting;
+using System.Data.SqlClient;
+
+
+///
+///DrawChart 的摘要说明
+///
+public partial class DrawChart
+{
+
+ ///
+ /// 故障率 lvzhen
+ ///
+ ///
+ ///
+ public static void ChartFaultPercent(DataTable dt, Chart chart1)
+ {
+ if (dt.Rows.Count == 0)
+ return;
+ foreach (DataRow row in dt.Rows)
+ {
+ string seriesName = row["工位号"].ToString();
+ chart1.Series.Add(seriesName);
+ chart1.Series[seriesName].ChartType = SeriesChartType.Column;
+ chart1.Series[seriesName].BorderWidth = 2;
+ chart1.Series[seriesName].ToolTip = "工位号:" + row["工位号"].ToString() + "\n运行时间: " + row["运行时间"].ToString() + "\n故障时间: " + row["故障时间"].ToString() + "\n故障率:#VALY";
+ for (int colIndex = 3; colIndex < dt.Columns.Count; colIndex++)
+ {
+ // For each column (column 1 and onward) add the value as a point
+ string columnName = dt.Columns[colIndex].ColumnName;
+ string YVal = row[columnName].ToString();
+ chart1.Series[seriesName].Points.AddXY(columnName, YVal);
+ }
+ //for (int i = 0; i < 10; i++)
+ //{
+ // chart1.Series[seriesName].Points.AddXY(dt.Rows[i]["报警编号"], dt.Rows[i]["报警数量"]);
+ //}
+ //chart1.DataBind();
+ }
+ }
+
+ ///
+ /// 故障率 lvzhen
+ ///
+ ///
+ ///
+ public static void ChartFaultPercentTrue(DataTable dt, Chart chart1)
+ {
+ if (dt.Rows.Count == 0)
+ return;
+ foreach (DataRow row in dt.Rows)
+ {
+ string seriesName = row["工位号"].ToString();
+ chart1.Series.Add(seriesName);
+ chart1.Series[seriesName].ChartType = SeriesChartType.Column;
+ chart1.Series[seriesName].BorderWidth = 2;
+ chart1.Series[seriesName].ToolTip = "工位号:" + row["工位号"].ToString()+" \n故障率:#VALY";
+ for (int colIndex = 3; colIndex < dt.Columns.Count; colIndex++)
+ {
+ // For each column (column 1 and onward) add the value as a point
+ string columnName = dt.Columns[colIndex].ColumnName;
+ string YVal = row[columnName].ToString();
+ chart1.Series[seriesName].Points.AddXY(columnName, YVal);
+ }
+ //for (int i = 0; i < 10; i++)
+ //{
+ // chart1.Series[seriesName].Points.AddXY(dt.Rows[i]["报警编号"], dt.Rows[i]["报警数量"]);
+ //}
+ //chart1.DataBind();
+ }
+ }
+ ///
+ /// 开机率 lvzhen
+ ///
+ ///
+ ///
+ public static void ChartKaijiProportion(DataTable dt, Chart chart1)
+ {
+ chart1.Series[0].Points.DataBind(dt.DefaultView, "操作日期", "开机率", "Tooltip=ToolTip");
+ }
+
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/drawchart/DrawPareto.cs b/MES_Manage/App_code/drawchart/DrawPareto.cs
new file mode 100644
index 0000000..66e35aa
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/DrawPareto.cs
@@ -0,0 +1,300 @@
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Web.UI.DataVisualization.Charting;
+using System.Collections;
+
+///
+///DrawPareto 的摘要说明
+///
+public class DrawPareto
+{
+ public DrawPareto()
+ {
+ //
+ //TODO: 在此处添加构造函数逻辑
+ //
+ }
+
+
+ ///
+ /// Number of class intervals the data range is devided in.
+ /// This property only has affect when "SegmentIntervalWidth" is
+ /// set to double.NaN.
+ ///
+ public int SegmentIntervalNumber = 20;
+
+ ///
+ /// Histogram class interval width. Setting this value to "double.NaN"
+ /// will result in automatic width calculation based on the data range
+ /// and number of required interval specified in "SegmentIntervalNumber".
+ ///
+ public double SegmentIntervalWidth = double.NaN;
+
+ ///
+ /// Indicates that percent frequency should be shown on the right axis
+ ///
+ public bool ShowPercentOnSecondaryYAxis = true;
+
+
+ public void CreatePareto(
+ Chart chartControl,
+ string dataSeriesName,
+ string histogramSeriesName)
+ {
+ // Validate input
+ if (chartControl == null)
+ {
+ throw (new ArgumentNullException("chartControl"));
+ }
+ if (chartControl.Series.IndexOf(dataSeriesName) < 0)
+ {
+ throw (new ArgumentException("Series with name'" + dataSeriesName + "' was not found.", "dataSeriesName"));
+ }
+
+ // Make data series invisible
+ chartControl.Series[dataSeriesName].Enabled = false;
+
+ // Check if histogram series exsists
+ Series histogramSeries = null;
+ if (chartControl.Series.IndexOf(histogramSeriesName) < 0)
+ {
+ // Add new series
+ histogramSeries = chartControl.Series.Add(histogramSeriesName);
+
+ // Set new series chart type and other attributes
+ histogramSeries.ChartType = SeriesChartType.Column;
+ histogramSeries.BorderColor = Color.Black;
+ histogramSeries.BorderWidth = 1;
+ histogramSeries.BorderDashStyle = ChartDashStyle.Solid;
+ }
+ else
+ {
+ histogramSeries = chartControl.Series[histogramSeriesName];
+ histogramSeries.Points.Clear();
+ }
+
+ // Get data series minimum and maximum values
+ double minValue = double.MaxValue;
+ double maxValue = double.MinValue;
+ int pointCount = 0;
+ foreach (DataPoint dataPoint in chartControl.Series[dataSeriesName].Points)
+ {
+ // Process only non-empty data points
+ if (!dataPoint.IsEmpty)
+ {
+ if (dataPoint.YValues[0] > maxValue)
+ {
+ maxValue = dataPoint.YValues[0];
+ }
+ if (dataPoint.YValues[0] < minValue)
+ {
+ minValue = dataPoint.YValues[0];
+ }
+ ++pointCount;
+ }
+ }
+
+ // Calculate interval width if it's not set
+ if (double.IsNaN(this.SegmentIntervalWidth))
+ {
+ this.SegmentIntervalWidth = (maxValue - minValue) / SegmentIntervalNumber;
+ this.SegmentIntervalWidth = RoundInterval(this.SegmentIntervalWidth);
+ }
+
+ // Round minimum and maximum values
+ minValue = Math.Floor(minValue / this.SegmentIntervalWidth) * this.SegmentIntervalWidth;
+ maxValue = Math.Ceiling(maxValue / this.SegmentIntervalWidth) * this.SegmentIntervalWidth;
+
+ // Create histogram series points
+ double currentPosition = minValue;
+ for (currentPosition = minValue; currentPosition <= maxValue; currentPosition += this.SegmentIntervalWidth)
+ {
+ // Count all points from data series that are in current interval
+ int count = 0;
+ foreach (DataPoint dataPoint in chartControl.Series[dataSeriesName].Points)
+ {
+ if (!dataPoint.IsEmpty)
+ {
+ double endPosition = currentPosition + this.SegmentIntervalWidth;
+ if (dataPoint.YValues[0] >= currentPosition &&
+ dataPoint.YValues[0] < endPosition)
+ {
+ ++count;
+ }
+
+ // Last segment includes point values on both segment boundaries
+ else if (endPosition >= maxValue)
+ {
+ if (dataPoint.YValues[0] >= currentPosition &&
+ dataPoint.YValues[0] <= endPosition)
+ {
+ ++count;
+ }
+ }
+ }
+ }
+
+
+ // Add data point into the histogram series
+ //histogramSeries.Points.AddXY("", count);
+ histogramSeries.Points.AddY( count);
+
+ }
+
+ histogramSeries.Sort(PointSortOrder.Descending);
+
+ // Adjust series attributes
+ histogramSeries["PointWidth"] = "1";
+
+ // Adjust chart area
+ ChartArea chartArea = chartControl.ChartAreas[histogramSeries.ChartArea];
+ chartArea.AxisY.Title = "频数";
+ //chartArea.AxisX.Minimum = minValue;
+ //chartArea.AxisX.Maximum = maxValue;
+
+ // Set axis interval based on the histogram class interval
+ // and do not allow more than 10 labels on the axis.
+ double axisInterval = this.SegmentIntervalWidth;
+ while ((maxValue - minValue) / axisInterval > 10.0)
+ {
+ axisInterval *= 2.0;
+ }
+ chartArea.AxisX.Interval = axisInterval;
+
+ // Set chart area secondary Y axis
+ chartArea.AxisY2.Enabled = AxisEnabled.Auto;
+ if (this.ShowPercentOnSecondaryYAxis)
+ {
+ chartArea.RecalculateAxesScale();
+
+ chartArea.AxisY2.Enabled = AxisEnabled.True;
+ chartArea.AxisY2.LabelStyle.Format = "P0";
+ chartArea.AxisY2.MajorGrid.Enabled = false;
+ chartArea.AxisY2.Title = "Percent of Total";
+
+ chartArea.AxisY2.Minimum = 0;
+ chartArea.AxisY2.Maximum = chartArea.AxisY.Maximum / (pointCount / 100.0);
+ double minStep = (chartArea.AxisY2.Maximum > 20.0) ? 5.0 : 1.0;
+ chartArea.AxisY2.Interval = Math.Ceiling((chartArea.AxisY2.Maximum / 5.0 / minStep)) * minStep;
+
+ }
+ }
+
+ ///
+ /// Helper method which rounds specified axsi interval.
+ ///
+ /// Calculated axis interval.
+ /// Rounded axis interval.
+ public double RoundInterval(double interval)
+ {
+ // If the interval is zero return error
+ if (interval == 0.0)
+ {
+ throw (new ArgumentOutOfRangeException("interval", "Interval can not be zero."));
+ }
+
+ // If the real interval is > 1.0
+ double step = -1;
+ double tempValue = interval;
+ while (tempValue > 1.0)
+ {
+ step++;
+ tempValue = tempValue / 10.0;
+ if (step > 1000)
+ {
+ throw (new InvalidOperationException("Auto interval error due to invalid point values or axis minimum/maximum."));
+ }
+ }
+
+ // If the real interval is < 1.0
+ tempValue = interval;
+ if (tempValue < 1.0)
+ {
+ step = 0;
+ }
+
+ while (tempValue < 1.0)
+ {
+ step--;
+ tempValue = tempValue * 10.0;
+ if (step < -1000)
+ {
+ throw (new InvalidOperationException("Auto interval error due to invalid point values or axis minimum/maximum."));
+ }
+ }
+
+ double tempDiff = interval / Math.Pow(10.0, step);
+ if (tempDiff < 3.0)
+ {
+ tempDiff = 2.0;
+ }
+ else if (tempDiff < 7.0)
+ {
+ tempDiff = 5.0;
+ }
+ else
+ {
+ tempDiff = 10.0;
+ }
+
+ // Make a correction of the real interval
+ return tempDiff * Math.Pow(10.0, step);
+ }
+
+ public void MakeParetoChart(Chart chart, string srcSeriesName, string destSeriesName)
+ {
+
+ // get name of the ChartAre of the source series
+ string strChartArea = chart.Series[srcSeriesName].ChartArea;
+
+ // ensure the source series is a column chart type
+ chart.Series[srcSeriesName].ChartType = SeriesChartType.Column;
+
+ // sort the data in the series to be by values in descending order
+ chart.DataManipulator.Sort(PointSortOrder.Descending, srcSeriesName);
+
+ // find the total of all points in the source series
+ double total = 0.0;
+ foreach (DataPoint pt in chart.Series[srcSeriesName].Points)
+ total += pt.YValues[0];
+
+ // set the max value on the primary axis to total
+ chart.ChartAreas[strChartArea].AxisY.Maximum = total;
+
+ // create the destination series and add it to the chart
+ Series destSeries = new Series(destSeriesName);
+ chart.Series.Add(destSeries);
+
+ // ensure the destination series is a Line or Spline chart type
+ destSeries.ChartType = SeriesChartType.Line;
+
+ destSeries.BorderWidth = 3;
+
+ // assign the series to the same chart area as the column chart
+ destSeries.ChartArea = chart.Series[srcSeriesName].ChartArea;
+
+ // assign this series to use the secondary axis and set it maximum to be 100%
+ destSeries.YAxisType = AxisType.Secondary;
+ chart.ChartAreas[strChartArea].AxisY2.Maximum = 100;
+
+ // locale specific percentage format with no decimals
+ chart.ChartAreas[strChartArea].AxisY2.LabelStyle.Format = "0.#";
+
+ // turn off the end point values of the primary X axis
+ chart.ChartAreas[strChartArea].AxisX.LabelStyle.IsEndLabelVisible = false;
+
+ // for each point in the source series find % of total and assign to series
+ double percentage = 0.0;
+
+ foreach (DataPoint pt in chart.Series[srcSeriesName].Points)
+ {
+ percentage += (pt.YValues[0] / total * 100.0);
+ //Chart1.Series["Default"].Points.AddXY(pt.XValue,Math.Round(percentage, 2));
+ destSeries.Points.Add(Math.Round(percentage, 2));
+ }
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/MES_Manage/App_code/drawchart/SpcCaculator.cs b/MES_Manage/App_code/drawchart/SpcCaculator.cs
new file mode 100644
index 0000000..5f3f323
--- /dev/null
+++ b/MES_Manage/App_code/drawchart/SpcCaculator.cs
@@ -0,0 +1,512 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Collections;
+using System.Data;
+using ASPNet_Drawing;
+///
+///SpcCaculator 的摘要说明
+///
+public class SpcCaculator
+{
+ ///
+ /// SPC系数表
+ ///(0)样本大小 (1)A (2)A2 (3)A3 (4)C4 (5)1/C4 (6)B3 (7)B4 (8)B5 (9)B6 (10)d2 (11)1/d2 (12)d3 (13)D1 (14)D2 (15)D3 (16)D4 (17)M3 (18)M3A2
+ ///
+ static public double[,] SPC_coefficient = { {2,2.121,1.880,2.659,0.798,1.253,0,3.267,0,2.606,1.128,0.887,0.853,0,3.686,0,3.267,1.000,1.880},
+{3,1.732,1.023,1.954,0.886,1.128,0,2.568,0,2.276,1.693,0.591,0.888,0,4.358,0,2.574,1.160,1.187},
+{4,1.500,0.729,1.628,0.921,1.085,0,2.266,0,2.088,2.059,0.486,0.880,0,4.698,0,2.282,1.092,0.796},
+{5,1.342,0.572,1.427,0.940,1.064,0,2.089,0,1.964,2.326,0.430,0.864,0,4.918,0,2.114,1.198,0.691},
+{6,1.225,0.483,1.287,0.952,1.051,0.030,1.970,0.029,1.874,2.534,0.395,0.848,0,5.078,0,2.004,1.135,0.549},
+{7,1.134,0.419,1.182,0.959,1.042,0.118,1.882,0.113,1.806,2.704,0.370,0.833,0.204,5.204,0.076,1.924,1.214,0.509},
+{8,1.061,0.373,1.099,0.965,1.036,0.185,1.815,0.179,1.751,2.847,0.351,0.820,0.388,5.306,0.136,1.864,1.160,0.432},
+{9,1.00,0.377,1.032,0.969,1.032,0.29,1.761,0.232,1.707,2.970,0.337,0.808,0.547,5.393,0.184,1.816,1.223,0.412},
+{10,0.949,0.308,0.975,0.973,1.028,0.284,1.716,0.276,1.669,3.078,0.325,0.797,0.687,5.469,0.223,1.777,1.176,0.363},
+{11,0.905,0.285,0.927,0.975,1.025,0.321,1.679,0.313,1.637,3.173,0.315,0.787,0.811,5.535,0.256,1.744,0,0},
+{12,0.886,0.266,0.886,0.978,1.023,0.354,1.646,0.346,1.610,3.258,0.307,0.778,0.922,5.594,0.283,1.717,0,0},
+{13,0.832,0.249,0.850,0.979,1.021,0.382,1.618,0.374,1.585,3.336,0.300,0.770,1.025,5.647,0.307,1.693,0,0},
+{14,0.802,0.235,0.817,0.981,1.019,0.406,1.594,0.399,1.563,3.407,0.294,0.763,1.118,5.696,0.328,1.672,0,0},
+{15,0.775,0.223,0.789,0.982,1.018,0.428,1.157,0.421,1.544,3.472,0.288,0.756,1.203,5.741,0.347,1.653,0,0},
+{16,0.750,0.212,0.763,0.984,1.017,0.448,1.552,0.440,1.526,3.532,0.283,0.750,1.282,5.782,0.363,1.637,0,0},
+{17,0.728,0.203,0.739,0.985,1.016,0.466,1.534,0.458,1.511,3.588,0.279,0.744,1.356,5.820,0.378,1.622,0,0},
+{18,0.707,0.194,0.718,0.985,1.015,0.482,1.518,0.475,1.496,3.640,0.275,0.739,1.424,5.856,0.391,1.608,0,0},
+{19,0.688,0.187,0.698,0.986,1.014,0.497,1.503,0.490,1.483,3.689,0.271,0.734,1.487,5.891,0.403,1.597,0,0},
+{20,0.671,0.180,0.680,0.987,1.013,0.510,1.490,0.504,1.470,3.735,0.268,0.729,1.549,5.921,0.415,1.585,0,0},
+{21,0.655,0.173,0.663,0.988,1.013,0.253,1.477,0.516,1.459,3.778,0.265,0.724,1.605,5.951,0.425,1.575,0,0},
+{22,0.640,0.167,0.647,0.988,1.012,0.534,1.466,0.528,1.448,3.819,0.262,0.720,1.659,5.979,0.434,1.566,0,0},
+{23,0.626,0.126,0.633,0.989,1.011,0.545,1.455,0.539,1.438,3.858,0.259,0.716,1.710,6.006,0.443,1.557,0,0},
+{24,0.612,0.157,0.619,0989,1.011,0.555,1.445,0.549,1.429,3.895,0.257,0.712,1.759,6.031,0.451,1.548,0,0},
+{25,0.600,0.153,0.606,0.990,1.011,0.565,1.435,0.559,1.420,3.931,0.254,0.708,1.806,6.056,0.459,1.541,0,0} };
+
+ static double QU_k = 0.99865;
+ static double QL_k = 0.00135;
+
+ ///
+ /// 计算SPC主要参数:
+ /// 输入:"X"被分析数据组;Usl理论上限;Lsl理论下限。
+ /// 输出:x平均值;"s"均方差;"QU"百分比上限;"QL"百分比下限;"cp"工序能力;"cpk"工序能力指数
+ ///
+ /// 被分析数据组
+ /// 理论上限
+ /// 理论下限
+ /// 平均值
+ /// 均方差
+ /// 百分比上限
+ /// 百分比下限
+ /// 工序能力
+ /// 工序能力指数
+ public static void SpcValue(double[] X, ref double Usl, ref double Lsl, out double x, out double s,
+ out double QU, out double QL, out double cp, out double cpk, out double[] sx, out double[] sy)
+ {
+ x = AVERAGE(X);
+ s = STDEV(X);
+ if (Usl == Lsl)
+ {
+ Usl = x + 4.0 * s;
+ Lsl = x - 4.0 * s;
+ }
+ QU_QL(X, out QU, out QL);
+ cp = Cp(QU, QL, Usl, Lsl);
+ cpk = Cpk(x, QU, QL, Usl, Lsl);
+ sxy(s, x, out sx, out sy);
+
+ }
+
+
+
+ ///
+ /// 计算SPC主要参数:
+ /// 输入:"X"被分析数据组;Usl理论上限;Lsl理论下限。
+ /// 输出:x平均值;"s"均方差;"QU"百分比上限;"QL"百分比下限;"cp"工序能力;"cpk"工序能力指数
+ ///
+ /// 被分析数据组
+ /// 理论上限
+ /// 理论下限
+ /// 平均值
+ /// 均方差
+ /// 百分比上限
+ /// 百分比下限
+ /// 工序能力
+ /// 工序能力指数
+ public static void SpcValue(int n,double[] X, ref double Usl, ref double Lsl, out double x, out double s,
+ out double QU, out double QL, out double cp, out double cpk, out double[] sx, out double[] sy)
+ {
+
+ x = AVERAGE(X);
+ s = STDEV(X);
+ if (Usl == Lsl)
+ {
+ Usl = x + 4.0 * s;
+ Lsl = x - 4.0 * s;
+ }
+ QU_QL(X, out QU, out QL);
+ cp = Cp(QU, QL, Usl, Lsl);
+ cpk = Cpk(x, QU, QL, Usl, Lsl);
+ sxy(s, x, out sx, out sy);
+
+
+ double X2 = Spc_Data.Average(X, n);
+ double S2 = Spc_Data.StandardDeviation_S2(X, n);
+ double R2 = Spc_Data.Range_R2(X, n);
+ double xiGamaC4;
+ double xiGamaD2;
+ double c4 = (double)Spc_Data.Spc_Param.Tables[Xml_Spc_Param.Table_Name].Rows[n - 2][Xml_Spc_Param.Param_C4];
+ double d2 = (double)Spc_Data.Spc_Param.Tables[Xml_Spc_Param.Table_Name].Rows[n - 2][Xml_Spc_Param.Param_L_D1];
+ xiGamaC4 = S2 / c4;
+ xiGamaD2 = R2 / d2;
+ double USL = Usl;
+ double LSL = Lsl;
+ double T = USL - LSL;
+ double CP = T / (6 * xiGamaD2);
+
+ double M = (USL + LSL) / 2.0;
+ double M1 = M - X2;
+ M1 = Math.Abs(M1);
+ double CPK = CP - M1 / (3 * xiGamaD2);
+
+
+ cp = CP;
+ cpk = CPK;
+
+
+ }
+ ///
+ /// 均方差
+ ///
+ /// 被分析数据组
+ /// 均方差
+ public static double STDEV(double[] X)
+ {
+ if (X.Length < 2)
+ return 0;
+ double s = 0;
+ //平均值
+ double x;
+ x = AVERAGE(X);
+ for (int i = 0; i < X.Length; i++)
+ {
+ s = s + (X[i] - x) * (X[i] - x);
+ }
+ s = Math.Sqrt(s / (double)(X.Length - 1));
+ return s;
+ }
+ ///
+ /// 平均值
+ ///
+ /// 被分析数据组
+ /// 平均值
+ public static double AVERAGE(double[] X)
+ {
+ return X.Average();
+ }
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ public static double[] Sort(double[] X)
+ {
+ ArrayList temp = new ArrayList(X);
+ temp.Sort();
+ return X = (double[])temp.ToArray(typeof(double));
+ }
+
+ ///
+ /// 已知表格行数为m,各行的数值分别记为 ,其中 表示第 行的数值,
+ /// 将这 个数值由小到大排列,记排列后的数值为 ,其中 表示 个数值经排列之后第k个数值。
+ /// 给定上下标线数值0.99865和0.00135。计算Q上和Q下的方法为:
+ ///a = (m - 1)* 0.99865
+ ///取a的整数部分为i,小数部分为j。
+ ///Q上 = (1 – j)* x(i+1)+ j * x(i+2)
+ ///同理:
+ ///b = (m - 1)* 0.00135
+ ///取b的整数部分为i,小数部分为j。
+ ///Q下 = (1 – j)* x(i+1)+ j * x(i+2)
+ ///
+ /// 被分析数据组
+ /// 百分比上限
+ /// 百分比下限
+ public static void QU_QL(double[] X, out double QU, out double QL)
+ {
+ QU = 0;
+ QL = 0;
+ double QU_n;
+ int QU_n_i;
+ double QU_n_j;
+ double QL_n;
+ int QL_n_i;
+ double QL_n_j;
+
+ X = Sort(X);
+
+ QU_n = (double)(X.Length - 1) * QU_k;
+ QU_n_i = (int)QU_n;
+ QU_n_j = QU_n - QU_n_i;
+ //Q上 = (1 – j)* x(i+1)+ j * x(i+2)
+ QU = (1 - QU_n_j) * X[QU_n_i] + QU_n_j * X[QU_n_i + 1];
+
+ QL_n = (double)(X.Length - 1) * QL_k;
+ QL_n_i = (int)QL_n;
+ QL_n_j = QL_n - QL_n_i;
+ //Q下 = (1 – j)* x(i+1)+ j * x(i+2)
+ QL = (1 - QL_n_j) * X[QL_n_i] + QL_n_j * X[QL_n_i + 1];
+
+ return;
+ }
+ ///
+ /// 工序能力
+ ///
+ /// 被分析数据组
+ /// 理论上限
+ /// 理论下限
+ /// 工序能力
+ public static double Cp(double[] X, double Usl, double Lsl)
+ {
+
+ double QU;
+ double QL;
+ double cp = 0;
+
+ QU_QL(X, out QU, out QL);
+
+ cp = (Usl - Lsl) / (QU - QL);
+ return cp;
+ }
+ ///
+ /// 工序能力
+ ///
+ /// 百分比上限
+ /// 百分比下限
+ /// 理论上限
+ /// 理论下限
+ ///
+ public static double Cp(double QU, double QL, double Usl, double Lsl)
+ {
+
+ double cp = 0;
+
+
+ cp = (Usl - Lsl) / (QU - QL);
+ return cp;
+ }
+ ///
+ /// 工序能力指数
+ ///
+ /// 被分析数据组
+ /// 理论上限
+ /// 理论下限
+ ///
+ public static double Cpk(double[] X, double Usl, double Lsl)
+ {
+ double cpk;
+ double cpkU;
+ double cpkL;
+ double QU;
+ double QL;
+ double cp = 0;
+ //均方差
+ double s;
+ //均值
+ double x;
+ x = AVERAGE(X);
+
+ QU_QL(X, out QU, out QL);
+
+ cp = (Usl - Lsl) / (QU - QL);
+
+ cpkU = (Usl - x) / (QU - x);
+ cpkL = (Lsl - x) / (QL - x);
+ cpk = Math.Min(cpkU, cpkL);
+ return cpk;
+ }
+
+
+ ///
+ /// 工序能力指数
+ ///
+ /// 平均值
+ /// 百分比上限
+ /// 百分比下限
+ /// 理论上限
+ /// 理论下限
+ ///
+ public static double Cpk(double x, double QU, double QL, double Usl, double Lsl)
+ {
+ double cpk;
+ double cpkU;
+ double cpkL;
+
+ double cp = 0;
+
+
+ cp = Cp(QU, QL, Usl, Lsl);
+
+ cpkU = (Usl - x) / (QU - x);
+ cpkL = (x - Lsl) / (x - QL);
+ cpk = Math.Min(cpkU, cpkL);
+ return cpk;
+ }
+
+ ///
+ /// 计算正态分布的x坐标,y坐标
+ ///
+ /// 均方差
+ /// 平均值
+ public static void sxy(double s, double x, out double[] sx, out double[] sy)
+ {
+ double S2;
+ double X2;
+ X2 = x;
+ S2 = s;
+ sx = new double[11];
+ sy = new double[11];
+ double tempmaxdouble = 1.0 / (s * Math.Sqrt(2.0 * Math.PI));
+ sx[0] = X2 - 4.0 * S2;
+ sx[1] = X2 - 3.0 * S2;
+ sx[2] = X2 - 2.0 * S2;
+ sx[3] = X2 - 1.0 * S2;
+ sx[4] = X2 - 0.5 * S2;
+ sx[5] = X2;
+ sx[6] = X2 + 0.5 * S2;
+ sx[7] = X2 + 1.0 * S2;
+ sx[8] = X2 + 2.0 * S2;
+ sx[9] = X2 + 3.0 * S2;
+ sx[10] = X2 + 4.0 * S2;
+
+
+ sy[0] = tempmaxdouble * Math.Exp(-16.0F / 2.0F);
+ sy[1] = tempmaxdouble * Math.Exp(-9.0F / 2.0F);
+ sy[2] = tempmaxdouble * Math.Exp(-4.0F / 2.0F);
+ sy[3] = tempmaxdouble * Math.Exp(-1.0F / 2.0F);
+ sy[4] = tempmaxdouble * Math.Exp(-0.25F / 2.0F);
+ sy[5] = tempmaxdouble;
+ sy[6] = tempmaxdouble * Math.Exp(-0.25F / 2.0F);
+ sy[7] = tempmaxdouble * Math.Exp(-1.0F / 2.0F);
+ sy[8] = tempmaxdouble * Math.Exp(-4.0F / 2.0F);
+ sy[9] = tempmaxdouble * Math.Exp(-9.0F / 2.0F);
+ sy[10] = tempmaxdouble * Math.Exp(-16.0F / 2.0F);
+
+ double sy_sum = 0;
+ for (int i = 0; i < sy.Length; i++)
+ {
+ sy_sum = sy_sum + sy[i];
+ }
+ for (int i = 0; i < sy.Length; i++)
+ {
+ sy[i] = sy[i] / sy_sum;
+ }
+ }
+ ///
+ /// 根据查询的数据,获得理论上限,理论下限
+ ///
+ ///
+ /// 理论上限
+ /// 理论下限
+ public static void GetUslLsl(DataTable dt, out double Usl, out double Lsl)
+ {
+
+ Usl = 0;
+ Lsl = 0;
+ if (dt != null)
+ {
+ if (dt.Rows.Count > 0)
+ {
+ try
+ {
+ //Usl = Convert.ToDouble(dt.Rows[0]["上限值"]);
+ //Lsl = Convert.ToDouble(dt.Rows[0]["下限值"]);
+ Usl = 100;
+ Lsl = 100;
+ }
+ catch
+ {
+ Usl = 0;
+ Lsl = 0;
+ }
+ }
+ }
+ }
+
+}
+
+///
+/// 测试数据
+///
+public class Spc_Data_TestData
+{
+ ///
+ /// 子组大小。单个子组观测值的个数
+ ///
+ static public int n = 5;
+ ///
+ /// 子组个数
+ ///
+ static public int k = 30;
+ ///
+ /// 特征值上限
+ ///
+ static public double USL = 1.7;
+ ///
+ /// 特征值下限
+ ///
+ static public double LSL = 1.5;
+ ///
+ /// 特征值上限
+ ///
+ static public double USL1 = 1.0;
+ ///
+ /// 特征值下限
+ ///
+ static public double LSL1 = 0.9;
+
+ ///
+ /// 特征值上限
+ ///
+ static public double USL2 = 1.15;
+ ///
+ /// 特征值下限
+ ///
+ static public double LSL2 = 1.10;
+
+
+ ///
+ /// 特征值上限
+ ///
+ static public double USL3 = 129.01;
+ ///
+ /// 特征值下限
+ ///
+ static public double LSL3 = 129;
+ static public double[] X3 =
+ {
+ 129.006,129.006,129.006,129.005,129.006,
+ 129.006,129.005,129.005,129.005,129.005,
+ 129.005,129.006,129.007,129.006,129.005,
+ 129.005,129.005,129.006,129.005,129.006,
+ 129.006,129.006,129.007,129.006,129.005,
+ 129.007,129.006,129.005,129.005,129.006,
+ 129.006,129.007,129.005,129.005,129.005,
+ 129.007,129.006,129.006,129.007,129.005,
+ 129.007,129.005,129.005,129.006,129.007,
+ 129.006,129.007,129.005,129.005,129.006
+
+ };
+ static public double[] X2 =
+ {
+ 1.141,1.130,1.131,1.127,1.137,
+ 1.140,1.137,1.130,1.135,1.125,
+ 1.133,1.133,1.131,1.128,1.127,
+ 1.122,1.131,1.131,1.125,1.123,
+ 1.131,1.128,1.117,1.133,1.136,
+ 1.123,1.128,1.135,1.127,1.130,
+ 1.138,1.126,1.130,1.133,1.133,
+ 1.130,1.127,1.128,1.127,1.128,
+ 1.122,1.142,1.128,1.135,1.133,
+ 1.142,1.127,1.133,1.135,1.135
+ };
+ static public double[] X1 =
+ { 0.941,0.942,0.947,0.939,0.942,0.943,
+ 0.942,0.950,0.943,0.948,0.941,0.953,
+ 0.944,0.943,0.941,0.933,0.942,0.941,
+ 0.942,0.942,0.942,0.947,0.938,0.941,
+ 0.947,0.943,0.943,0.948,0.938,0.946,
+ 0.946,0.943,0.945,0.946,0.942,0.951,
+ 0.951,0.938,0.938,0.952,0.947,0.945,
+ 0.951,0.948,0.946,0.947,0.947,0.947,
+ 0.953,0.956
+ };
+ static public double[] X =
+ { 1.55,1.58,1.61,1.60,1.60,//1
+ 1.58,1.63,1.63,1.62,1.63,//2
+ 1.62,1.63,1.62,1.59,1.58,//3
+ 1.58,1.60,1.61,1.62,1.63,//4
+ 1.58,1.64,1.63,1.62,1.62,//5
+ 1.62,1.62,1.63,1.61,1.57,//6
+ 1.64,1.62,1.61,1.60,1.58,//7
+ 1.57,1.59,1.61,1.62,1.63,//8
+ 1.58,1.61,1.60,1.62,1.63,//9
+ 1.60,1.61,1.64,1.64,1.63,//10
+ 1.58,1.60,1.62,1.63,1.65,//11
+ 1.62,1.58,1.59,1.57,1.58,//12
+ 1.57,1.57,1.58,1.59,1.64,//13
+ 1.61,1.64,1.62,1.60,1.59,//14
+ 1.65,1.62,1.62,1.60,1.58,//15
+ 1.57,1.59,1.57,1.59,1.62,//16
+ 1.56,1.57,1.57,1.61,1.62,//17
+ 1.56,1.58,1.59,1.60,1.62,//18
+ 1.58,1.60,1.60,1.62,1.63,//19
+ 1.58,1.59,1.60,1.63,1.62,//20
+ 1.58,1.59,1.62,1.63,1.64,//21
+ 1.58,1.59,1.62,1.63,1.61,//22
+ 1.58,1.59,1.60,1.61,1.63,//23
+ 1.57,1.59,1.61,1.61,1.62,//24
+ 1.58,1.58,1.60,1.61,1.63,//25
+ 1.62,1.58,1.58,1.58,1.57,//26
+ 1.63,1.59,1.57,1.58,1.57,//27
+ 1.58,1.62,1.61,1.63,1.61,//28
+ 1.58,1.57,1.59,1.60,1.62,//29
+ 1.62,1.60,1.60,1.57,1.57 //30
+ };
+
+}
diff --git a/MES_Manage/App_code/drawchart/_system~.ini b/MES_Manage/App_code/drawchart/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/App_code/drawchart/vssver2.scc b/MES_Manage/App_code/drawchart/vssver2.scc
new file mode 100644
index 0000000..4a50346
Binary files /dev/null and b/MES_Manage/App_code/drawchart/vssver2.scc differ
diff --git a/MES_Manage/App_code/vssver2.scc b/MES_Manage/App_code/vssver2.scc
new file mode 100644
index 0000000..677b48c
Binary files /dev/null and b/MES_Manage/App_code/vssver2.scc differ
diff --git a/MES_Manage/App_code/webChatClient.cs b/MES_Manage/App_code/webChatClient.cs
new file mode 100644
index 0000000..0f803d9
--- /dev/null
+++ b/MES_Manage/App_code/webChatClient.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using MES_SPC;
+namespace ChatClient
+{
+ public static class webChatClient
+ {
+ private static bool stopFlag;
+ ///
+ /// 服务器是否反馈
+ ///
+ public static bool ServersResponse = false;
+ ///
+ /// 命令状态
+ ///
+ public static bool commandstatus = false;
+ ///
+ /// 是否正忙
+ ///
+ public static bool isworking = false;
+ //与服务器的连接
+ static TcpClient tcpClient= new TcpClient();
+ //与服务器数据交互的流通道
+ private static NetworkStream Stream;
+
+ ////客户端的状态
+ //private static string CLOSED = "closed";
+ //private static string CONNECTED = "connected";
+ //private static string state = CLOSED;
+ ////private static bool stopFlag;
+
+ static bool connect()
+ {
+
+ string HostName = ApplicationConfiguration.GPRSDataHost; ;
+ //IPHostEntry dnstoip = new IPHostEntry();
+ //dnstoip = Dns.GetHostEntry(HostName);
+ //string HostIP = dnstoip.AddressList[0].ToString();
+ string Port = ApplicationConfiguration.GPRSDataPort;
+ return connect(HostName, Port);
+ }
+ private static bool connect(string HostName, string Port)
+ {
+ try
+ {
+ if (!tcpClient.Connected)
+ {
+ tcpClient = new TcpClient();
+ tcpClient = TcpClientConnector.Connect(HostName, Int32.Parse(Port), 1000);
+ Stream = tcpClient.GetStream();
+ //Thread thread = new Thread(new ThreadStart(ServerResponse));
+ //thread.Start();
+ string cmd = "CONN|" + "WEB" + "|!";
+ Byte[] outbytes = System.Text.Encoding.Default.GetBytes(
+ cmd.ToCharArray());
+ Stream.Write(outbytes, 0, outbytes.Length);
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+
+ }
+
+
+ //当单击“离开”按钮时,便进入了btnExit_Click 处理程序。
+ //在btnExit_Click 处理程序中,
+ //将“EXIT”命令发送给服务器,此命令格式要与服务器端的命令格式一致
+ private static void EXIT()
+ {
+
+ try
+ {
+ if (tcpClient.Connected)
+ {
+ string message = "EXIT|" + "WEB" + "|!";
+ //将字符串转化为字符数组
+ Byte[] outbytes = System.Text.Encoding.Default.GetBytes(
+ message.ToCharArray());
+ Stream.Write(outbytes, 0, outbytes.Length);
+ tcpClient.Close();
+ }
+ }
+
+ catch { }
+ }
+
+ private static void ServerResponse()
+ {
+ //定义一个byte数组,用于接收从服务器端发送来的数据,
+ //每次所能接收的数据包的最大长度为1024个字节
+ byte[] buff = new byte[1024];
+ string msg;
+ int len;
+ try
+ {
+ if (!Stream.CanRead)
+ {
+ //return "不可读";
+ return;
+ }
+ stopFlag = false;
+ while (!stopFlag)
+ {
+ //从流中得到数据,并存入到buff字符数组中
+ len = Stream.Read(buff, 0, buff.Length);
+ if (len < 1)
+ {
+ Thread.Sleep(200);
+ continue;
+ }
+ ServersResponse = true;
+ }
+ tcpClient.Close();
+ //关闭连接
+ }
+ catch
+ {
+ //return "网络发生错误";
+ }
+ }
+ static string command = "";
+ //当点击“发送”按钮时,便会进入btnSend_Click处理程序。
+ //在btnSend_Click处理程序中,如果不是私聊,
+ //将“CHAT”命令发送给服务器,
+ //否则(为私聊),将“PRIV”命令发送给服务器,
+ //注意命令格式一定要与服务器端的命令格式一致
+ public static void sentmessage(string GPRScommand)
+ {
+ if (isworking)
+ {
+ return;
+ }
+ isworking = true;
+ try
+ {
+ command = GPRScommand;
+ commandstatus = false;
+ if (connect())
+ {
+ byte[] outbytes = System.Text.Encoding.ASCII.GetBytes(command.ToCharArray());
+ Stream.Write(outbytes, 0, outbytes.Length);
+ commandstatus = true;
+ }
+ else
+ {
+ commandstatus = false;
+ }
+ }
+ catch (Exception err)
+ {
+ tcpClient.Close();
+ commandstatus = false;
+ }
+ isworking = false;
+ }
+
+
+
+ }
+}
diff --git a/MES_Manage/Bin/ASPNet_Drawing.dll b/MES_Manage/Bin/ASPNet_Drawing.dll
new file mode 100644
index 0000000..6f432e6
Binary files /dev/null and b/MES_Manage/Bin/ASPNet_Drawing.dll differ
diff --git a/MES_Manage/Bin/ASPNet_Drawing.pdb b/MES_Manage/Bin/ASPNet_Drawing.pdb
new file mode 100644
index 0000000..1add036
Binary files /dev/null and b/MES_Manage/Bin/ASPNet_Drawing.pdb differ
diff --git a/MES_Manage/Bin/ASPNet_Drawing.xml b/MES_Manage/Bin/ASPNet_Drawing.xml
new file mode 100644
index 0000000..a1a9d6b
--- /dev/null
+++ b/MES_Manage/Bin/ASPNet_Drawing.xml
@@ -0,0 +1,8722 @@
+
+
+
+ ASPNet_Drawing
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 把表:chartdata转换成为符合绘制图表格式的XML文档
+
+
+
+
+
+
+ 把表:[]chartdata转换成为符合绘制图表格式的XML文档
+
+
+
+
+
+
+ 把表:chartdataisland和表的[]chartdata转换成为符合绘制图表格式的XML文档:
+ chartdataisland数据表的每一行表示一个数据系列,
+ DataTable[] 中的每一个表中包含着实际的数据
+ 缺省值:
+ 表:chartdataisland
+ shape=1
+ size = 12;
+ 表的[]chartdata
+ x = 数据序号
+ visible = 1
+
+
+
+
+
+
+
+ 创建为转换XML设计的表结构
+ 表名称:chartdata
+ 字段名称: legend string
+ x double
+ y double
+ color string
+ visible string
+
+
+
+
+
+ 创建为转换XML设计的表结构
+ 表名称: chartdataisland
+ 字段名称: title,shape,size,ucl,cl,lcl
+
+
+
+
+
+ 增加一列 Title
+
+
+
+
+
+ 测试用
+
+
+
+
+
+ 测试用
+
+
+
+
+
+ 测试用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,横坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,右侧纵坐标文本的小数点后位数
+
+
+
+
+ X坐标轴标题文本大小
+
+
+
+
+ Y坐标轴标题文本大小
+
+
+
+
+ X坐标轴标题文本下边距
+
+
+
+
+ Y坐标轴标题文本左边距
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反赋值
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,横坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,右侧纵坐标文本的小数点后位数
+
+
+
+
+ X坐标轴标题文本大小
+
+
+
+
+ Y坐标轴标题文本大小
+
+
+
+
+ X坐标轴标题文本下边距
+
+
+
+
+ Y坐标轴标题文本左边距
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反赋值
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,横坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反赋值
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,横坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,右侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 正态分布曲线的颜色
+
+
+
+
+ 直方图的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 显示的参数的精度
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 图像内所使用的文字的大小
+
+
+
+
+ 图像内所使用的文字的大小
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 如果是数字,右侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 图像内所使用的文字的大小
+
+
+
+
+ 图像内所使用的文字的大小
+
+
+
+
+ 趋势线的颜色
+
+
+
+
+ 趋势线的宽度
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 均值的小数点位数
+
+
+
+
+ 极差值的小数点位数
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ GenrateColor 的摘要说明。
+
+
+
+
+ The enumeration specifies the types of lines that be specified for drawing
+ vartious lines on the graph.
+ 线形:实线或虚线
+
+
+
+
+ The enumeration is used to specify the type of background that user wants to
+ use.
+ 背景模式:普通;线性渐变模式;环形渐变模式;背景图片;阴影线模式(需要提供1-2种m_GradientColors[])
+
+
+
+
+ 颜色线性渐变的效果(1、右上致左下。2、左上致右下。3、水平从左致右。4、垂直从上致下)
+
+
+
+
+ This enum speicifies the circularr gradient type
+ 颜色渐变的效果(1、由内致外。2、由外致内)
+
+
+
+
+ 阴影线的类型
+
+
+
+
+ This enum specifies if the legend will be draw inside or outside
+ the chart.
+ legend在图形中的位置的类型
+
+
+
+
+ This enum specifies the outside position of legend.
+
+
+
+
+ 阴影线的类型
+
+
+
+
+ This enum specifies how the legends will be draw. There are two
+ ways you can do it. Top to bottom or left to right.
+
+
+
+
+
+
+
+
+
+ Summary description for Class1.
+
+
+
+
+ 绘制直线宽度
+
+
+
+
+ 图例原点
+
+
+
+
+ 是否有网格线
+
+
+
+
+ 是否有水平网格线
+
+
+
+
+ 是否有垂直网格线
+
+
+
+
+ 是否显示图例
+
+
+
+
+ 图例中是否显示数值
+
+
+
+
+ 图例中显示数值小数点位数
+
+
+
+
+ 绘图区宽度
+
+
+
+
+ 绘图区高度
+
+
+
+
+ 图例说明文本最大宽度
+
+
+
+
+ 图例说明文本最大高度
+
+
+
+
+ 图例说明文本平均宽度
+
+
+
+
+ 图例说明文本总宽度
+
+
+
+
+ 图例说明文本值最大宽度
+
+
+
+
+ 图例说明文本值最大高度
+
+
+
+
+ 图例说明文本值平均宽度
+
+
+
+
+ 图例说明文本值平均宽度
+
+
+
+
+ 图例内容之间垂直间格
+
+
+
+
+ 图例内容之间水平间格
+
+
+
+
+ 条形图组之间间格
+
+
+
+
+ 条形图组标题最大宽度
+
+
+
+
+ 条形图组标题最大高度
+
+
+
+
+ 条形图组标题平均宽度
+
+
+
+
+ 条形图组标题总宽度
+
+
+
+
+ 条形图组标题说明列表m_arrGroupBarTitleWidth
+
+
+
+
+ 条形图组标题说明列表:标题title、形状shape、形状尺寸size
+
+
+
+
+ 图例说明宽度列表
+
+
+
+
+
+
+
+
+
+ 图例宽度
+
+
+
+
+ 图例高度
+
+
+
+
+ 标题与顶部距离
+
+
+
+
+ 坐标轴左边距
+
+
+
+
+ 坐标轴底边距
+
+
+
+
+ 坐标轴右边距
+
+
+
+
+ 坐标轴顶边距
+
+
+
+
+ 显示在X轴的最小值
+
+
+
+
+ 显示在X轴的最大值
+
+
+
+
+ 显示在Y轴的最小值
+
+
+
+
+ 显示在Y轴的最大值
+
+
+
+
+ 显示在Y轴右侧的最大值
+
+
+
+
+ 显示在Y轴的最小值
+
+
+
+
+ X轴间隔
+
+
+
+
+ Y轴间隔
+
+
+
+
+ Y轴右侧刻度间隔(用数据的个数表示频数):仅用于工序能力分析图的生成
+
+
+
+
+ 绘图原点
+
+
+
+
+ X坐标轴标签位置
+
+
+
+
+ Y坐标轴标签位置
+
+
+
+
+ X坐标轴的实际长度
+
+
+
+
+ Y坐标轴的实际长度
+
+
+
+
+ Bar_X最小值
+
+
+
+
+ Bar_X最大值
+
+
+
+
+ X最小值
+
+
+
+
+ Y最小值
+
+
+
+
+ X最大值
+
+
+
+
+ Y最大值
+
+
+
+
+ 右侧Y最大值 ly050702---用于计算右侧表示频数的坐标刻度值:纵坐标的最大最小值直接传递进来然后进行分度。
+
+
+
+
+ 右侧Y最小值
+
+
+
+
+ 图例说明列表
+
+
+
+
+ 图例说明对应值的列表
+
+
+
+
+ 图例说明宽度列表
+
+
+
+
+ 图例说明对应值宽度列表
+
+
+
+
+ XML document storing data for Draw Table
+ 用于绘制表格
+
+
+
+
+ 表格底色
+
+
+
+
+ 表格行宽度
+
+
+
+
+ 表格填写文本颜色
+
+
+
+
+ 字体高度
+
+
+
+
+ 字体
+
+
+
+
+ 表格线宽度
+
+
+
+
+ 表格线颜色
+
+
+
+
+ 设定背景模式的范围
+
+
+
+
+ 直线宽度
+
+
+
+
+ 绘制表格用
+
+
+
+
+ 设置绘图句柄
+
+
+
+
+ 设置绘制图例原点
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 背景模式代码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ x-axis label padding from axis line
+
+
+
+
+ y-axis label padding from axis line
+
+
+
+
+ yes/no for displaying x-axis label
+
+
+
+
+ yes/no for displaying y-axis label
+
+
+
+
+ 是否有网格线
+
+
+
+
+ 是否有水平网格线
+
+
+
+
+ 是否有垂直网格线
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 有没有外边框
+
+
+
+
+ 外边框的颜色
+
+
+
+
+ 外边框的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 左侧Y轴的最小值
+
+
+
+
+ 右侧Y轴的最小值
+
+
+
+
+ 左侧Y轴的最大值
+
+
+
+
+ 右侧Y轴的最大值
+
+
+
+
+ 横坐标间隔的距离
+
+
+
+
+ 纵坐标间隔的距离
+
+
+
+
+ 右侧纵坐标间隔的距离:仅用于工序能力分析图的生成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图像内部所使用的文字 //ly050823
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图形内部文本的大小 //ly050823
+
+
+
+
+ 图形内部文本的颜色 //ly050823
+
+
+
+
+
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标如果为数字时小数点后的位数
+
+
+
+
+ 左侧纵坐标如果为数字时小数点后的位数
+
+
+
+
+ 右侧纵坐标如果为数字时小数点后的位数
+
+
+
+
+ 条形图组之间间格
+
+
+
+
+ 设置XML文档(绘图数据)到绘图系统
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 绘制坐标轴的标题
+
+
+
+
+
+ 用于生成图形的主函数
+
+ 生成的图形的格式
+ 图片输出的路径
+
+
+
+
+ 用于生成图形的主函数(多余的参数没有必要)
+
+ 生成的图形的格式
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function is used to calculate the span of x and y axis.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 根据背景代码设定背景模式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method can be used to get the minimum and maximum value stored in the
+ array.
+
+
+
+
+
+
+
+ This method adds the legend text to StringCollection storing all
+ legend text values. This method also calculates the width and
+ height of the string and calculates the max width value.
+
+
+
+
+
+ This method adds the legend textvalue to StringCollection storing all
+ legend text values. This method also calculates the width and
+ height of the string and calculates the max width value.
+
+
+
+
+
+ This method adds the color text to StringCollection storing all
+ color text values.
+
+
+
+
+
+ This method adds the legend text to StringCollection storing all
+ legend text values. This method also calculates the width and
+ height of the string and calculates the max width value.
+
+
+
+
+
+ This method adds the legend text to StringCollection storing all
+ legend text values. This method also calculates the width and
+ height of the string and calculates the max width value.
+
+
+
+
+
+ This method adds the legend text to StringCollection storing all
+ legend text values. This method also calculates the width and
+ height of the string and calculates the max width value.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 初始化条形图组组标题列表
+
+
+
+
+ 初始化条形图组组标题列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method calculates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ali:
+ 1 TopLeft 2 TopCenter 3 TopRight
+ 4 MiddleLeft 5 MiddleCenter 6 MiddleRight
+ 7 BottomLeft 8 BottomCenter 9 BottomRight
+
+
+
+
+
+
+
+
+
+ 1、绘制矩形直线端点
+
+
+
+
+
+
+
+
+ 绘制矩形直线端点图例
+
+
+
+
+
+
+
+
+ 2、绘制圆形直线端点
+
+
+
+
+
+
+
+
+ 绘制圆形直线端点图例
+
+
+
+
+
+
+
+
+ 3、绘制旋转矩形直线端点
+
+
+
+
+
+
+
+
+ 绘制旋转矩形直线端点图例
+
+
+
+
+
+
+
+
+ 4、绘制X型直线端点
+
+
+
+
+
+
+
+
+ 绘制X型直线端点图例
+
+
+
+
+
+
+
+
+ 5、绘制*型直线端点
+
+
+
+
+
+
+
+
+ 绘制*型直线端点图例
+
+
+
+
+
+
+
+
+ 6、绘制正三角形型直线端点
+
+
+
+
+
+
+
+
+ 绘制正三角形型直线端点图例
+
+
+
+
+
+
+
+
+ 7、绘制倒三角形型直线端点
+
+
+
+
+
+
+
+
+ 绘制倒三角形型直线端点图例
+
+
+
+
+
+
+
+
+ 绘制直线端点
+ 1、绘制矩形直线端点
+ 2、绘制圆形直线端点
+ 3、绘制旋转矩形直线端点
+ 4、绘制X型直线端点
+ 5、绘制*型直线端点
+ 6、绘制正三角形型直线端点
+ 7、绘制倒三角形型直线端点
+
+
+
+
+
+
+
+
+
+ 绘制直线端点
+ 1、绘制矩形直线端点
+ 2、绘制圆形直线端点
+ 3、绘制旋转矩形直线端点
+ 4、绘制X型直线端点
+ 5、绘制*型直线端点
+ 6、绘制正三角形型直线端点
+ 7、绘制倒三角形型直线端点
+
+
+
+
+
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 图形右侧Y轴单位自动分格 ly050702
+
+
+
+
+ X轴单位自动分格
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+ 读取XML文件中的数据并进行相应的设置:应该是可以继承并重写的
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图例
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method calculates
+
+
+
+
+ 为了计算图例矩形从新设置变量
+ wangdequan 20050613
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于表示填充部分的颜色
+
+
+
+
+ 用于表示边界部分的颜色
+
+
+
+
+ 用于表示文字部分的颜色
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SaveDataSetXMLData 的摘要说明。
+
+
+
+
+
+
+
+
+
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 图形右侧Y轴单位自动分格 ly050702
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+
+
+
+
+
+ 柱状图边框的颜色
+
+
+
+
+ 柱状图边框的宽度
+
+
+
+
+ 表示趋势的折线的颜色
+
+
+
+
+ 表示趋势的折线的宽度
+
+
+
+
+ 图形内文本的颜色
+
+
+
+
+ 图形内文本的宽度
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数据绘图前处理ProcessChartData
+ 绘制坐标轴
+
+
+
+ ly20050626 为了画出条形图而增加的定义
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method calculates
+
+
+
+
+ 为了计算图例矩形从新设置变量
+ wangdequan 20050613
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ly_20050626 从BarGraph.cs类中拷贝过来的用于计算Bar的高度的函数
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 图形右侧Y轴单位自动分格 ly050702
+
+
+
+
+
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 正态分布曲线的颜色
+
+
+
+
+ 直方图的颜色
+
+
+
+
+ 本图使用的线宽
+
+
+
+
+ 图形显示的参数的精度
+
+
+
+
+ 用dataList中的数据分别画出:曲线图、表示频度的直方图、表示目标值和上下限的三条竖线
+
+
+
+
+
+
+
+
+
+
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 柱状图边框的颜色
+
+
+
+
+ 柱状图边框的宽度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Spc_Data 的摘要说明。
+ n 子组大小。单个子组观测值的个数
+ k 子组个数
+
+
+
+
+ 观测值和
+
+ 子组观测值
+
+
+
+
+ 分别计算各个子组观测值和
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 子组平均值的数组
+ 全部测量数据之和
+
+
+
+ 计算X在区间[ValueDown,ValueUp]的数量
+
+
+
+
+
+
+
+
+
+ 观测值最大值
+
+ 子组观测值
+
+
+
+
+ 观测值最小值
+
+ 子组观测值
+
+
+
+
+ 一组观测值的均值
+
+ 子组观测值
+
+
+
+
+ 子组平均值的平均值
+ n 子组大小。单个子组观测值的个数
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 子组平均值的数组
+
+
+
+
+ 子组平均值的平均值
+ n 子组大小。单个子组观测值的个数
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 子组平均值的数组
+
+
+
+
+ 不合格品百分数
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 不合格品百分数
+
+
+
+ 子组极差。子组观测值中的极大值和极小值之差
+
+ 子组观测值
+
+
+
+
+ 子组标准差
+
+ 子组观测值
+
+
+
+
+ 子组极差的平均值
+ n 子组大小。单个子组观测值的个数
+ k 子组个数
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组极差的平均值
+ n 子组大小。单个子组观测值的个数
+ k 子组个数
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 子组极差数组
+
+
+
+
+ 子组标准差的平均值
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组标准差的平均值
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+ 子组标准差
+
+
+
+
+ X-R均值极差图,计算结果保存在类Spc_Data_XR中
+ 计算结果保存在类Spc_Data_XR中
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+
+
+
+ X-S 均值标准差图
+ 计算结果保存在类Spc_Data_XS中
+
+ 全部测量数据数组
+ 子组大小。单个子组观测值的个数
+
+
+
+ p不合格品率控制图,np不合格数控制图。
+ 计算结果保存在类Spc_Data_p中
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+
+
+
+ 计算能力指数。计算结果保存在类Spc_Data_Cpk中
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+
+
+
+ 计算能力指数。计算结果保存在类Spc_Data_Cpk中
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+
+
+
+ X-R均值极差图
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ 均值中心线
+
+
+
+
+ 均值上控制线
+
+
+
+
+ 均值下控制线
+
+
+
+
+ 极差中心线
+
+
+
+
+ 极差上控制线
+
+
+
+
+ 极差下控制线
+
+
+
+
+ 均值(子组个数k)
+
+
+
+
+ 极差(子组个数k)
+
+
+
+
+ X-S 均值标准差图
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ 均值中心线
+
+
+
+
+ 均值上控制线
+
+
+
+
+ 均值下控制线
+
+
+
+
+ 标准差中心线
+
+
+
+
+ 标准差上控制线
+
+
+
+
+ 标准差下控制线
+
+
+
+
+ 均值(子组个数k)
+
+
+
+
+ 标准差(子组个数k)
+
+
+
+
+ p不合格品率控制图
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ p不合格率控制图图中心线。所有子组不合格品率的平均值
+
+
+
+
+ 不合格率上控制线
+
+
+
+
+ 不合格率下控制线
+
+
+
+
+ np不合格数控制图中心线。 =所有子组不合格品数/子组个数
+
+
+
+
+ np不合格数上控制线
+
+
+
+
+ np不合格数下控制线
+
+
+
+
+ 子组不合格品率(子组个数k)
+
+
+
+
+ 子组不合格品数(子组个数k)
+
+
+
+
+ 能力指数计算
+ 直方图。将收集的测定值或数据之全距分为几个相等区间作为横轴,
+ 并将各区间内之测定值
+ 所出现次数累积而成的面积以条状方式排列起来所产生的图形,
+ 称之为直方图。
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ 特征值中值
+
+
+
+
+ 特征值上限
+
+
+
+
+ 特征值下限
+
+
+
+
+ 组内过程标准差的估计值
+
+
+
+
+ 子组标准差的平均值
+
+
+
+
+ 过程准确度,表示过程特性中心位置的偏移度
+
+
+
+
+ 过程精密度,表示过程特性的一致性程度
+
+
+
+
+ 能力指数上限
+
+
+
+
+ 能力指数下限
+
+
+
+
+ 稳定过程的能力比值
+
+
+
+
+ 过程能力指数。过程准确度和过程精密度综合考虑, 越大越好
+
+
+
+
+ 性能指数
+
+
+
+
+ 能力指数上限
+
+
+
+
+ 能力指数下限
+
+
+
+
+ 性能比率
+
+
+
+
+ 性能指数
+
+
+
+
+ 全距。由全体数据中找出最大值与最小值之差。
+ 过程分布宽度。一个过程特性单值的分布变化程度。
+ 通常用过程平均值加减几倍的标准差来表示(例如:X±3σ)。
+
+
+
+
+ 组距
+
+
+
+
+ 分组数
+
+
+
+
+ 全部观测值最大值
+
+
+
+
+ 全部观测值最小值
+
+
+
+
+ 组中点
+
+
+
+
+ 组观测值上界
+
+
+
+
+ 组观测值下界
+
+
+
+
+ 组中测定次数与总的测定次数的比值*100
+
+
+
+
+ 组中测定次数
+
+
+
+
+ 正态分布图X坐标
+
+
+
+
+ 正态分布图Y坐标
+
+
+
+
+ 利用能力指数计算方法,绘制直方图。
+ 将收集的测定值或数据之全距分为几个相等区间作为横轴,
+ 并将各区间内之测定值
+ 所出现次数累积而成的面积以条状方式排列起来所产生的图形,
+ 称之为直方图。
+ 不计算上下限等其他参数。
+
+
+
+
+ 全距。由全体数据中找出最大值与最小值之差。
+ 过程分布宽度。一个过程特性单值的分布变化程度。
+ 通常用过程平均值加减几倍的标准差来表示(例如:X±3σ)。
+
+
+
+
+ 组距
+
+
+
+
+ 分组数
+
+
+
+
+ 全部观测值最大值
+
+
+
+
+ 全部观测值最小值
+
+
+
+
+ 组中点
+
+
+
+
+ 组观测值上界
+
+
+
+
+ 组观测值下界
+
+
+
+
+ 组中测定次数与总的测定次数的比值*100
+
+
+
+
+ 组中测定次数
+
+
+
+
+ 正态分布图X坐标
+
+
+
+
+ 正态分布图Y坐标
+
+
+
+
+ 测试数据
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ 特征值上限
+
+
+
+
+ 特征值下限
+
+
+
+
+ 测试数据
+ p不合格率控制图
+ 不合格数控制图
+
+
+
+
+ 子组大小。单个子组观测值的个数
+
+
+
+
+ 子组个数
+
+
+
+
+ 排列图测试数据
+
+
+
+
+ 基本直方图
+
+
+
+
+ Spc_Draw 的摘要说明。
+
+
+
+
+ 绘制均值-极差控制图用。将数据转换为两个XmlDataDocument
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+ 均值数据
+ 极差数据
+
+
+
+ 绘制均值-标准差控制图用。将数据转换为两个XmlDataDocument
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+ 均值数据
+ 标准差数据
+
+
+
+ 绘制均值-标准差控制图用。将数据转换为两个XmlDataDocument
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+ 均值数据
+ 标准差数据
+
+
+
+ 能力指数计算
+ 直方图。将收集的测定值或数据之全距分为几个相等区间作为横轴,
+ 并将各区间内之测定值
+ 所出现次数累积而成的面积以条状方式排列起来所产生的图形,
+ 称之为直方图。
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+ 特征值下限
+ 特征值上限
+
+
+
+
+ 能力指数计算
+ 直方图。将收集的测定值或数据之全距分为几个相等区间作为横轴,
+ 并将各区间内之测定值
+ 所出现次数累积而成的面积以条状方式排列起来所产生的图形,
+ 称之为直方图。
+
+ 全部测量数据数组,不合格数
+ 子组大小。单个子组观测值的个数
+ 特征值下限
+ 特征值上限
+
+
+
+
+ 准备生成排列图的XmlDataDocument(关键因素排列图)
+
+ 用于生成排列图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 标准直方图
+
+ 用于生成排列图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成趋势图的XmlDataDocument
+
+ 用于生成趋势图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ Spc_Draw 的摘要说明。
+
+
+
+
+ 均值-极差控制图无返回值
+ XR-X均值图控制图
+
+
+
+
+ 均值-极差控制图无返回值
+ XR-R极差控制图
+
+
+
+
+ 均值-极差控制图无返回值
+
+
+
+
+ 均值-标准差控制图无返回值
+
+
+
+
+ 均值-标准差控制图无返回值
+
+
+
+
+ 均值-标准差控制图无返回值
+
+
+
+
+ 工序能力分析
+
+
+
+
+ 绘制直方图,通过计算工序能力的分析方法
+
+
+
+
+ 排列图
+
+
+
+
+ 排列图
+
+
+
+
+ P-NP图
+ p不合格率控制图
+ np不合格数控制图
+
+
+
+
+ P-NP图
+ p不合格率控制图
+
+
+
+
+ P-NP图
+ p不合格率控制图
+ np不合格数控制图
+
+
+
+
+
+
+
+
+ ly20050626 为了画出条形图而增加的定义
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method calculates
+
+
+
+
+ 为了计算图例矩形从新设置变量
+ wangdequan 20050613
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ly_20050626 从BarGraph.cs类中拷贝过来的用于计算Bar的高度的函数
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 图形右侧Y轴单位自动分格 ly050702
+
+
+
+
+
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 正态分布曲线的颜色
+
+
+
+
+ 直方图的颜色
+
+
+
+
+ 本图使用的线宽
+
+
+
+
+ 图形显示的参数的精度
+
+
+
+
+ 用dataList中的数据分别画出:曲线图、表示频度的直方图、表示目标值和上下限的三条竖线
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图形边框的颜色
+
+
+
+
+ 图形边框的宽度
+
+
+
+
+ 图形内文本的颜色
+
+
+
+
+ 图形内文本的宽度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 条形图方向
+
+
+
+
+ 条形图实际宽度
+
+
+
+
+ 条形图绘制宽度
+
+
+
+
+ 条形图高度比例
+
+
+
+
+ 条形图条的个数
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于书写水平的文本
+
+
+
+
+
+
+
+
+ 用于书写倾斜的文本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Y轴单位自动分格
+
+
+
+
+ 图形右侧Y轴单位自动分格 ly050702
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+
+
+
+
+
+ 柱状图边框的颜色
+
+
+
+
+ 柱状图边框的宽度
+
+
+
+
+ 表示趋势的折线的颜色
+
+
+
+
+ 表示趋势的折线的宽度
+
+
+
+
+ 图形内文本的颜色
+
+
+
+
+ 图形内文本的宽度
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method calculates
+
+
+
+
+ 为了计算图例矩形从新设置变量
+ wangdequan 20050613
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 标记的尺寸
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+ 平均值的精度
+
+
+
+
+ 极差值的精度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+ 平均值的精度
+
+
+
+
+ 偏差值的精度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StatisticalFunction 的摘要说明。
+ 该函数完成统计过程控制全部的计算工作
+
+
+
+
+ 重载构造函数用于直接传入包含数据的表
+
+ 传入包含数据的DataTable
+ 表示第几列是实际的数据列
+
+
+
+ 重载构造函数用于直接传入包含数据的一组Table
+
+ 传入包含数据的DataTable数组
+ 表示第几列是实际的数据列
+
+
+
+ 重载构造函数用于直接传入包含数据的一组Table(只用于Spc_Trend)
+
+ 传入包含数据的DataTable数组
+ 表示第几列是实际的数据列
+ 传入数据系列名称的数组
+
+
+
+ 准备生成统计过程分析的数据,以及图形下显示的参数列表
+
+ 数据的尺寸公差上限(其中尺寸公差上限必须大于尺寸公差下限)
+ 数据的尺寸公差下限
+ 输出生成图形的数据源
+ 输出相关的参数列表
+
+
+
+
+ 准备生成均值--极差控制图的两个XmlDataDocument
+
+ 每组数据的个数
+ 平均值的小数位数精度
+ 极差值的小数位数精度
+ 用于生成均值控制图的XmlDataDocument
+ 用于生成极差控制图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成均值--偏差(标准差)控制图的两个XmlDataDocument
+
+ 每组数据的个数
+ 平均值的小数位数精度
+ 偏差值的小数位数精度
+ 用于生成均值控制图的XmlDataDocument
+ 用于生成偏差控制图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成不合格品率控制图的XmlDataDocument(P控制图)
+
+ 用于生成均值控制图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成不合格品数控制图的XmlDataDocument(nP控制图主要适合抽取样品相等的场合,以方便对批质量水平的控制)
+
+ 用于生成不合格品数控制图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成水平分析图的XmlDataDocument(应用于描述列+数据列的情况)
+
+ 用于生成水平分析图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成饼图的XmlDataDocument(应用于描述列+数据列的情况)
+
+ 用于生成饼图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成直方图的XmlDataDocument(用于描述数据的分布情况)
+
+ 用于生成直方图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成排列图的XmlDataDocument(关键因素排列图)
+
+ 用于生成排列图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 准备生成趋势图的XmlDataDocument
+
+ 用于生成趋势图的XmlDataDocument
+ 成功返回true否则返回false
+
+
+
+ 通用函数,用于返回DataTable某一列数据的最大值和最小值
+
+ 数组中的第几列
+ 包含数据的数组
+ 得到数据的最大值
+ 得到数据的最小值
+
+
+
+ 通用函数,用于返回数组中某一列后的最大值和最小值
+
+ 数组中的第几列
+ 包含数据的数组
+ 得到数据的最大值
+ 得到数据的最小值
+
+
+
+ 用于数组排序的函数
+
+
+
+
+
+ 用于将Table中的数据按照某一列重新排序(该列的数据强制转换为double类型)
+
+
+
+
+
+ 通用函数,返回数组中最大值的函数
+
+ 传入的Double型的数组
+ 返回其最大值
+
+
+
+
+
+
+
+
+ XML document storing data for Draw Table
+ 用于绘制表格
+
+
+
+
+ 表格底色
+
+
+
+
+ 表格行宽度
+
+
+
+
+ 表格填写文本颜色
+
+
+
+
+ 字体高度
+
+
+
+
+ 字体
+
+
+
+
+ 表格线宽度
+
+
+
+
+ 表格线颜色
+
+
+
+
+ 画XR图的表
+
+ 数据
+ 没个样本的数据个数
+ 规格下限
+ 规格上限
+
+
+
+
+ 画XS图的表
+
+ 数据
+ 没个样本的数据个数
+ 规格下限
+ 规格上限
+
+
+
+
+ 画Cpk图的表
+
+
+
+
+
+
+
+ 画BarCpk图的表
+
+
+
+
+
+
+
+ 画BarCpk图的表
+
+
+
+
+
+
+
+ 观测值最大值
+
+ 子组观测值
+
+
+
+
+ 观测值最小值
+
+ 子组观测值
+
+
+
+
+ 画XR图的表
+
+ 数据
+ 没个样本的数据个数
+ 规格下限
+ 规格上限
+
+
+
+
+ 画XS图的表
+
+ 数据
+ 没个样本的数据个数
+ 规格下限
+ 规格上限
+
+
+
+
+ 画Cpk图的表
+
+
+
+
+
+
+
+ 画BarCpk图的表
+
+
+
+
+
+
+
+ 画BarCpk图的表
+
+
+
+
+
+
+
+ 计算各组数的和、均值和极差
+
+ 存所有数据的数据
+ 每组样本个数
+ 极差
+ 各组样本平均值
+ 各组样本和
+
+
+
+ 计算各组平均值的均值
+
+
+
+
+
+
+
+ 计算各组方差均值
+
+
+
+
+
+
+
+ 计算无偏稳态过程能力指数Cp
+
+
+
+
+
+
+
+
+
+ 计算有偏稳态过程能力指数Cpk
+
+
+
+
+
+
+
+ 计算Cpu
+
+
+
+
+
+
+
+
+ 计算Cpl
+
+
+
+
+
+
+
+
+ 计算无偏过程性能指数Pp
+
+
+
+
+
+
+
+
+
+ 计算有偏过程性能指数Ppk
+
+
+
+
+
+
+
+ 计算Ppu
+
+
+
+
+
+
+
+
+ 计算Ppl
+
+
+
+
+
+
+
+
+ 计算每个子组的标准差
+
+
+
+
+
+
+
+ 计算各组标准差均值
+
+
+
+
+
+
+
+ 计算各组数的和、均值和极差
+
+ 存所有数据的数据
+ 每组样本个数
+ 极差
+ 各组样本平均值
+ 各组样本和
+
+
+
+ 计算各组平均值的均值
+
+
+
+
+
+
+
+ 计算各组方差均值
+
+
+
+
+
+
+
+ 计算无偏稳态过程能力指数Cp
+
+
+
+
+
+
+
+
+
+ 计算有偏稳态过程能力指数Cpk
+
+
+
+
+
+
+
+ 计算Cpu
+
+
+
+
+
+
+
+
+ 计算Cpl
+
+
+
+
+
+
+
+
+ 计算无偏过程性能指数Pp
+
+
+
+
+
+
+
+
+
+ 计算有偏过程性能指数Ppk
+
+
+
+
+
+
+
+ 计算Ppu
+
+
+
+
+
+
+
+
+ 计算Ppl
+
+
+
+
+
+
+
+
+ 计算每个子组的标准差
+
+
+
+
+
+
+
+ 计算各组标准差均值
+
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 均值的小数点位数
+
+
+
+
+ 极差值的小数点位数
+
+
+
+
+ 图片的背景颜色
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 用于读写自定义的XML文件
+
+
+
+
+ 图形的名称
+
+
+
+
+ 图形名称的字体颜色
+
+
+
+
+ 图形名称的字体大小
+
+
+
+
+ 图形名称距图片上端的距离:横向距离是自动居中的
+
+
+
+
+ 坐标刻度文字的颜色
+
+
+
+
+ 图形的高度
+
+
+
+
+ 图形的宽度
+
+
+
+
+ 图形的上边距
+
+
+
+
+ 图形的下边距
+
+
+
+
+ 图形的左边距
+
+
+
+
+ 图形的右边距
+
+
+
+
+ 横坐标文本的颜色
+
+
+
+
+ 纵坐标文本的颜色
+
+
+
+
+ 横坐标文本的大小
+
+
+
+
+ 纵坐标文本的大小
+
+
+
+
+ 如果是数字,左侧纵坐标文本的小数点后位数
+
+
+
+
+ 图形的背景模式类型
+
+
+
+
+ 设定背景模式应用的范围
+
+
+
+
+ 图形的背景色
+
+
+
+
+ 渐变模式的第一种颜色
+
+
+
+
+ 渐变模式的第二种颜色
+
+
+
+
+ 只有种颜色时,用于调节渐变的程度
+
+
+
+
+ 应用阴影模式时的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 左右控制限的颜色
+
+
+
+
+ 中心控制限的颜色
+
+
+
+
+ 使用的线宽
+
+
+
+
+ 标记点的颜色
+
+
+
+
+ 标记点的形状代码
+
+
+
+
+ 标记点的尺寸
+
+
+
+
+ 是否有边框
+
+
+
+
+ 边框的颜色
+
+
+
+
+ 边框的线宽
+
+
+
+
+ 均值的小数点位数
+
+
+
+
+ 极差值的小数点位数
+
+
+
+
+ 图片的背景颜色
+
+
+
+
+ 反写入
+
+
+
+
+
+
+ 为画趋势图准备数据并返回趋势图
+
+
+
+
+
+
+ 绘制趋势图
+
+
+
+
+
+
+
+
+
+ 为画趋势图准备数据并返回趋势图
+
+
+
+
+
+
+ 绘制趋势图
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+ 平均值的精度
+
+
+
+
+ 极差值的精度
+
+
+
+
+ 图片背景颜色
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method will process the XML document containing the data and
+ store it in the appropriare format for use in drawing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置绘图系统变量
+ Y轴单位自动分格
+ m_iMaxYVal
+ m_iMaxXVal
+ wangdequan 20050614
+
+
+
+
+ Y轴单位自动分格 //应该进行修改根据图形的大小
+
+
+
+
+ 获得圆整后的间隔数据
+
+
+
+
+
+
+ 通过计算来决定横坐标文本的方向
+
+
+
+
+
+
+
+
+
+
+ 用于表示数据系列的直线的颜色
+
+
+
+
+ 用于表示中心限的直线的颜色
+
+
+
+
+ 用于表示上下控制限的直线的颜色
+
+
+
+
+ 用于表示线宽
+
+
+
+
+ 用于表示标记的颜色
+
+
+
+
+ 标记的形状代码
+
+
+
+
+ 标记的尺寸
+
+
+
+
+ 平均值的精度
+
+
+
+
+ 极差值的精度
+
+
+
+
+ 图片背景颜色
+
+
+
+
+
+
+
+
+
+
+ "title","chartdataisland_Id"
+
+
+
+
+ "chartdata","y","color","chartdata_Id","chartdataisland_Id"
+
+
+
+
+ "x","legend","x_Text","chartdata_Id"
+
+
+
+
+ Constructor to support serialization.
+ Constructor that supports serialization.
+ The SerializationInfo object to read from.
+ Information on who is calling this method.
+
+
+
+
+ 用XML构架文件创建符合绘制图表的DataSet表结构
+ 表名称:chartdataisland 字段名称 title、chartdataisland_Id
+ 表名称:chartdata 字段名称 y、color、chartdata_Id
+ 表名称:x 字段名称 legend、x_Text
+
+
+
+
+ xml构架文件文本,用来创建绘制图表数据XML数据的基本框架。
+
+
+
+
+
+ "title","chartdataisland_Id"
+
+
+
+
+ Constructor to support serialization.
+ Constructor that supports serialization.
+ The SerializationInfo object to read from.
+ Information on who is calling this method.
+
+
+
+
+ 用XML构架文件创建符合绘制图表的DataSet表结构
+ 表名称:chartdataisland 字段名称 title、chartdataisland_Id
+ 表名称:chartdata 字段名称 y、color、chartdata_Id
+ 表名称:x 字段名称 legend、x_Text
+
+
+
+
+ xml构架文件文本,用来创建绘制图表数据XML数据的基本框架。
+
+
+
+
+
+ Constructor to support serialization.
+ Constructor that supports serialization.
+ The SerializationInfo object to read from.
+ Information on who is calling this method.
+
+
+
+
+ 用XML构架文件创建符合绘制图表的DataSet表结构
+ 表名称:ChartParameter 字段名称
+
+
+
+
+ xml构架文件文本,用来创建绘制图表数据XML数据的基本框架。
+
+
+
+
+
diff --git a/MES_Manage/Bin/Aspose.Cells.dll b/MES_Manage/Bin/Aspose.Cells.dll
new file mode 100644
index 0000000..374abae
Binary files /dev/null and b/MES_Manage/Bin/Aspose.Cells.dll differ
diff --git a/MES_Manage/Bin/BasicData.dll b/MES_Manage/Bin/BasicData.dll
new file mode 100644
index 0000000..bbe75c9
Binary files /dev/null and b/MES_Manage/Bin/BasicData.dll differ
diff --git a/MES_Manage/Bin/BasicData.pdb b/MES_Manage/Bin/BasicData.pdb
new file mode 100644
index 0000000..a00fd3e
Binary files /dev/null and b/MES_Manage/Bin/BasicData.pdb differ
diff --git a/MES_Manage/Bin/DataLinkMesWork.dll b/MES_Manage/Bin/DataLinkMesWork.dll
new file mode 100644
index 0000000..861b06a
Binary files /dev/null and b/MES_Manage/Bin/DataLinkMesWork.dll differ
diff --git a/MES_Manage/Bin/DataLinkMesWork.pdb b/MES_Manage/Bin/DataLinkMesWork.pdb
new file mode 100644
index 0000000..cbbf2e7
Binary files /dev/null and b/MES_Manage/Bin/DataLinkMesWork.pdb differ
diff --git a/MES_Manage/Bin/DataLinkMesWork.xml b/MES_Manage/Bin/DataLinkMesWork.xml
new file mode 100644
index 0000000..912a2a8
--- /dev/null
+++ b/MES_Manage/Bin/DataLinkMesWork.xml
@@ -0,0 +1,4511 @@
+
+
+
+ DataLinkMesWork
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ type = 2 Insert
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ type = 4
+
+
+
+
+
+
+ type=5
+
+
+
+
+
+
+ 7 vue格式Excel 导入到创建并表中
+
+
+
+
+
+
+ 1001
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 1002
+ select * from Test where f1=@f1
+ [{\"name\":\"@f1\",\"value\":\"T002\"}]
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+ {"type":"1002","name":"select * from Test where f1=@f1 ","param":"[{\"name\":\"@f1\",\"value\":\"T002\"}]"}
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 分页查询
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+ 要分页显示的表名
+ 用于定位记录的主键(惟一键)字段,只能是单个字段
+ 查询条件
+ 以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ 以逗号分隔的排序字段列表,可以指定在字段后面指定DESC / ASC--用于指定排序顺序
+ 要显示的页码
+ 每页的大小(记录数)
+ 返回的结果表
+ 总页数
+ 数据总数
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 增删改 DbCallType2 的更新版 采用新协议 {"type":"12","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+
+
+
+
+ type = 2 Insert
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ type = 4
+
+
+
+
+
+
+ type=5
+
+
+
+
+
+
+ 7 vue格式Excel 导入到创建并表中
+
+
+
+
+
+
+ 1001
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 1002
+ select * from Test where f1=@f1
+ [{\"name\":\"@f1\",\"value\":\"T002\"}]
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+ {"type":"1002","name":"select * from Test where f1=@f1 ","param":"[{\"name\":\"@f1\",\"value\":\"T002\"}]"}
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 分页查询
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+ 要分页显示的表名
+ 用于定位记录的主键(惟一键)字段,只能是单个字段
+ 查询条件
+ 以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ 以逗号分隔的排序字段列表,可以指定在字段后面指定DESC / ASC--用于指定排序顺序
+ 要显示的页码
+ 每页的大小(记录数)
+ 返回的结果表
+ 总页数
+ 数据总数
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 增删改 DbCallType2 的更新版 采用新协议 {"type":"12","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+
+
+
+
+ type = 2 Insert
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ type = 4
+
+
+
+
+
+
+ type=5
+
+
+
+
+
+
+ 7 vue格式Excel 导入到创建并表中
+
+
+
+
+
+
+ 1001
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 1002
+ select * from Test where f1=@f1
+ [{\"name\":\"@f1\",\"value\":\"T002\"}]
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+ {"type":"1002","name":"select * from Test where f1=@f1 ","param":"[{\"name\":\"@f1\",\"value\":\"T002\"}]"}
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 分页查询
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+ 要分页显示的表名
+ 用于定位记录的主键(惟一键)字段,只能是单个字段
+ 查询条件
+ 以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ 以逗号分隔的排序字段列表,可以指定在字段后面指定DESC / ASC--用于指定排序顺序
+ 要显示的页码
+ 每页的大小(记录数)
+ 返回的结果表
+ 总页数
+ 数据总数
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 增删改 DbCallType2 的更新版 采用新协议 {"type":"12","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+
+
+ 通过执行SQL语句,查询数据库
+
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改。返回后面Select 参数 行数或自动编号
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 分页查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [Test]([f1],f2) VALUES(@f1,@f2)
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 插入数据,可以返回自动编号。存储过程增加 select @@identity
+
+
+
+
+
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+ 返回插入失败的原因
+
+
+
+
+ 根据条件,更新数据库
+
+ 被更新的表
+ 更改的字段与值对应表
+ 更改的字段与值对应表的条件
+
+
+
+
+ DELETE FROM TEST WHERE f1=@f1
+
+
+ WHERE f1=@f1 @f1,value
+
+
+
+
+ SELECT f1,f2 from test where f1=@f1 and f1=@f2
+
+
+ ParamData数组赋值(f1,value1),(f2,value2)
+
+
+
+
+
+
+ paramData: @tbname sysname, --要分页显示的表名
+ @fieldkey sysname, --用于定位记录的主键(惟一键)字段,只能是单个字段
+ @fieldshow nvarchar(1000), --以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ @fieldOrder nvarchar(1000), ----以逗号分隔的排序字段列表,可以指定在字段后面指定DESC/ASC --用于指定排序顺序
+ @PageCurrent int=1, --要显示的页码
+ @PageSize int=30, --每页的大小(记录数)
+ paramDataWhere: @where nvarchar(1000), --查询条件
+ @PageCount int OUTPUT, --总页数
+ @ItemCount int output --数据总数
+
+ tbname,fieldkey,fieldshow,fieldorder,pagecurrent,pagesize
+
+
+
+
+
+
+
+
+ 通过执行SQL语句,查询数据库
+
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改。返回后面Select 参数 行数或自动编号
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 分页查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [Test]([f1],f2) VALUES(@f1,@f2)
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 插入数据,可以返回自动编号。存储过程增加 select @@identity
+
+
+
+
+
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+ 返回插入失败的原因
+
+
+
+
+ 根据条件,更新数据库
+
+ 被更新的表
+ 更改的字段与值对应表
+ 更改的字段与值对应表的条件
+
+
+
+
+ DELETE FROM TEST WHERE f1=@f1
+
+
+ WHERE f1=@f1 @f1,value
+
+
+
+
+ SELECT f1,f2 from test where f1=@f1 and f1=@f2
+
+
+ ParamData数组赋值(f1,value1),(f2,value2)
+
+
+
+
+
+
+ paramData: @tbname sysname, --要分页显示的表名
+ @fieldkey sysname, --用于定位记录的主键(惟一键)字段,只能是单个字段
+ @fieldshow nvarchar(1000), --以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ @fieldOrder nvarchar(1000), ----以逗号分隔的排序字段列表,可以指定在字段后面指定DESC/ASC --用于指定排序顺序
+ @PageCurrent int=1, --要显示的页码
+ @PageSize int=30, --每页的大小(记录数)
+ paramDataWhere: @where nvarchar(1000), --查询条件
+ @PageCount int OUTPUT, --总页数
+ @ItemCount int output --数据总数
+
+ tbname,fieldkey,fieldshow,fieldorder,pagecurrent,pagesize
+
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 调数据库数据,并返回结果
+
+
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "ModularID": $("#ModularID").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+ ALTER PROCEDURE [dbo].[_日志_增加]
+ @UserID nvarchar(50)=null,
+ @子组件 nvarchar(50)=null,--vue 变量 ModularID
+ @TypeID nvarchar(50)=null,
+ @名称 nvarchar(200)=null,
+ @参数 nvarchar(max)=null
+
+ TypeID
+ 名称
+ 参数
+ UserID
+ 子组件
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 调数据库数据,并返回结果
+
+
+
+
+
+
+
+
+ 调数据库数据,并返回结果
+
+
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "ModularID": $("#ModularID").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "ModularID": $("#ModularID").val(), 子组件
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+
+ 子组件
+
+
+
+ "UserID": $("#UserID").val(),
+ "ModularID": $("#ModularID").val(), 子组件
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+
+ 子组件
+
+
+
+ ALTER PROCEDURE [dbo].[_日志_增加]
+ @UserID nvarchar(50)=null,
+ @子组件 nvarchar(50)=null,--vue 变量 ModularID
+ @TypeID nvarchar(50)=null,
+ @名称 nvarchar(200)=null,
+ @参数 nvarchar(max)=null
+
+ TypeID
+ 名称
+ 参数
+ UserID
+ 子组件
+
+
+
+ 通过执行SQL语句,查询数据库
+
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改。返回后面Select 参数 行数或自动编号
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 分页查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [Test]([f1],f2) VALUES(@f1,@f2)
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+
+ 插入数据,可以返回自动编号。存储过程增加 select @@identity
+
+
+
+
+
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+ 返回插入失败的原因
+
+
+
+
+ 根据条件,更新数据库
+
+ 被更新的表
+ 更改的字段与值对应表
+ 更改的字段与值对应表的条件
+
+
+
+
+ DELETE FROM TEST WHERE f1=@f1
+
+
+ WHERE f1=@f1 @f1,value
+
+
+
+
+ SELECT f1,f2 from test where f1=@f1 and f1=@f2
+
+
+ ParamData数组赋值(f1,value1),(f2,value2)
+
+
+
+
+
+
+ paramData: @tbname sysname, --要分页显示的表名
+ @fieldkey sysname, --用于定位记录的主键(惟一键)字段,只能是单个字段
+ @fieldshow nvarchar(1000), --以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ @fieldOrder nvarchar(1000), ----以逗号分隔的排序字段列表,可以指定在字段后面指定DESC/ASC --用于指定排序顺序
+ @PageCurrent int=1, --要显示的页码
+ @PageSize int=30, --每页的大小(记录数)
+ paramDataWhere: @where nvarchar(1000), --查询条件
+ @PageCount int OUTPUT, --总页数
+ @ItemCount int output --数据总数
+
+ tbname,fieldkey,fieldshow,fieldorder,pagecurrent,pagesize
+
+
+
+
+
+
+
+
+ UPDATE Test SET [f1] = @f1,[f2] = @f2,[f3] = @f3 WHERE f1=@ff1 and f2=@ff2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01,02,03,04,05,06,07,08,09,10
+
+ public string connType = "";
+
+
+
+
+
+ type = 2 Insert
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ Type = 3
+
+
+
+
+
+
+ type = 4
+
+
+
+
+
+
+ type=5
+
+
+
+
+
+
+ 7 vue格式Excel 导入到创建并表中
+
+
+
+
+
+
+ 1001
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 1002
+ select * from Test where f1=@f1
+ [{\"name\":\"@f1\",\"value\":\"T002\"}]
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+ {"type":"1002","name":"select * from Test where f1=@f1 ","param":"[{\"name\":\"@f1\",\"value\":\"T002\"}]"}
+
+
+
+
+
+
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11 存储过程方式查询
+ 查询 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+
+
+
+
+
+ 分页查询
+ "UserID": $("#UserID").val(),
+ "Type": $("#TYPE").val(),
+ "Name": $("#NAME").val(),
+ "Param": $("#PARAM1value").val(),
+ "Pagination": $("#Pagination").val(),
+ HasReturn: $("#HASRETURN").get(0).checked
+
+ 要分页显示的表名
+ 用于定位记录的主键(惟一键)字段,只能是单个字段
+ 查询条件
+ 以逗号分隔的要显示的字段列表,如果不指定,则显示所有字段
+ 以逗号分隔的排序字段列表,可以指定在字段后面指定DESC / ASC--用于指定排序顺序
+ 要显示的页码
+ 每页的大小(记录数)
+ 返回的结果表
+ 总页数
+ 数据总数
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 增删改 DbCallType2 的更新版 采用新协议 {"type":"12","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+
+
+ Unicode解码
+
+
+
+
+
+
+ 返回输出参数类型
+
+
+
+
+
+
+
+ 返回输出参数类型
+
+
+
+
+
+
+
+ 根据结构数组变量,获得对应Json字符串
+
+
+
+
+
+
+
+
+ 根据表结构数组变量,获得对应Json字符串
+
+
+
+
+
+
+
+
+ 根据结构数组变量,获得对应Json字符串
+
+
+
+
+
+
+ 根据表结构数组变量,获得对应Json字符串
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 变量名称
+
+
+
+
+ 变量值
+
+
+
+
+ 是否选择
+
+
+
+
+ 逻辑操作 > = !=
+
+
+
+
+
+ 观测值最大值
+
+ 子组观测值
+
+
+
+
+ 观测值最小值
+
+ 子组观测值
+
+
+
+
+ Helper method which rounds specified axsi interval.
+
+ Calculated axis interval.
+ Rounded axis interval.
+
+
+
+ 提供通用的调用存储过程的方法(不需要返回查询的记录集的调用)
+
+ 存储过程名称
+ 连库字符串
+ 存储过程参数数组
+ 错误信息
+
+
+
+
+ 执行查询类SQL语言
+
+
+
+
+ 查询 DbCallType1 的更新版 采用新协议 例:{"type":"11","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+ Unicode解码
+
+
+
+
+
+
+ 返回输出参数类型
+
+
+
+
+
+
+
+ 增删改 DbCallType2 的更新版 采用新协议 {"type":"12","name":"存储过程","param":"[{\"name\":\"name1\",\"value\":\"value1\"},{\"name\":\"name2\",\"value\":\"value1\"}]"}
+
+
+
+
+ Unicode解码
+
+
+
+
+
+
+ 返回输出参数类型
+
+
+
+
+
+
+
+ Determines whether the json contains an element that has the specified key.
+
+ The key to locate in the json.
+ true if the json contains an element that has the specified key; otherwise, false.
+
+
+
+ 测试注册信息
+
+
+
+
+ 1: 用于服务器
+ 0:用于客户端
+
+
+
+
+ 比较注册码
+ 读取计算机序列号,计算授权号,与注册表比较;相等返回成功
+
+
+
+
+
+ 兼容
+
+
+
+
+
+
+ 根据序列号,获得注册码
+
+
+
+
+
+
+ 获得序列号
+
+
+
+
+ String返回Hash
+
+
+
+ 获取硬盘唯一序列号(不是卷标号),可能需要以管理员身份运行程序
+
+
+
+
+
+ 从配置文件获得注册序列号
+
+
+
+
+
+ 数据访问类——提供通用的数据访问方法
+
+
+ ���ݷ����ࡪ���ṩͨ�õ����ݷ��ʷ���
+
+
+
+
+ 执行标准SQL查询语句,返回记录集
+
+ 标准SQL查询语句
+ 连库字符串
+ 查询结果记录集
+
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 执行标准SQL查询语句,返回记录集
+
+ 标准SQL查询语句
+ 连库字符串
+ 查询结果记录集
+ 参数
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 用于 Excel Access
+ 执行标准SQL语句,不要求返回结果,适合(增、删、改)
+
+ 标准SQL语句
+ 连库字符串
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 用于 Excel Access
+ 执行标准SQL语句集合,不要求返回结果,适合(增、删、改)
+
+
+
+
+
+
+
+
+ 用于 Excel Access
+ 执行标准SQL查询语句,返回记录集
+
+ 标准SQL查询语句
+ 连库字符串
+ 查询结果记录集
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 执行标准SQL查询语句,返回记录集
+
+ 标准SQL查询语句
+ 连库字符串
+ 查询结果记录集
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 执行标准SQL查询语句,返回记录集
+
+ 标准SQL查询语句
+ 连库字符串
+ 查询结果记录集
+ 错误信息
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 返回符合条件的记录行数
+
+
+
+
+
+
+
+
+
+ 增加记录,同时返回自动编号
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ���������������������Json�ַ���
+
+
+
+
+
+
+
+ SqlServer����״̬
+ =true ��������
+ =false ����ʧ��
+
+
+
+
+ SqlServer����״̬
+ =true ��������
+ =false ����ʧ��
+
+
+
+
+ ���������ݵ�����
+ SqlServer����״̬
+ =true ��������
+ =false ����ʧ��
+
+
+
+
+
+ ���������ݵ�����
+ SqlServer����״̬
+ =true ��������
+ =false ����ʧ��
+
+
+
+
+
+ ִ�б�SQL��䣬��Ҫ�ؽ�����ʺϣ�����ɾ���ģ�
+
+ ��SQL���
+ �����ַ���
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ ִ��SQL���ʵ��Insert Update Delete ����
+
+
+
+
+
+
+
+
+ ִ��SQL���ص�һ�У���һ�еĽ��
+
+
+
+
+
+
+
+
+
+ ִ�б�SQL��ѯ��䣬���ؼ�¼��
+
+ ��SQL��ѯ���
+ �����ַ���
+ ��ѯ�����¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ ִ�б�SQL��ѯ��䣬���ؼ�¼��
+
+ ��SQL��ѯ���
+ �����ַ���
+ ��ѯ�����¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ ִ�б�SQL��ѯ��䣬���ؼ�¼��
+
+ ��SQL��ѯ���
+ �����ַ���
+ ��ѯ�����¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ�������Ҫ���ز�ѯ�ļ�¼���ĵ��ã�
+
+ �洢��������
+ �����ַ���
+ �洢���̲�������
+ �洢�������淵�صļ�¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ�������Ҫ���ز�ѯ�ļ�¼���ĵ��ã�
+
+ �洢��������
+ �����ַ���
+ ���俪ʼ�Ĵ��㿪ʼ�ļ�¼��
+ Ҫ����������¼��
+ �洢���̲�������
+ �洢�������淵�صļ�¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ���������Ҫ���ز�ѯ�ļ�¼���ĵ��ã�
+
+ �洢��������
+ �����ַ���
+ �洢���̲�������
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ�������Ҫ���ز�ѯ�ļ�¼���ĵ��ã�
+
+ �洢��������
+ �����ַ���
+
+ �洢�������淵�صļ�¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ�������Ҫ���ز�ѯ�ļ�¼���ĵ��ã�
+
+ �洢��������
+ �����ַ���
+
+ �洢�������淵�صļ�¼��
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ Insert Delete Update 带参数的Sql语句 1001
+ 无返回值
+
+
+
+
+
+
+
+
+ Insert Delete Update 带参数的Sql语句 1001
+ 无返回值
+
+
+
+
+
+
+
+
+
+ Insert Delete Update 带参数的Sql语句 1003
+ 无返回值
+
+
+
+
+
+
+
+
+
+ Select 带参数的Sql语句 1002
+ 无返回值
+
+
+
+
+
+
+
+
+
+ 执行SQL语句,增、删、改,无返回
+
+
+
+
+
+
+
+
+ 执行SQL语句,查询,返回表
+
+
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+
+
+ Select 带参数的Sql语句
+ 无返回值
+
+
+
+
+
+
+
+
+
+ �Ա����ʽ�������ݵ����ݿ�
+
+
+
+
+
+
+
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ������������ݵ����ݱ�ĵ����ݿ�ĵ��ã�
+
+ �洢��������
+ �����ַ���
+ �洢���̲�������
+ �������ݵ����ݱ�
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ �ṩͨ�õĵ��ô洢���̵ķ������������ݣ�
+
+ �洢��������
+ �����ַ���
+ �洢���̲�������
+ �������ݵ����ݱ�
+ ������Ϣ
+ ����ֵ��true��ʾ��ִ�гɹ���false��ʾִ��ʧ��
+
+
+
+ ���Ӽ�¼�����Զ����
+
+
+
+
+
+
+
+
+
+
+
+
+ 更新Access数据
+
+
+
+
+
+
+
+
+ 增加Access数据
+
+
+
+
+
+
+
+
+
+ 用于 Access
+ 执行标准SQL语句,不要求返回结果,适合(增、删、改)
+
+
+ Excel Access文件
+
+
+
+
+ 用于 Excel Access
+ 执行标准SQL查询语句,返回记录集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 根据Access文件名称获得Access连接字符串
+
+
+
+
+
+
+ 用于 Access
+ 执行标准SQL语句,不要求返回结果,适合(增、删、改)
+
+
+
+
+
+
+
+ 用于 Access
+ 执行标准SQL语句,不要求返回结果,适合(增、删、改)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于 Access
+ 执行标准SQL查询语句,返回记录集
+
+
+
+
+
+
+
+ 返回count
+
+
+
+
+
+
+
+ 返回count
+
+
+
+
+
+
+
+
+ 增加Access数据
+
+
+
+
+
+
+
+
+ 执行Insert 命令,同时返回自动编号
+ 保存到Access数据库
+
+
+
+
+
+
+ 执行Insert 命令,同时返回自动编号
+
+
+
+
+
+
+
+ 创建增加数据用表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 获取EXCEL的表 表名字列
+
+ Excel文件
+ 数据表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 执行指定Sql 语句,返回所影响的行数。
+
+ 拼接出来的SQL语句。
+
+ 返回所影响的记录条数
+ ErrorMessage
+ True / False
+
+
+
+ 执行指定插入 Sql 语句,返回当前记录的新ID。
+
+ 拼接出来的SQL语句。
+
+
+ 返回当前记录的新ID
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 根据输入参数,对指定表进行分页显示
+
+ 要进行分页的表/视图的名称
+
+ 表或者视图的主键
+ 进行过滤的条件
+ 需要显示的字段名称
+ 排序的条件,直接输入字段名 +desc/asc,例如id desc,name asc
+ 当前页的页码
+ 每一页的显示的数据量
+ 返回页码总数
+ 返回数据总数
+
+ 返回错误
+ True / False
+
+
+
+ 根据输入参数,对指定表进行分页显示
+
+ 要进行分页的表/视图的名称
+ 表或者视图的主键
+ 表或者视图的主键
+ 进行过滤的条件
+ 需要显示的字段名称
+ 排序的条件,直接输入字段名 +desc/asc,例如id desc,name asc
+ 排序的条件,直接输入字段名 +desc/asc,例如id desc,name asc
+ 当前页的页码
+ 每一页的显示的数据量
+ 返回页码总数
+ 返回数据总数
+
+ 返回错误
+ True / False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提供通用的调用存储过程的方法(增加数据的数据表的到数据库的调用)
+
+ 存储过程名称
+ 存储过程参数数组
+ 增加数据的数据表
+
+
+
+
+ 提供通用的调用存储过程的方法(增加数据的数据表的到数据库的调用)
+
+ 存储过程名称
+ 存储过程参数数组
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 提供通用的调用存储过程的方法(增加数据的数据表的到数据库的调用)
+
+
+
+
+
+
+
+ 执行带参数的存储过程
+
+
+
+
+
+
+
+
+ 获得Excel连接
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 增加Excel数据
+
+
+
+
+
+
+
+
+
+ 用于 Excel Access
+ 执行标准SQL语句,不要求返回结果,适合(增、删、改)
+
+
+ Excel Access文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于 Excel Access
+ 执行标准SQL查询语句,返回记录集
+
+
+
+
+
+
+
+
+
+ 增加SqlServer数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提供通用的调用存储过程的方法(更新数据)
+
+ 存储过程名称
+ 存储过程参数数组
+ 增加数据的数据表
+ 布尔值,true表示该执行成功,false表示执行失败
+
+
+
+ 直接执行制定SQL语句.用于无返回条件的SQL语句执行,Insert ,delete update等。
+
+
+ 成功返回True / 失败返回False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 直接执行制定SQL语句.用于无返回条件的SQL语句执行,Insert ,delete update等。
+
+
+
+
+ 成功返回True / 失败返回False
+
+
+
+ 增加记录后,返回自动编号
+
+
+
+
+
+
+
+ 执行指定SQL语句,用于执行查询后返回记录集
+
+
+
+ 返回记录集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 测试与数据的连接线程
+
+
+
+
+ 测试与数据的连接
+
+
+
+
+
+ 测试与数据的连接
+
+
+
+
+
+ ApplicationConfig 的摘要说明。
+ 获得应用程序配置文件基本参数
+
+
+
+
+ 授权用-数据库连接字符串
+
+
+
+
+ BarCode UDP 通讯用
+
+
+
+
+ 0普通工位)(1正常上线)(2正常下线)(3返修上线)(4返修下线)
+
+
+
+
+ 照相工位工位号
+
+
+
+
+ 后盖涂胶照相工位图片地址
+
+
+
+
+ 照相工位图片地址
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41130
+
+
+
+
+ 0普通工位)(1正常上线)(2正常下线)(3返修上线)(4返修下线)
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41130
+
+
+
+
+ 1 启用;2 不启用
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41130
+
+
+
+
+ UDP数据广播端口号 MES接受关机信息 41130
+
+
+
+
+ UDP数据广播端口号 MES接受关机信息 41130
+
+
+
+
+ MES_ServerIP
+
+
+
+
+ 端口号
+
+
+
+
+ 41101 接收监控系统的UDP信息
+
+
+
+
+ 接收MesServer的UDP信息
+
+
+
+
+ 41103 发送给MesServer的UDP信息
+
+
+
+
+ 41104 接收扫描枪的UDP信息
+
+
+
+
+ --0010 信息管理数据库连接-->
+ 与MES"信息管理数据库"连接字符串
+
+
+
+
+ --0010 信息管理数据库连接-->
+ 与MES"信息管理数据库"连接字符串
+
+
+
+
+ 与"MES信息管理数据库"连接字符串
+ --0020 MES信息管理数据库连接-->
+
+
+
+
+ MES信息管理Access数据库连接
+ --0030 MES信息管理Access数据库连接-->
+
+
+
+
+ MES信息管理Access数据库连接
+ --0032 MES信息管理Access数据库连接,总线上线工位-->
+
+
+
+
+ MES信息管理Access数据库连接
+ --0030 MES信息管理Access数据库连接,用来查询物料追踪信息-->
+
+
+
+
+ =1 以演示方式运行 =0 以实际情况运行
+ --0040 =1 以演示方式运行 =0 以实际情况运行-->
+
+
+
+
+ MES信息管理工位号
+ --0050 MES信息管理工位号 工作工位--
+
+
+
+
+ MES信息管理工位号(需要返修的工位)
+ --0050 MES信息管理工位号 工作工位--
+
+
+
+
+ MES信息管理工位号
+ --0050 MES信息管理工位号 工作工位--
+
+
+
+
+ MES信息管理工位号
+ --0050 工位所在线体类型:1分装线;2:总装线;3:测试线--
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ ( =0 以独立实例方式运行) (=1 以多实例方式运行)
+
+
+
+
+ PLC发送零件返修时,是否显示填写返修原因对话框 0 不显示 1 显示
+
+
+
+
+ PLC发送零件返修时,是否显示填写返修原因对话框 0 不显示 1 显示
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -- 监控系统各个工位的机床图片路径
+
+
+
+
+ 监控系统各个工位的机床图片路径
+
+
+
+
+ -- 指南工位号
+
+
+
+
+ 虚拟物料号
+
+
+
+
+ 0051 MES信息管理工位号 被监测工位
+
+
+
+
+ 保存缸盖验证数据文件
+
+
+
+
+ 0052 总线缸盖上线工位
+ 0052 总线活塞连杆上线工位
+ 0052 总线飞轮上线工位
+
+
+
+
+ 0053 用来查询物料追踪信息-->
+ 0053 分线缸盖上线工位,用来查询物料追踪信息-->
+ 0053 分线活塞连杆上线工位,用来查询物料追踪信息-->
+ 0053 分线分线飞轮上线工位,用来查询物料追踪信息-->
+
+
+
+
+ 首选扫描枪
+ COM端口名称 用来连接条码扫描枪
+ --0070 COM端口名称 用来连接条码扫描枪 -->
+
+
+
+
+ COM端口名称 用来连接条码扫描枪
+
+
+
+
+ COM端口名称 用来连接条码扫描枪
+ --0070 COM端口名称 用来连接条码扫描枪-->
+
+
+
+
+ 第二把扫描枪
+ COM端口名称 用来连接条码扫描枪
+ 固定扫描枪
+
+
+
+
+ 首选扫描枪
+ 扫描枪类型
+ 条码扫描枪类型( 1 手持)( 2 固定)
+
+
+
+
+ 条码扫描枪类型( 1 手持)( 2 固定)
+
+
+
+
+ 第二把扫描枪
+ 扫描枪类型
+ 条码扫描枪类型( 1 手持)( 2 固定)
+
+
+
+
+ 条码扫描枪类型( 1 手持)( 2 固定)
+
+
+
+
+ (2 条码有\r\n的情况,去掉条码的\r\n)
+
+
+
+
+ (2 条码有\r\n的情况,去掉条码的\r\n)
+
+
+
+
+ (2 条码有\r\n的情况,去掉条码的\r\n)
+
+
+
+
+ (2 条码有\r\n的情况,去掉条码的\r\n)
+
+
+
+
+ (0 只有一个工位)(1有两个工位,扫描枪共享)
+
+
+
+
+ (0 只有一个工位)(1有两个工位,扫描枪共享)
+
+
+
+
+ (1 有缺省物料验证)(0 无缺省物料验证)
+
+
+
+
+ (1 有缺省物料验证)(0 无缺省物料验证)
+
+
+
+
+ 是缸盖备用上线工位 MES信息管理Access数据库连接
+
+
+
+
+ 是缸盖备用上线工位 MES信息管理Access数据库连接
+
+
+
+
+ (1 有缺省物料验证)(0 无缺省物料验证)
+
+
+
+
+ (1 有缺省物料验证)(0 无缺省物料验证)
+
+
+
+
+ (0 现场监控,显示监控画面与PLC同步)(1 通过订阅读取数据库服务器数据显示监控画面)
+
+
+
+
+ (0 现场监控,显示监控画面与PLC同步)(1 通过订阅读取数据库服务器数据显示监控画面)
+
+
+
+
+ (0 与数据库通讯通过C/S方式实现[通过订阅读取数据库服务器数据显示监控画面])
+ (1 与数据库通讯通过WebService方式实现[通过订阅读取数据库服务器数据显示监控画面])
+
+
+
+
+ (0 与数据库通讯通过C/S方式实现[通过订阅读取数据库服务器数据显示监控画面])
+ (1 与数据库通讯通过WebService方式实现[通过订阅读取数据库服务器数据显示监控画面])
+
+
+
+
+ 1 OpcXml 服务器
+
+
+
+
+ 1 OpcXml 服务器
+
+
+
+
+ 0081 机床类型 A自动机床 M手动机床 S半自动 T检测-->
+
+
+
+
+ 0082 线体类型 机体预装线 飞轮壳分装线 清洗分装线 飞轮分装线 零部件装线 AUDIT区 活塞分装线 缸盖分装线 内装线 外装线 输送线-->
+
+
+
+
+ 工位类型 A自动机床 M手动机床 S半自动 T检测 F 上线工位 X 下线工位
+ --0090 工位类型 A自动机床 M手动机床 S半自动 T检测 -->
+ --0090 F 上线工位-->
+ --0090 F1 缸体上线工位 -->
+ --0090 F2 缸盖上线工位-->
+ --0090 F3 活塞连杆上线工位-->
+ --0090 F4 飞轮上线工位-->
+ --0090 F5 缸体线外上线工位(数据不写入MOBY,写入Access数据库,打印追踪码) 天津雷沃-->
+ --0090 F6 缸体线外扫描上线工位(读Access数据库,数据写入MOBY) 天津雷沃-->
+ --0090 X 下线工位 X1 缸体下线工位 X2 缸盖下线工位 X3 活塞连杆下线工位 X4 飞轮下线工位-->
+
+
+
+
+ --0100 =超级密码-->
+
+
+
+
+ 字节间隔最大时间
+
+
+
+
+ 班组长工号
+
+
+
+
+ 班组长工号
+
+
+
+
+ 订阅数据时间报警
+
+
+
+
+ 订阅数据时间报警
+
+
+
+
+ 订阅数据时间发动机号
+
+
+
+
+ 订阅数据时间发动机号
+
+
+
+
+ 订阅数据时间MES心跳
+
+
+
+
+ 订阅数据时间MES心跳
+
+
+
+
+ 订阅数据时间机床状态
+
+
+
+
+ 订阅数据时间机床状态
+
+
+
+
+ 订阅数据时间托盘位置
+
+
+
+
+ 订阅数据时间托盘位置
+
+
+
+
+ 订阅数据时间工位状态
+
+
+
+
+ 订阅数据时间工位状态
+
+
+
+
+ 订阅数据时间工位状态
+
+
+
+
+ 订阅数据时间物料呼叫,故障呼叫,延时警告
+
+
+
+
+ --0110 读超时,即在1000内未读到数据就引起超时异常-->
+ 读超时,即在1000内未读到数据就引起超时异常
+
+
+
+
+ --0120 设置串口读放弃时间-->
+ 设置串口读放弃时间
+
+
+
+
+ --0130 字节间隔最大时间-->
+ 字节间隔最大时间
+
+
+
+
+ --0140 追踪文件 -->
+ 跟踪文件
+
+
+
+
+ --0170 OPC 服务器 空时,表示当前计算机
+
+
+
+
+ --0170 OPC 服务器 空时,表示当前计算机
+
+
+
+
+ --0180 主物料号
+
+
+
+
+ 虚拟物料号
+
+
+
+
+ --0190 工件类型
+
+
+
+
+ 工件类型
+
+
+
+
+ --0190 工件类型
+
+
+
+
+ 工件类型
+
+
+
+
+ 生产线设备目标循环时间,单位:秒
+
+
+
+
+ 生产线设备目标循环时间,单位:秒
+
+
+
+
+ --0190 工件类型
+
+
+
+
+ 工件类型
+
+
+
+
+ 工位指导网络共享路径
+
+
+
+
+ 工位指导网络共享路径
+
+
+
+
+ ("1"存在MES,可以显示各个工位MES状态) ("0"不存在MES,无法显示各个工位MES状态)
+
+
+
+
+ ("1"存在MES,可以显示各个工位MES状态) ("0"不存在MES,无法显示各个工位MES状态)
+
+
+
+
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ ("1"通过监控系统MIS保存机床状态数据) ("0"不通过监控系统MIS保存机床状态数据)
+
+
+
+
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ ("1"通过监控系统MIS保存机床报警数据) ("0"不通过监控系统MIS保存机床报警数据)
+
+
+
+
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ ("1"通过监控系统MIS保存机床报警数据) ("0"不通过监控系统MIS保存机床报警数据)
+
+
+
+
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 缺料呼叫
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ 缺料呼叫
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ 缺料呼叫
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ 缺料呼叫
+ ("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ 故障呼叫
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 故障呼叫
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 故障呼叫
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 故障呼叫
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 延时警告
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ 延时警告
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ ("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ [测量数据_监控系统_通讯状态]("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ [测量数据_监控系统_通讯状态]("1"通过监控系统MIS保存数据) ("0"不通过监控系统MIS保存数据)
+
+
+
+
+ [测量数据_监控系统_通讯状态]("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ [测量数据_监控系统_通讯状态]("1"通过MES保存数据) ("0"不通过MES保存数据)
+
+
+
+
+ Andon图片背景颜色物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片背景颜色物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片边缘宽度物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片边缘宽度物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片字体尺寸B R M 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片字体尺寸B R M 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称字体尺寸 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称字体尺寸 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片宽度 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片宽度 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片高度 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片高度 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片B R M的文字位置X坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片B R M的文字位置X坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片B R M的文字位置Y坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片B R M的文字位置Y坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称的文字位置X坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称的文字位置X坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称的文字位置Y坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片工位名称的文字位置Y坐标 物料呼叫,故障呼叫,延时警告
+
+
+
+
+ listView能容纳的图形数量 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ listView能容纳的图形数量 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ 改变ListView项目间的横向距离X 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ 改变ListView项目间的横向距离X 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ 改变ListView项目间的纵向距离V 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ 改变ListView项目间的纵向距离V 缺料呼叫,故障呼叫,延时警告
+
+
+
+
+ Andon图片颜色 缺料呼叫
+
+
+
+
+ Andon图片颜色 缺料呼叫
+
+
+
+
+ Andon图片颜色 故障呼叫
+
+
+
+
+ Andon图片颜色 故障呼叫
+
+
+
+
+ Andon图片颜色 延时警告
+
+
+
+
+ Andon图片颜色 延时警告
+
+
+
+
+ Andon图片文字 缺料呼叫
+
+
+
+
+ Andon图片文字 缺料呼叫
+
+
+
+
+ Andon图片文字 故障呼叫
+
+
+
+
+ Andon图片文字 故障呼叫
+
+
+
+
+ Andon图片文字 延时警告
+
+
+
+
+ Andon图片文字 延时警告
+
+
+
+
+ (1:只显示生产量信息;2:只显示Andon信息;)
+ (3:交替循环显示生产量信息和Andon信息;)
+ (4:当有Andon信息产生时,持续一段时间显示Andon信息,之后继续现实生产量信息)
+
+
+
+
+ (1:只显示生产量信息;2:只显示Andon信息;)
+ (3:交替循环显示生产量信息和Andon信息;)
+ (4:当有Andon信息产生时,持续一段时间显示Andon信息,之后继续现实生产量信息)
+
+
+
+
+ 交替循环显示生产量持续显示时间
+
+
+
+
+ 交替循环显示生产量持续显示时间
+
+
+
+
+ 交替循环显示Andon持续显示时间
+
+
+
+
+ 交替循环显示Andon持续显示时间
+
+
+
+
+ 触发方式显示Andon持续显示时间
+
+
+
+
+ 触发方式显示Andon持续显示时间
+
+
+
+
+ 触发方式显示Andon持续显示时间
+
+
+
+
+ 触发方式显示Andon持续显示时间
+
+
+
+
+ (触发方式显示生产量信息持续显示时间5)
+
+
+
+
+ (触发方式显示生产量信息持续显示时间5)
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41101
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41101
+
+
+
+
+ UDP数据广播端口号 发动机上线打印机 41102
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41102
+
+
+
+
+ UDP数据广播端口号 发动机下线打印机 41103
+
+
+
+
+ UDP数据广播端口号 发动机下线打印机 41103
+
+
+
+
+ UDP数据广播端口号 LED大屏幕显示发动机上线下线生产量信息 41104
+
+
+
+
+ UDP数据广播端口号 LED大屏幕显示发动机上线下线生产量信息 41104
+
+
+
+
+ UDP数据广播端口号 LED大屏幕现实Andon信息 41105
+
+
+
+
+ UDP数据广播端口号 LED大屏幕现实Andon信息 41105
+
+
+
+
+ UDP数据广播端口号 MES系统打印缸盖号 41106
+
+
+
+
+ UDP数据广播端口号 MES系统打印缸盖号 41106
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41107
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41107
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41108
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41108
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41109
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41109
+
+
+
+
+ UDP数据广播端口号 监控通讯状态 41199
+
+
+
+
+ UDP数据广播端口号 监控通讯状态 41199
+
+
+
+
+ UDP数据广播端口号 41110
+
+
+
+
+ UDP数据广播端口号 41110
+
+
+
+
+ UDP数据广播端口号 41111
+
+
+
+
+ UDP数据广播端口号 41111
+
+
+
+
+ UDP数据广播端口号 41112
+
+
+
+
+ UDP数据广播端口号 41112
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41113
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41113
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41114
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41114
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41101
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41101
+
+
+
+
+ UDP数据广播端口号 发动机上线打印机 41102
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41102
+
+
+
+
+ UDP数据广播端口号 发动机下线打印机 41103
+
+
+
+
+ UDP数据广播端口号 发动机下线打印机 41103
+
+
+
+
+ UDP数据广播端口号 LED大屏幕显示发动机上线下线生产量信息 41104
+
+
+
+
+ UDP数据广播端口号 LED大屏幕显示发动机上线下线生产量信息 41104
+
+
+
+
+ UDP数据广播端口号 LED大屏幕现实Andon信息 41105
+
+
+
+
+ UDP数据广播端口号 LED大屏幕现实Andon信息 41105
+
+
+
+
+ UDP数据广播端口号 MES系统打印缸盖号 41106
+
+
+
+
+ UDP数据广播端口号 MES系统打印缸盖号 41106
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41107
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41107
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41108
+
+
+
+
+ UDP数据广播端口号 MES向服务器呼叫 41108
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41109
+
+
+
+
+ UDP数据广播端口号 MES机收服务器呼叫 41109
+
+
+
+
+ UDP数据广播端口号 (1是监控通讯状态)(0不监控通讯状态) 41199
+
+
+
+
+ UDP数据广播端口号 (1是监控通讯状态)(0不监控通讯状态) 41199
+
+
+
+
+ UDP数据广播端口号 41110
+
+
+
+
+ UDP数据广播端口号 41110
+
+
+
+
+ UDP数据广播端口号 41111
+
+
+
+
+ UDP数据广播端口号 41111
+
+
+
+
+ UDP数据广播端口号 41112
+
+
+
+
+ UDP数据广播端口号 41112
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41113
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41113
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41114
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41114
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ 用于保存数据完成打印
+ 用于MES程序和打印机程序。用于配置打印机程序通讯端口(41101 41102 41103)
+
+
+
+
+ 用于保存数据完成打印
+ 用于MES程序。用于配置打印机程序通讯端口(41101 41102 41103)
+
+
+
+
+ 用于保存数据完成打印
+ 用于MES程序。MES是否向打印机发送打印信号及被打印的“发动机号”
+
+
+
+
+ 用于保存数据完成打印
+ 用于MES程序。MES是否向打印机发送打印信号及被打印的“发动机号”
+
+
+
+
+ 用于发动机号或缸盖号扫描完成打印 EngineGetOver = 1
+ 用于MES程序和打印机程序。用于配置打印机程序通讯端口(41101 41102 41103)
+
+
+
+
+ 用于发动机号或缸盖号扫描完成打印 EngineGetOver = 1
+ 用于MES程序。用于配置打印机程序通讯端口(41101 41102 41103)
+
+
+
+
+ 用于发动机号或缸盖号扫描完成打印 EngineGetOver = 1
+ 用于MES程序。MES是否向打印机发送打印信号及被打印的“发动机号”
+
+
+
+
+ 用于发动机号或缸盖号扫描完成打印 EngineGetOver = 1
+ 用于MES程序。MES是否向打印机发送打印信号及被打印的“发动机号”
+
+
+
+
+ 用于MES程序。MES是否向LED大屏幕显示程序打印机发送显示更新信号
+
+
+
+
+ 用于MES程序。工位上下线类型(0普通工位)(1正常上线)(2正常下线)(3返修上线)(4返修下线)
+
+
+
+
+ 用于MES程序和配置LED大屏幕显示程序 生产量通讯端口(41104)
+
+
+
+
+ 用于MES程序和配置LED大屏幕显示程序 生产量通讯端口(41104)
+
+
+
+
+ 用于MES程序。MES是否向LED大屏幕显示程序打印机发送显示更新信号Port_ShowLED_OpType
+
+
+
+
+ 用于MES程序。大屏幕显示的数据来源。
+ 对应表[发动机产量显示到大屏]字段“大屏幕代码”
+
+
+
+
+ 用于MES程序。MES是否向LED大屏幕显示程序发送显示更新信号
+
+
+
+
+ 用于MES程序。MES是否向LED大屏幕显示程序发送显示更新信号
+
+
+
+
+ 用于配置LED大屏幕显示程序 Andon信息(41105)
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ 用于配置LED大屏幕显示程序 Andon信息(41105)
+
+
+
+
+ 用于配置LED大屏幕显示程序 Andon信息(41105)
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ UDP数据广播端口号 缸盖打印机 41115
+
+
+
+
+ "1"仅用于IsUsingUdpMonitor。主要影响Send和Receive通讯模块
+
+
+
+
+ "1"仅用于IsUsingUdpMonitor。主要影响Send和Receive通讯模块
+
+
+
+
+ ////////////////////////////////////////
+
+
+
+
+ 测试与信息管理系统连接-数据库连接字符串
+ 业务规则:如果PIS_NEW=1,原先连接正常,测试连接
+ 业务规则:如果PIS_NEW=0,原先连接不正常,不进行测试连接,
+ 信息管理系统恢复正常后,人工设置PIS_NEW=1(表[AppSetting])
+ ConnectionStringPIS_NEW_Value = "1"; "连接成功!";
+ ConnectionStringPIS_NEW_Value = "0"; "连接失败!";
+
+
+
+
+ 连接状态消息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置MIS是否给PLC写入信号,0为不写,1为写入
+
+
+
+
+
+
+
+
+
+ 工位MES与PLC通讯状态监控
+
+
+
+
+ 工位MES与PLC实时通讯状态监控
+
+
+
+
+ 工位托盘到位状态监控
+
+
+
+
+ 工位工位有件状态监控
+
+
+
+
+ PLC传递机型
+
+
+
+
+ 工位允许保存状态监控
+
+
+
+
+ 工位保存完成状态监控
+
+
+
+
+ 工位允许工作状态监控
+
+
+
+
+ 工位动作完成状态监控
+
+
+
+
+ 工位完成确认状态监控
+
+
+
+
+ 工位合格放行状态监控
+
+
+
+
+ 工位工作完成状态监控
+
+
+
+
+ 工位返修放行状态监控
+
+
+
+
+ 工位申请上线状态监控
+
+
+
+
+ 工位上线完成状态监控
+
+
+
+
+ 工位返修上线状态监控
+
+
+
+
+ 工位取消状态监控
+
+
+
+
+ 工位机床上电状态监控(ColorTagBit=0)
+
+
+
+
+ 工位循环开始状态监控(ColorTagBit=1)
+
+
+
+
+ 工位机床报警状态监控(ColorTagBit=2
+
+
+
+
+ 工位上件无料状态监控(ColorTagBit=3)
+
+
+
+
+ 工位下料堵塞状态监控(ColorTagBit=4)
+
+
+
+
+ 客户端名称
+
+
+
+
+ 主机IP地址
+
+
+
+
+ 发送给通讯服务器UDP端口号
+
+
+
+
+ 接收通讯服务器消息UDP端口号
+
+
+
+
+ 发送给打印机UDP端口号
+
+
+
+
+ 心跳UDP端口号(减轻压力,心跳单独处理)(心跳为1)
+
+
+
+
+ 心跳UDP端口号(减轻压力,心跳单独处理)(心跳为0)
+
+
+
+
+ 是否启用设备保养通知计划
+
+
+
+
+ 设置生产线设备目标循环时间,单位:秒
+
+
+
+
+
+ 读取配置文件
+
+
+
+
+ 测试与信息管理系统连接-数据库连接字符串
+ 业务规则:如果PIS_NEW=1,原先连接正常,测试连接
+ 业务规则:如果PIS_NEW=0,原先连接不正常,不进行测试连接,
+ 信息管理系统恢复正常后,人工设置PIS_NEW=1(表[AppSetting])
+
+
+
+
+ 与监控系统连接-数据库连接字符串
+
+
+
+
+ 与监控系统连接-数据库连接字符串
+
+
+
+
+ 与监控系统连接-数据库连接字符串
+
+
+
+
+ 0032 MES信息管理Access数据库连接,总线上线工位
+
+
+
+
+ 0033 MES信息管理Access数据库连接,用来查询物料追踪信息
+
+
+
+
+ MES信息管理工位号
+
+
+
+
+ MES信息管理工位号(需要返修的工)
+
+
+
+
+ MES信息管理工位类型
+
+
+
+
+ 工位所在线体类型:1分装线;2:总装线;3:测试线
+
+
+
+
+ 0051 MES信息管理工位号 被监测工位
+
+
+
+
+ 0保存缸盖验证数据文件
+
+
+
+
+ 0052 总线缸盖上线工位
+ 0052 总线活塞连杆上线工位
+ 0052 总线飞轮上线工位
+
+
+
+
+ 0053 用来查询物料追踪信息-->
+ 0053 分线缸盖上线工位,用来查询物料追踪信息-->
+ 0053 分线活塞连杆上线工位,用来查询物料追踪信息-->
+ 0053 分线分线飞轮上线工位,用来查询物料追踪信息-->
+
+
+
+
+ 工位类型 A自动机床 M手动机床 S半自动 T检测 F 上线工位 X 下线工位
+
+
+
+
+ 工位类型 A自动机床 M手动机床 S半自动 T检测 F 上线工位 X 下线工位
+
+
+
+
+ 跟踪文件
+
+
+
+
+ 机床类型
+ 0081 A自动机床 M手动机床 S半自动 T检测-->
+
+
+
+
+ 线体类型
+ 0082 线体类型 机体预装线 飞轮壳分装线 清洗分装线 飞轮分装线 零部件装线 AUDIT区 活塞分装线 缸盖分装线 内装线 外装线 输送线-->
+
+
+
+
+ 读超时,即在1000内未读到数据就引起超时异常
+
+
+
+
+ 设置串口读放弃时间
+
+
+
+
+ 字节间隔最大时间
+
+
+
+
+ OpcServer的IP
+
+
+
+
+
+
+
+
+
+ 用于MIS系统
+
+
+
+
+ 用于MIS系统
+
+
+
+
+ 用于MIS系统
+
+
+
+
+ 用于MIS系统
+
+
+
+
+
+
+
+
+
+ 通过反射调用动态连接库方法
+
+ 程序集(DLL)
+ 命名空间名称,如果无命名空间写“”
+ 类名
+ 方法名
+ 函数参数数组
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 使用的接收端口
+
+
+
+
+ 端口号
+
+
+
+
+ udp连接对象
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始接受新的端口数据
+
+
+
+
+
+ 开始接受新的端口数据
+
+
+
+
+
+ 在后台运行的接收线程
+
+
+
+
+ 利用UDP向端口port发送数据
+
+
+
+
+ 向指定IP发送UDP
+
+
+
+
+
+
+
+ 利用UDP向端口port发送数据
+
+
+
+
+
+
+
+ 向指定端口发生UDP(广播)
+
+
+
+
+
+
+ 利用UDP向端口port发送数据
+
+
+
+
+
+
+
+ 利用监控端口41199发送数据
+
+
+
+
+
+
+
+
+ 一个强类型的资源类,用于查找本地化的字符串等。
+
+
+
+
+ 返回此类使用的缓存的 ResourceManager 实例。
+
+
+
+
+ 重写当前线程的 CurrentUICulture 属性
+ 重写当前线程的 CurrentUICulture 属性。
+
+
+
+
+ 注册,改写注册表
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ 表转换为Json
+
+
+
+
+
+
+ 将DataTable中的数据转换成JSON格式
+
+ 数据源DataTable
+ 是否输出数据总条数
+ JSON中显示的数据总条数
+
+
+
+
+ 根据DataTable生成EasyUI Tree Json树结构
+
+ 数据源
+ ID列
+ Text列
+ 节点Url
+ 关系字段
+ 父ID
+
+
+
diff --git a/MES_Manage/Bin/ICSharpCode.SharpZipLib.dll b/MES_Manage/Bin/ICSharpCode.SharpZipLib.dll
new file mode 100644
index 0000000..e5682b7
Binary files /dev/null and b/MES_Manage/Bin/ICSharpCode.SharpZipLib.dll differ
diff --git a/MES_Manage/Bin/ICSharpCode.SharpZipLib.pdb b/MES_Manage/Bin/ICSharpCode.SharpZipLib.pdb
new file mode 100644
index 0000000..7fc6e53
Binary files /dev/null and b/MES_Manage/Bin/ICSharpCode.SharpZipLib.pdb differ
diff --git a/MES_Manage/Bin/ICSharpCode.SharpZipLib.xml b/MES_Manage/Bin/ICSharpCode.SharpZipLib.xml
new file mode 100644
index 0000000..780aecf
--- /dev/null
+++ b/MES_Manage/Bin/ICSharpCode.SharpZipLib.xml
@@ -0,0 +1,10331 @@
+
+
+
+ ICSharpCode.SharpZipLib
+
+
+
+
+ An example class to demonstrate compression and decompression of BZip2 streams.
+
+
+
+
+ Decompress the input writing
+ uncompressed data to the output stream
+
+ The readable stream containing data to decompress.
+ The output stream to receive the decompressed data.
+ Both streams are closed on completion if true.
+
+
+
+ Compress the input stream sending
+ result data to output stream
+
+ The readable stream to compress.
+ The output stream to receive the compressed data.
+ Both streams are closed on completion if true.
+ Block size acts as compression level (1 to 9) with 1 giving
+ the lowest compression and 9 the highest.
+
+
+
+ Defines internal values for both compression and decompression
+
+
+
+
+ Random numbers used to randomise repetitive blocks
+
+
+
+
+ When multiplied by compression parameter (1-9) gives the block size for compression
+ 9 gives the best compression but uses the most memory.
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ Backend constant
+
+
+
+
+ BZip2Exception represents exceptions specific to BZip2 classes and code.
+
+
+
+
+ Initialise a new instance of .
+
+
+
+
+ Initialise a new instance of with its message string.
+
+ A that describes the error.
+
+
+
+ Initialise a new instance of .
+
+ A that describes the error.
+ The that caused this exception.
+
+
+
+ Initializes a new instance of the BZip2Exception class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ An input stream that decompresses files in the BZip2 format
+
+
+
+
+ Construct instance for reading from stream
+
+ Data source
+
+
+
+ Get/set flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+
+
+
+ Gets a value indicating if the stream supports reading
+
+
+
+
+ Gets a value indicating whether the current stream supports seeking.
+
+
+
+
+ Gets a value indicating whether the current stream supports writing.
+ This property always returns false
+
+
+
+
+ Gets the length in bytes of the stream.
+
+
+
+
+ Gets the current position of the stream.
+ Setting the position is not supported and will throw a NotSupportException.
+
+ Any attempt to set the position.
+
+
+
+ Flushes the stream.
+
+
+
+
+ Set the streams position. This operation is not supported and will throw a NotSupportedException
+
+ A byte offset relative to the parameter.
+ A value of type indicating the reference point used to obtain the new position.
+ The new position of the stream.
+ Any access
+
+
+
+ Sets the length of this stream to the given value.
+ This operation is not supported and will throw a NotSupportedExceptionortedException
+
+ The new length for the stream.
+ Any access
+
+
+
+ Writes a block of bytes to this stream using data from a buffer.
+ This operation is not supported and will throw a NotSupportedException
+
+ The buffer to source data from.
+ The offset to start obtaining data from.
+ The number of bytes of data to write.
+ Any access
+
+
+
+ Writes a byte to the current position in the file stream.
+ This operation is not supported and will throw a NotSupportedException
+
+ The value to write.
+ Any access
+
+
+
+ Read a sequence of bytes and advances the read position by one byte.
+
+ Array of bytes to store values in
+ Offset in array to begin storing data
+ The maximum number of bytes to read
+ The total number of bytes read into the buffer. This might be less
+ than the number of bytes requested if that number of bytes are not
+ currently available or zero if the end of the stream is reached.
+
+
+
+
+ Closes the stream, releasing any associated resources.
+
+
+
+
+ Read a byte from stream advancing position
+
+ byte read or -1 on end of stream
+
+
+
+ An output stream that compresses into the BZip2 format
+ including file header chars into another stream.
+
+
+
+
+ Construct a default output stream with maximum block size
+
+ The stream to write BZip data onto.
+
+
+
+ Initialise a new instance of the
+ for the specified stream, using the given blocksize.
+
+ The stream to write compressed data to.
+ The block size to use.
+
+ Valid block sizes are in the range 1..9, with 1 giving
+ the lowest compression and 9 the highest.
+
+
+
+
+ Ensures that resources are freed and other cleanup operations
+ are performed when the garbage collector reclaims the BZip2OutputStream.
+
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Gets a value indicating whether the current stream supports reading
+
+
+
+
+ Gets a value indicating whether the current stream supports seeking
+
+
+
+
+ Gets a value indicating whether the current stream supports writing
+
+
+
+
+ Gets the length in bytes of the stream
+
+
+
+
+ Gets or sets the current position of this stream.
+
+
+
+
+ Sets the current position of this stream to the given value.
+
+ The point relative to the offset from which to being seeking.
+ The reference point from which to begin seeking.
+ The new position in the stream.
+
+
+
+ Sets the length of this stream to the given value.
+
+ The new stream length.
+
+
+
+ Read a byte from the stream advancing the position.
+
+ The byte read cast to an int; -1 if end of stream.
+
+
+
+ Read a block of bytes
+
+ The buffer to read into.
+ The offset in the buffer to start storing data at.
+ The maximum number of bytes to read.
+ The total number of bytes read. This might be less than the number of bytes
+ requested if that number of bytes are not currently available, or zero
+ if the end of the stream is reached.
+
+
+
+ Write a block of bytes to the stream
+
+ The buffer containing data to write.
+ The offset of the first byte to write.
+ The number of bytes to write.
+
+
+
+ Write a byte to the stream.
+
+ The byte to write to the stream.
+
+
+
+ Get the number of bytes written to output.
+
+
+
+
+ Get the number of bytes written to the output.
+
+
+
+
+ Releases the unmanaged resources used by the and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Flush output buffers
+
+
+
+
+ Computes Adler32 checksum for a stream of data. An Adler32
+ checksum is not as reliable as a CRC32 checksum, but a lot faster to
+ compute.
+
+ The specification for Adler32 may be found in RFC 1950.
+ ZLIB Compressed Data Format Specification version 3.3)
+
+
+ From that document:
+
+ "ADLER32 (Adler-32 checksum)
+ This contains a checksum value of the uncompressed data
+ (excluding any dictionary data) computed according to Adler-32
+ algorithm. This algorithm is a 32-bit extension and improvement
+ of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
+ standard.
+
+ Adler-32 is composed of two sums accumulated per byte: s1 is
+ the sum of all bytes, s2 is the sum of all s1 values. Both sums
+ are done modulo 65521. s1 is initialized to 1, s2 to zero. The
+ Adler-32 checksum is stored as s2*65536 + s1 in most-
+ significant-byte first (network) order."
+
+ "8.2. The Adler-32 algorithm
+
+ The Adler-32 algorithm is much faster than the CRC32 algorithm yet
+ still provides an extremely low probability of undetected errors.
+
+ The modulo on unsigned long accumulators can be delayed for 5552
+ bytes, so the modulo operation time is negligible. If the bytes
+ are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
+ and order sensitive, unlike the first sum, which is just a
+ checksum. That 65521 is prime is important to avoid a possible
+ large class of two-byte errors that leave the check unchanged.
+ (The Fletcher checksum uses 255, which is not prime and which also
+ makes the Fletcher check insensitive to single byte changes 0 -
+ 255.)
+
+ The sum s1 is initialized to 1 instead of zero to make the length
+ of the sequence part of s2, so that the length does not have to be
+ checked separately. (Any sequence of zeroes has a Fletcher
+ checksum of zero.)"
+
+
+
+
+
+
+ largest prime smaller than 65536
+
+
+
+
+ The CRC data checksum so far.
+
+
+
+
+ Initialise a default instance of
+
+
+
+
+ Resets the Adler32 data checksum as if no update was ever called.
+
+
+
+
+ Returns the Adler32 data checksum computed so far.
+
+
+
+
+ Updates the checksum with the byte b.
+
+
+ The data value to add. The high byte of the int is ignored.
+
+
+
+
+ Updates the Adler32 data checksum with the bytes taken from
+ a block of data.
+
+ Contains the data to update the checksum with.
+
+
+
+ Update Adler32 data checksum based on a portion of a block of data
+
+
+ The chunk of data to add
+
+
+
+
+ CRC-32 with unreversed data and reversed output
+
+
+ Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0.
+
+ Polynomials over GF(2) are represented in binary, one bit per coefficient,
+ with the lowest powers in the most significant bit. Then adding polynomials
+ is just exclusive-or, and multiplying a polynomial by x is a right shift by
+ one. If we call the above polynomial p, and represent a byte as the
+ polynomial q, also with the lowest power in the most significant bit (so the
+ byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+ where a mod b means the remainder after dividing a by b.
+
+ This calculation is done using the shift-register method of multiplying and
+ taking the remainder. The register is initialized to zero, and for each
+ incoming bit, x^32 is added mod p to the register if the bit is a one (where
+ x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
+ x (which is shifting right by one and adding x^32 mod p if the bit shifted
+ out is a one). We start with the highest power (least significant bit) of
+ q and repeat for all eight bits of q.
+
+ The table is simply the CRC of all possible eight bit values. This is all
+ the information needed to generate CRC's on data a byte at a time for all
+ combinations of CRC register values and incoming bytes.
+
+
+
+
+ The CRC data checksum so far.
+
+
+
+
+ Initialise a default instance of
+
+
+
+
+ Resets the CRC data checksum as if no update was ever called.
+
+
+
+
+ Returns the CRC data checksum computed so far.
+
+ Reversed Out = true
+
+
+
+ Updates the checksum with the int bval.
+
+
+ the byte is taken as the lower 8 bits of bval
+
+ Reversed Data = false
+
+
+
+ Updates the CRC data checksum with the bytes taken from
+ a block of data.
+
+ Contains the data to update the CRC with.
+
+
+
+ Update CRC data checksum based on a portion of a block of data
+
+
+ The chunk of data to add
+
+
+
+
+ CRC-32 with reversed data and unreversed output
+
+
+ Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0.
+
+ Polynomials over GF(2) are represented in binary, one bit per coefficient,
+ with the lowest powers in the most significant bit. Then adding polynomials
+ is just exclusive-or, and multiplying a polynomial by x is a right shift by
+ one. If we call the above polynomial p, and represent a byte as the
+ polynomial q, also with the lowest power in the most significant bit (so the
+ byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+ where a mod b means the remainder after dividing a by b.
+
+ This calculation is done using the shift-register method of multiplying and
+ taking the remainder. The register is initialized to zero, and for each
+ incoming bit, x^32 is added mod p to the register if the bit is a one (where
+ x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
+ x (which is shifting right by one and adding x^32 mod p if the bit shifted
+ out is a one). We start with the highest power (least significant bit) of
+ q and repeat for all eight bits of q.
+
+ The table is simply the CRC of all possible eight bit values. This is all
+ the information needed to generate CRC's on data a byte at a time for all
+ combinations of CRC register values and incoming bytes.
+
+
+
+
+ The CRC data checksum so far.
+
+
+
+
+ Initialise a default instance of
+
+
+
+
+ Resets the CRC data checksum as if no update was ever called.
+
+
+
+
+ Returns the CRC data checksum computed so far.
+
+ Reversed Out = false
+
+
+
+ Updates the checksum with the int bval.
+
+
+ the byte is taken as the lower 8 bits of bval
+
+ Reversed Data = true
+
+
+
+ Updates the CRC data checksum with the bytes taken from
+ a block of data.
+
+ Contains the data to update the CRC with.
+
+
+
+ Update CRC data checksum based on a portion of a block of data
+
+
+ The chunk of data to add
+
+
+
+
+ Interface to compute a data checksum used by checked input/output streams.
+ A data checksum can be updated by one byte or with a byte array. After each
+ update the value of the current checksum can be returned by calling
+ getValue. The complete checksum object can also be reset
+ so it can be used again with new data.
+
+
+
+
+ Resets the data checksum as if no update was ever called.
+
+
+
+
+ Returns the data checksum computed so far.
+
+
+
+
+ Adds one byte to the data checksum.
+
+
+ the data value to add. The high byte of the int is ignored.
+
+
+
+
+ Updates the data checksum with the bytes taken from the array.
+
+
+ buffer an array of bytes
+
+
+
+
+ Adds the byte array to the data checksum.
+
+
+ The chunk of data to add
+
+
+
+
+ SharpZipBaseException is the base exception class for SharpZipLib.
+ All library exceptions are derived from this.
+
+ NOTE: Not all exceptions thrown will be derived from this class.
+ A variety of other exceptions are possible for example
+
+
+
+ Initializes a new instance of the SharpZipBaseException class.
+
+
+
+
+ Initializes a new instance of the SharpZipBaseException class with a specified error message.
+
+ A message describing the exception.
+
+
+
+ Initializes a new instance of the SharpZipBaseException class with a specified
+ error message and a reference to the inner exception that is the cause of this exception.
+
+ A message describing the exception.
+ The inner exception
+
+
+
+ Initializes a new instance of the SharpZipBaseException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Indicates that an error occured during decoding of a input stream due to corrupt
+ data or (unintentional) library incompability.
+
+
+
+
+ Initializes a new instance of the StreamDecodingException with a generic message
+
+
+
+
+ Initializes a new instance of the StreamDecodingException class with a specified error message.
+
+ A message describing the exception.
+
+
+
+ Initializes a new instance of the StreamDecodingException class with a specified
+ error message and a reference to the inner exception that is the cause of this exception.
+
+ A message describing the exception.
+ The inner exception
+
+
+
+ Initializes a new instance of the StreamDecodingException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Indicates that the input stream could not decoded due to known library incompability or missing features
+
+
+
+
+ Initializes a new instance of the StreamUnsupportedException with a generic message
+
+
+
+
+ Initializes a new instance of the StreamUnsupportedException class with a specified error message.
+
+ A message describing the exception.
+
+
+
+ Initializes a new instance of the StreamUnsupportedException class with a specified
+ error message and a reference to the inner exception that is the cause of this exception.
+
+ A message describing the exception.
+ The inner exception
+
+
+
+ Initializes a new instance of the StreamUnsupportedException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Indicates that the input stream could not decoded due to the stream ending before enough data had been provided
+
+
+
+
+ Initializes a new instance of the UnexpectedEndOfStreamException with a generic message
+
+
+
+
+ Initializes a new instance of the UnexpectedEndOfStreamException class with a specified error message.
+
+ A message describing the exception.
+
+
+
+ Initializes a new instance of the UnexpectedEndOfStreamException class with a specified
+ error message and a reference to the inner exception that is the cause of this exception.
+
+ A message describing the exception.
+ The inner exception
+
+
+
+ Initializes a new instance of the UnexpectedEndOfStreamException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Indicates that a value was outside of the expected range when decoding an input stream
+
+
+
+
+ Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable
+
+ Name of the variable, use: nameof()
+
+
+
+ Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable,
+ it's current value and expected range.
+
+ Name of the variable, use: nameof()
+ The invalid value
+ Expected maximum value
+ Expected minimum value
+
+
+
+ Initializes a new instance of the ValueOutOfRangeException class naming the the causing variable,
+ it's current value and expected range.
+
+ Name of the variable, use: nameof()
+ The invalid value
+ Expected maximum value
+ Expected minimum value
+
+
+
+ Initializes a new instance of the ValueOutOfRangeException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Event arguments for scanning.
+
+
+
+
+ Initialise a new instance of
+
+ The file or directory name.
+
+
+
+ The file or directory name for this event.
+
+
+
+
+ Get set a value indicating if scanning should continue or not.
+
+
+
+
+ Event arguments during processing of a single file or directory.
+
+
+
+
+ Initialise a new instance of
+
+ The file or directory name if known.
+ The number of bytes processed so far
+ The total number of bytes to process, 0 if not known
+
+
+
+ The name for this event if known.
+
+
+
+
+ Get set a value indicating wether scanning should continue or not.
+
+
+
+
+ Get a percentage representing how much of the has been processed
+
+ 0.0 to 100.0 percent; 0 if target is not known.
+
+
+
+ The number of bytes processed so far
+
+
+
+
+ The number of bytes to process.
+
+ Target may be 0 or negative if the value isnt known.
+
+
+
+ Event arguments for directories.
+
+
+
+
+ Initialize an instance of .
+
+ The name for this directory.
+ Flag value indicating if any matching files are contained in this directory.
+
+
+
+ Get a value indicating if the directory contains any matching files or not.
+
+
+
+
+ Arguments passed when scan failures are detected.
+
+
+
+
+ Initialise a new instance of
+
+ The name to apply.
+ The exception to use.
+
+
+
+ The applicable name.
+
+
+
+
+ The applicable exception.
+
+
+
+
+ Get / set a value indicating wether scanning should continue.
+
+
+
+
+ Delegate invoked before starting to process a file.
+
+ The source of the event
+ The event arguments.
+
+
+
+ Delegate invoked during processing of a file or directory
+
+ The source of the event
+ The event arguments.
+
+
+
+ Delegate invoked when a file has been completely processed.
+
+ The source of the event
+ The event arguments.
+
+
+
+ Delegate invoked when a directory failure is detected.
+
+ The source of the event
+ The event arguments.
+
+
+
+ Delegate invoked when a file failure is detected.
+
+ The source of the event
+ The event arguments.
+
+
+
+ FileSystemScanner provides facilities scanning of files and directories.
+
+
+
+
+ Initialise a new instance of
+
+ The file filter to apply when scanning.
+
+
+
+ Initialise a new instance of
+
+ The file filter to apply.
+ The directory filter to apply.
+
+
+
+ Initialise a new instance of
+
+ The file filter to apply.
+
+
+
+ Initialise a new instance of
+
+ The file filter to apply.
+ The directory filter to apply.
+
+
+
+ Delegate to invoke when a directory is processed.
+
+
+
+
+ Delegate to invoke when a file is processed.
+
+
+
+
+ Delegate to invoke when processing for a file has finished.
+
+
+
+
+ Delegate to invoke when a directory failure is detected.
+
+
+
+
+ Delegate to invoke when a file failure is detected.
+
+
+
+
+ Raise the DirectoryFailure event.
+
+ The directory name.
+ The exception detected.
+
+
+
+ Raise the FileFailure event.
+
+ The file name.
+ The exception detected.
+
+
+
+ Raise the ProcessFile event.
+
+ The file name.
+
+
+
+ Raise the complete file event
+
+ The file name
+
+
+
+ Raise the ProcessDirectory event.
+
+ The directory name.
+ Flag indicating if the directory has matching files.
+
+
+
+ Scan a directory.
+
+ The base directory to scan.
+ True to recurse subdirectories, false to scan a single directory.
+
+
+
+ The file filter currently in use.
+
+
+
+
+ The directory filter currently in use.
+
+
+
+
+ Flag indicating if scanning should continue running.
+
+
+
+
+ INameTransform defines how file system names are transformed for use with archives, or vice versa.
+
+
+
+
+ Given a file name determine the transformed value.
+
+ The name to transform.
+ The transformed file name.
+
+
+
+ Given a directory name determine the transformed value.
+
+ The name to transform.
+ The transformed directory name
+
+
+
+ InvalidNameException is thrown for invalid names such as directory traversal paths and names with invalid characters
+
+
+
+
+ Initializes a new instance of the InvalidNameException class with a default error message.
+
+
+
+
+ Initializes a new instance of the InvalidNameException class with a specified error message.
+
+ A message describing the exception.
+
+
+
+ Initializes a new instance of the InvalidNameException class with a specified
+ error message and a reference to the inner exception that is the cause of this exception.
+
+ A message describing the exception.
+ The inner exception
+
+
+
+ Initializes a new instance of the InvalidNameException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Scanning filters support filtering of names.
+
+
+
+
+ Test a name to see if it 'matches' the filter.
+
+ The name to test.
+ Returns true if the name matches the filter, false if it does not match.
+
+
+
+ NameFilter is a string matching class which allows for both positive and negative
+ matching.
+ A filter is a sequence of independant regular expressions separated by semi-colons ';'.
+ To include a semi-colon it may be quoted as in \;. Each expression can be prefixed by a plus '+' sign or
+ a minus '-' sign to denote the expression is intended to include or exclude names.
+ If neither a plus or minus sign is found include is the default.
+ A given name is tested for inclusion before checking exclusions. Only names matching an include spec
+ and not matching an exclude spec are deemed to match the filter.
+ An empty filter matches any name.
+
+ The following expression includes all name ending in '.dat' with the exception of 'dummy.dat'
+ "+\.dat$;-^dummy\.dat$"
+
+
+
+
+ Construct an instance based on the filter expression passed
+
+ The filter expression.
+
+
+
+ Test a string to see if it is a valid regular expression.
+
+ The expression to test.
+ True if expression is a valid false otherwise.
+
+
+
+ Test an expression to see if it is valid as a filter.
+
+ The filter expression to test.
+ True if the expression is valid, false otherwise.
+
+
+
+ Split a string into its component pieces
+
+ The original string
+ Returns an array of values containing the individual filter elements.
+
+
+
+ Convert this filter to its string equivalent.
+
+ The string equivalent for this filter.
+
+
+
+ Test a value to see if it is included by the filter.
+
+ The value to test.
+ True if the value is included, false otherwise.
+
+
+
+ Test a value to see if it is excluded by the filter.
+
+ The value to test.
+ True if the value is excluded, false otherwise.
+
+
+
+ Test a value to see if it matches the filter.
+
+ The value to test.
+ True if the value matches, false otherwise.
+
+
+
+ Compile this filter.
+
+
+
+
+ PathFilter filters directories and files using a form of regular expressions
+ by full path name.
+ See NameFilter for more detail on filtering.
+
+
+
+
+ Initialise a new instance of .
+
+ The filter expression to apply.
+
+
+
+ Test a name to see if it matches the filter.
+
+ The name to test.
+ True if the name matches, false otherwise.
+ is used to get the full path before matching.
+
+
+
+ ExtendedPathFilter filters based on name, file size, and the last write time of the file.
+
+ Provides an example of how to customise filtering.
+
+
+
+ Initialise a new instance of ExtendedPathFilter.
+
+ The filter to apply.
+ The minimum file size to include.
+ The maximum file size to include.
+
+
+
+ Initialise a new instance of ExtendedPathFilter.
+
+ The filter to apply.
+ The minimum to include.
+ The maximum to include.
+
+
+
+ Initialise a new instance of ExtendedPathFilter.
+
+ The filter to apply.
+ The minimum file size to include.
+ The maximum file size to include.
+ The minimum to include.
+ The maximum to include.
+
+
+
+ Test a filename to see if it matches the filter.
+
+ The filename to test.
+ True if the filter matches, false otherwise.
+ The doesnt exist
+
+
+
+ Get/set the minimum size/length for a file that will match this filter.
+
+ The default value is zero.
+ value is less than zero; greater than
+
+
+
+ Get/set the maximum size/length for a file that will match this filter.
+
+ The default value is
+ value is less than zero or less than
+
+
+
+ Get/set the minimum value that will match for this filter.
+
+ Files with a LastWrite time less than this value are excluded by the filter.
+
+
+
+ Get/set the maximum value that will match for this filter.
+
+ Files with a LastWrite time greater than this value are excluded by the filter.
+
+
+
+ NameAndSizeFilter filters based on name and file size.
+
+ A sample showing how filters might be extended.
+
+
+
+ Initialise a new instance of NameAndSizeFilter.
+
+ The filter to apply.
+ The minimum file size to include.
+ The maximum file size to include.
+
+
+
+ Test a filename to see if it matches the filter.
+
+ The filename to test.
+ True if the filter matches, false otherwise.
+
+
+
+ Get/set the minimum size for a file that will match this filter.
+
+
+
+
+ Get/set the maximum size for a file that will match this filter.
+
+
+
+
+ Provides simple " utilities.
+
+
+
+
+ Read from a ensuring all the required data is read.
+
+ The stream to read.
+ The buffer to fill.
+
+
+
+
+ Read from a " ensuring all the required data is read.
+
+ The stream to read data from.
+ The buffer to store data in.
+ The offset at which to begin storing data.
+ The number of bytes of data to store.
+ Required parameter is null
+ and or are invalid.
+ End of stream is encountered before all the data has been read.
+
+
+
+ Read as much data as possible from a ", up to the requested number of bytes
+
+ The stream to read data from.
+ The buffer to store data in.
+ The offset at which to begin storing data.
+ The number of bytes of data to store.
+ Required parameter is null
+ and or are invalid.
+
+
+
+ Copy the contents of one to another.
+
+ The stream to source data from.
+ The stream to write data to.
+ The buffer to use during copying.
+
+
+
+ Copy the contents of one to another.
+
+ The stream to source data from.
+ The stream to write data to.
+ The buffer to use during copying.
+ The progress handler delegate to use.
+ The minimum between progress updates.
+ The source for this event.
+ The name to use with the event.
+ This form is specialised for use within #Zip to support events during archive operations.
+
+
+
+ Copy the contents of one to another.
+
+ The stream to source data from.
+ The stream to write data to.
+ The buffer to use during copying.
+ The progress handler delegate to use.
+ The minimum between progress updates.
+ The source for this event.
+ The name to use with the event.
+ A predetermined fixed target value to use with progress updates.
+ If the value is negative the target is calculated by looking at the stream.
+ This form is specialised for use within #Zip to support events during archive operations.
+
+
+
+ Initialise an instance of
+
+
+
+
+ WindowsPathUtils provides simple utilities for handling windows paths.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Remove any path root present in the path
+
+ A containing path information.
+ The path with the root removed if it was present; path otherwise.
+ Unlike the class the path isnt otherwise checked for validity.
+
+
+
+ PkzipClassic embodies the classic or original encryption facilities used in Pkzip archives.
+ While it has been superceded by more recent and more powerful algorithms, its still in use and
+ is viable for preventing casual snooping
+
+
+
+
+ Generates new encryption keys based on given seed
+
+ The seed value to initialise keys with.
+ A new key value.
+
+
+
+ PkzipClassicCryptoBase provides the low level facilities for encryption
+ and decryption using the PkzipClassic algorithm.
+
+
+
+
+ Transform a single byte
+
+
+ The transformed value
+
+
+
+
+ Set the key schedule for encryption/decryption.
+
+ The data use to set the keys from.
+
+
+
+ Update encryption keys
+
+
+
+
+ Reset the internal state.
+
+
+
+
+ PkzipClassic CryptoTransform for encryption.
+
+
+
+
+ Initialise a new instance of
+
+ The key block to use.
+
+
+
+ Transforms the specified region of the specified byte array.
+
+ The input for which to compute the transform.
+ The offset into the byte array from which to begin using data.
+ The number of bytes in the byte array to use as data.
+ The computed transform.
+
+
+
+ Transforms the specified region of the input byte array and copies
+ the resulting transform to the specified region of the output byte array.
+
+ The input for which to compute the transform.
+ The offset into the input byte array from which to begin using data.
+ The number of bytes in the input byte array to use as data.
+ The output to which to write the transform.
+ The offset into the output byte array from which to begin writing data.
+ The number of bytes written.
+
+
+
+ Gets a value indicating whether the current transform can be reused.
+
+
+
+
+ Gets the size of the input data blocks in bytes.
+
+
+
+
+ Gets the size of the output data blocks in bytes.
+
+
+
+
+ Gets a value indicating whether multiple blocks can be transformed.
+
+
+
+
+ Cleanup internal state.
+
+
+
+
+ PkzipClassic CryptoTransform for decryption.
+
+
+
+
+ Initialise a new instance of .
+
+ The key block to decrypt with.
+
+
+
+ Transforms the specified region of the specified byte array.
+
+ The input for which to compute the transform.
+ The offset into the byte array from which to begin using data.
+ The number of bytes in the byte array to use as data.
+ The computed transform.
+
+
+
+ Transforms the specified region of the input byte array and copies
+ the resulting transform to the specified region of the output byte array.
+
+ The input for which to compute the transform.
+ The offset into the input byte array from which to begin using data.
+ The number of bytes in the input byte array to use as data.
+ The output to which to write the transform.
+ The offset into the output byte array from which to begin writing data.
+ The number of bytes written.
+
+
+
+ Gets a value indicating whether the current transform can be reused.
+
+
+
+
+ Gets the size of the input data blocks in bytes.
+
+
+
+
+ Gets the size of the output data blocks in bytes.
+
+
+
+
+ Gets a value indicating whether multiple blocks can be transformed.
+
+
+
+
+ Cleanup internal state.
+
+
+
+
+ Defines a wrapper object to access the Pkzip algorithm.
+ This class cannot be inherited.
+
+
+
+
+ Get / set the applicable block size in bits.
+
+ The only valid block size is 8.
+
+
+
+ Get an array of legal key sizes.
+
+
+
+
+ Generate an initial vector.
+
+
+
+
+ Get an array of legal block sizes.
+
+
+
+
+ Get / set the key value applicable.
+
+
+
+
+ Generate a new random key.
+
+
+
+
+ Create an encryptor.
+
+ The key to use for this encryptor.
+ Initialisation vector for the new encryptor.
+ Returns a new PkzipClassic encryptor
+
+
+
+ Create a decryptor.
+
+ Keys to use for this new decryptor.
+ Initialisation vector for the new decryptor.
+ Returns a new decryptor.
+
+
+
+ Encrypts and decrypts AES ZIP
+
+
+ Based on information from http://www.winzip.com/aes_info.htm
+ and http://www.gladman.me.uk/cryptography_technology/fileencrypt/
+
+
+
+
+ Constructor
+
+ The stream on which to perform the cryptographic transformation.
+ Instance of ZipAESTransform
+ Read or Write
+
+
+
+ Reads a sequence of bytes from the current CryptoStream into buffer,
+ and advances the position within the stream by the number of bytes read.
+
+
+
+
+ Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
+
+ An array of bytes. This method copies count bytes from buffer to the current stream.
+ The byte offset in buffer at which to begin copying bytes to the current stream.
+ The number of bytes to be written to the current stream.
+
+
+
+ Transforms stream using AES in CTR mode
+
+
+
+
+ Constructor.
+
+ Password string
+ Random bytes, length depends on encryption strength.
+ 128 bits = 8 bytes, 192 bits = 12 bytes, 256 bits = 16 bytes.
+ The encryption strength, in bytes eg 16 for 128 bits.
+ True when creating a zip, false when reading. For the AuthCode.
+
+
+
+
+ Implement the ICryptoTransform method.
+
+
+
+
+ Returns the 2 byte password verifier
+
+
+
+
+ Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream.
+
+
+
+
+ Not implemented.
+
+
+
+
+ Gets the size of the input data blocks in bytes.
+
+
+
+
+ Gets the size of the output data blocks in bytes.
+
+
+
+
+ Gets a value indicating whether multiple blocks can be transformed.
+
+
+
+
+ Gets a value indicating whether the current transform can be reused.
+
+
+
+
+ Cleanup internal state.
+
+
+
+
+ An example class to demonstrate compression and decompression of GZip streams.
+
+
+
+
+ Decompress the input writing
+ uncompressed data to the output stream
+
+ The readable stream containing data to decompress.
+ The output stream to receive the decompressed data.
+ Both streams are closed on completion if true.
+ Input or output stream is null
+
+
+
+ Compress the input stream sending
+ result data to output stream
+
+ The readable stream to compress.
+ The output stream to receive the compressed data.
+ Both streams are closed on completion if true.
+ Deflate buffer size, minimum 512
+ Deflate compression level, 0-9
+ Input or output stream is null
+ Buffer Size is smaller than 512
+ Compression level outside 0-9
+
+
+
+ This class contains constants used for gzip.
+
+
+
+
+ Magic number found at start of GZIP header
+
+
+
+
+ Flag bit mask for text
+
+
+
+
+ Flag bitmask for Crc
+
+
+
+
+ Flag bit mask for extra
+
+
+
+
+ flag bitmask for name
+
+
+
+
+ flag bit mask indicating comment is present
+
+
+
+
+ Initialise default instance.
+
+ Constructor is private to prevent instances being created.
+
+
+
+ GZipException represents exceptions specific to GZip classes and code.
+
+
+
+
+ Initialise a new instance of .
+
+
+
+
+ Initialise a new instance of with its message string.
+
+ A that describes the error.
+
+
+
+ Initialise a new instance of .
+
+ A that describes the error.
+ The that caused this exception.
+
+
+
+ Initializes a new instance of the GZipException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ This filter stream is used to decompress a "GZIP" format stream.
+ The "GZIP" format is described baseInputStream RFC 1952.
+
+ author of the original java version : John Leuner
+
+ This sample shows how to unzip a gzipped file
+
+ using System;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.Core;
+ using ICSharpCode.SharpZipLib.GZip;
+
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ using (Stream inStream = new GZipInputStream(File.OpenRead(args[0])))
+ using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) {
+ byte[] buffer = new byte[4096];
+ StreamUtils.Copy(inStream, outStream, buffer);
+ }
+ }
+ }
+
+
+
+
+
+ CRC-32 value for uncompressed data
+
+
+
+
+ Flag to indicate if we've read the GZIP header yet for the current member (block of compressed data).
+ This is tracked per-block as the file is parsed.
+
+
+
+
+ Flag to indicate if at least one block in a stream with concatenated blocks was read successfully.
+ This allows us to exit gracefully if downstream data is not in gzip format.
+
+
+
+
+ Creates a GZipInputStream with the default buffer size
+
+
+ The stream to read compressed data from (baseInputStream GZIP format)
+
+
+
+
+ Creates a GZIPInputStream with the specified buffer size
+
+
+ The stream to read compressed data from (baseInputStream GZIP format)
+
+
+ Size of the buffer to use
+
+
+
+
+ Reads uncompressed data into an array of bytes
+
+
+ The buffer to read uncompressed data into
+
+
+ The offset indicating where the data should be placed
+
+
+ The number of uncompressed bytes to be read
+
+ Returns the number of bytes actually read.
+
+
+
+ This filter stream is used to compress a stream into a "GZIP" stream.
+ The "GZIP" format is described in RFC 1952.
+
+ author of the original java version : John Leuner
+
+ This sample shows how to gzip a file
+
+ using System;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.GZip;
+ using ICSharpCode.SharpZipLib.Core;
+
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ using (Stream s = new GZipOutputStream(File.Create(args[0] + ".gz")))
+ using (FileStream fs = File.OpenRead(args[0])) {
+ byte[] writeData = new byte[4096];
+ Streamutils.Copy(s, fs, writeData);
+ }
+ }
+ }
+ }
+
+
+
+
+
+ CRC-32 value for uncompressed data
+
+
+
+
+ Creates a GzipOutputStream with the default buffer size
+
+
+ The stream to read data (to be compressed) from
+
+
+
+
+ Creates a GZipOutputStream with the specified buffer size
+
+
+ The stream to read data (to be compressed) from
+
+
+ Size of the buffer to use
+
+
+
+
+ Sets the active compression level (0-9). The new level will be activated
+ immediately.
+
+ The compression level to set.
+
+ Level specified is not supported.
+
+
+
+
+
+ Get the current compression level.
+
+ The current compression level.
+
+
+
+ Write given buffer to output updating crc
+
+ Buffer to write
+ Offset of first byte in buf to write
+ Number of bytes to write
+
+
+
+ Writes remaining compressed output data to the output stream
+ and closes it.
+
+
+
+
+ Finish compression and write any footer information required to stream
+
+
+
+
+ This class contains constants used for LZW
+
+
+
+
+ Magic number found at start of LZW header: 0x1f 0x9d
+
+
+
+
+ Maximum number of bits per code
+
+
+
+
+ Mask for 'number of compression bits'
+
+
+
+
+ Indicates the presence of a fourth header byte
+
+
+
+
+ Reserved bits
+
+
+
+
+ Block compression: if table is full and compression rate is dropping,
+ clear the dictionary.
+
+
+
+
+ LZW file header size (in bytes)
+
+
+
+
+ Initial number of bits per code
+
+
+
+
+ LzwException represents exceptions specific to LZW classes and code.
+
+
+
+
+ Initialise a new instance of .
+
+
+
+
+ Initialise a new instance of with its message string.
+
+ A that describes the error.
+
+
+
+ Initialise a new instance of .
+
+ A that describes the error.
+ The that caused this exception.
+
+
+
+ Initializes a new instance of the LzwException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ This filter stream is used to decompress a LZW format stream.
+ Specifically, a stream that uses the LZC compression method.
+ This file format is usually associated with the .Z file extension.
+
+ See http://en.wikipedia.org/wiki/Compress
+ See http://wiki.wxwidgets.org/Development:_Z_File_Format
+
+ The file header consists of 3 (or optionally 4) bytes. The first two bytes
+ contain the magic marker "0x1f 0x9d", followed by a byte of flags.
+
+ Based on Java code by Ronald Tschalar, which in turn was based on the unlzw.c
+ code in the gzip package.
+
+ This sample shows how to unzip a compressed file
+
+ using System;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.Core;
+ using ICSharpCode.SharpZipLib.LZW;
+
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ using (Stream inStream = new LzwInputStream(File.OpenRead(args[0])))
+ using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) {
+ byte[] buffer = new byte[4096];
+ StreamUtils.Copy(inStream, outStream, buffer);
+ // OR
+ inStream.Read(buffer, 0, buffer.Length);
+ // now do something with the buffer
+ }
+ }
+ }
+
+
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Creates a LzwInputStream
+
+
+ The stream to read compressed data from (baseInputStream LZW format)
+
+
+
+
+ See
+
+
+
+
+
+ Reads decompressed data into the provided buffer byte array
+
+
+ The array to read and decompress data into
+
+
+ The offset indicating where the data should be placed
+
+
+ The number of bytes to decompress
+
+ The number of bytes read. Zero signals the end of stream
+
+
+
+ Moves the unread data in the buffer to the beginning and resets
+ the pointers.
+
+
+
+
+
+
+ Gets a value indicating whether the current stream supports reading
+
+
+
+
+ Gets a value of false indicating seeking is not supported for this stream.
+
+
+
+
+ Gets a value of false indicating that this stream is not writeable.
+
+
+
+
+ A value representing the length of the stream in bytes.
+
+
+
+
+ The current position within the stream.
+ Throws a NotSupportedException when attempting to set the position
+
+ Attempting to set the position
+
+
+
+ Flushes the baseInputStream
+
+
+
+
+ Sets the position within the current stream
+ Always throws a NotSupportedException
+
+ The relative offset to seek to.
+ The defining where to seek from.
+ The new position in the stream.
+ Any access
+
+
+
+ Set the length of the current stream
+ Always throws a NotSupportedException
+
+ The new length value for the stream.
+ Any access
+
+
+
+ Writes a sequence of bytes to stream and advances the current position
+ This method always throws a NotSupportedException
+
+ Thew buffer containing data to write.
+ The offset of the first byte to write.
+ The number of bytes to write.
+ Any access
+
+
+
+ Writes one byte to the current stream and advances the current position
+ Always throws a NotSupportedException
+
+ The byte to write.
+ Any access
+
+
+
+ Closes the input stream. When
+ is true the underlying stream is also closed.
+
+
+
+
+ Flag indicating wether this instance has been closed or not.
+
+
+
+
+ This exception is used to indicate that there is a problem
+ with a TAR archive header.
+
+
+
+
+ Initialise a new instance of the InvalidHeaderException class.
+
+
+
+
+ Initialises a new instance of the InvalidHeaderException class with a specified message.
+
+ Message describing the exception cause.
+
+
+
+ Initialise a new instance of InvalidHeaderException
+
+ Message describing the problem.
+ The exception that is the cause of the current exception.
+
+
+
+ Used to advise clients of 'events' while processing archives
+
+
+
+
+ The TarArchive class implements the concept of a
+ 'Tape Archive'. A tar archive is a series of entries, each of
+ which represents a file system object. Each entry in
+ the archive consists of a header block followed by 0 or more data blocks.
+ Directory entries consist only of the header block, and are followed by entries
+ for the directory's contents. File entries consist of a
+ header followed by the number of blocks needed to
+ contain the file's contents. All entries are written on
+ block boundaries. Blocks are 512 bytes long.
+
+ TarArchives are instantiated in either read or write mode,
+ based upon whether they are instantiated with an InputStream
+ or an OutputStream. Once instantiated TarArchives read/write
+ mode can not be changed.
+
+ There is currently no support for random access to tar archives.
+ However, it seems that subclassing TarArchive, and using the
+ TarBuffer.CurrentRecord and TarBuffer.CurrentBlock
+ properties, this would be rather trivial.
+
+
+
+
+ Client hook allowing detailed information to be reported during processing
+
+
+
+
+ Raises the ProgressMessage event
+
+ The TarEntry for this event
+ message for this event. Null is no message
+
+
+
+ Constructor for a default .
+
+
+
+
+ Initalise a TarArchive for input.
+
+ The to use for input.
+
+
+
+ Initialise a TarArchive for output.
+
+ The to use for output.
+
+
+
+ The InputStream based constructors create a TarArchive for the
+ purposes of extracting or listing a tar archive. Thus, use
+ these constructors when you wish to extract files from or list
+ the contents of an existing tar archive.
+
+ The stream to retrieve archive data from.
+ Returns a new suitable for reading from.
+
+
+
+ Create TarArchive for reading setting block factor
+
+ A stream containing the tar archive contents
+ The blocking factor to apply
+ Returns a suitable for reading.
+
+
+
+ Create a TarArchive for writing to, using the default blocking factor
+
+ The to write to
+ Returns a suitable for writing.
+
+
+
+ Create a tar archive for writing.
+
+ The stream to write to
+ The blocking factor to use for buffering.
+ Returns a suitable for writing.
+
+
+
+ Set the flag that determines whether existing files are
+ kept, or overwritten during extraction.
+
+
+ If true, do not overwrite existing files.
+
+
+
+
+ Get/set the ascii file translation flag. If ascii file translation
+ is true, then the file is checked to see if it a binary file or not.
+ If the flag is true and the test indicates it is ascii text
+ file, it will be translated. The translation converts the local
+ operating system's concept of line ends into the UNIX line end,
+ '\n', which is the defacto standard for a TAR archive. This makes
+ text files compatible with UNIX.
+
+
+
+
+ Set the ascii file translation flag.
+
+
+ If true, translate ascii text files.
+
+
+
+
+ PathPrefix is added to entry names as they are written if the value is not null.
+ A slash character is appended after PathPrefix
+
+
+
+
+ RootPath is removed from entry names if it is found at the
+ beginning of the name.
+
+
+
+
+ Set user and group information that will be used to fill in the
+ tar archive's entry headers. This information is based on that available
+ for the linux operating system, which is not always available on other
+ operating systems. TarArchive allows the programmer to specify values
+ to be used in their place.
+ is set to true by this call.
+
+
+ The user id to use in the headers.
+
+
+ The user name to use in the headers.
+
+
+ The group id to use in the headers.
+
+
+ The group name to use in the headers.
+
+
+
+
+ Get or set a value indicating if overrides defined by SetUserInfo should be applied.
+
+ If overrides are not applied then the values as set in each header will be used.
+
+
+
+ Get the archive user id.
+ See ApplyUserInfoOverrides for detail
+ on how to allow setting values on a per entry basis.
+
+
+ The current user id.
+
+
+
+
+ Get the archive user name.
+ See ApplyUserInfoOverrides for detail
+ on how to allow setting values on a per entry basis.
+
+
+ The current user name.
+
+
+
+
+ Get the archive group id.
+ See ApplyUserInfoOverrides for detail
+ on how to allow setting values on a per entry basis.
+
+
+ The current group id.
+
+
+
+
+ Get the archive group name.
+ See ApplyUserInfoOverrides for detail
+ on how to allow setting values on a per entry basis.
+
+
+ The current group name.
+
+
+
+
+ Get the archive's record size. Tar archives are composed of
+ a series of RECORDS each containing a number of BLOCKS.
+ This allowed tar archives to match the IO characteristics of
+ the physical device being used. Archives are expected
+ to be properly "blocked".
+
+
+ The record size this archive is using.
+
+
+
+
+ Sets the IsStreamOwner property on the underlying stream.
+ Set this to false to prevent the Close of the TarArchive from closing the stream.
+
+
+
+
+ Close the archive.
+
+
+
+
+ Perform the "list" command for the archive contents.
+
+ NOTE That this method uses the progress event to actually list
+ the contents. If the progress display event is not set, nothing will be listed!
+
+
+
+
+ Perform the "extract" command and extract the contents of the archive.
+
+
+ The destination directory into which to extract.
+
+
+
+
+ Extract an entry from the archive. This method assumes that the
+ tarIn stream has been properly set with a call to GetNextEntry().
+
+
+ The destination directory into which to extract.
+
+
+ The TarEntry returned by tarIn.GetNextEntry().
+
+
+
+
+ Write an entry to the archive. This method will call the putNextEntry
+ and then write the contents of the entry, and finally call closeEntry()
+ for entries that are files. For directories, it will call putNextEntry(),
+ and then, if the recurse flag is true, process each entry that is a
+ child of the directory.
+
+
+ The TarEntry representing the entry to write to the archive.
+
+
+ If true, process the children of directory entries.
+
+
+
+
+ Write an entry to the archive. This method will call the putNextEntry
+ and then write the contents of the entry, and finally call closeEntry()
+ for entries that are files. For directories, it will call putNextEntry(),
+ and then, if the recurse flag is true, process each entry that is a
+ child of the directory.
+
+
+ The TarEntry representing the entry to write to the archive.
+
+
+ If true, process the children of directory entries.
+
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+
+
+
+
+ Releases the unmanaged resources used by the FileStream and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources;
+ false to release only unmanaged resources.
+
+
+
+ Closes the archive and releases any associated resources.
+
+
+
+
+ Ensures that resources are freed and other cleanup operations are performed
+ when the garbage collector reclaims the .
+
+
+
+
+ The TarBuffer class implements the tar archive concept
+ of a buffered input stream. This concept goes back to the
+ days of blocked tape drives and special io devices. In the
+ C# universe, the only real function that this class
+ performs is to ensure that files have the correct "record"
+ size, or other tars will complain.
+
+ You should never have a need to access this class directly.
+ TarBuffers are created by Tar IO Streams.
+
+
+
+
+
+ The size of a block in a tar archive in bytes.
+
+ This is 512 bytes.
+
+
+
+ The number of blocks in a default record.
+
+
+ The default value is 20 blocks per record.
+
+
+
+
+ The size in bytes of a default record.
+
+
+ The default size is 10KB.
+
+
+
+
+ Get the record size for this buffer
+
+ The record size in bytes.
+ This is equal to the multiplied by the
+
+
+
+ Get the TAR Buffer's record size.
+
+ The record size in bytes.
+ This is equal to the multiplied by the
+
+
+
+ Get the Blocking factor for the buffer
+
+ This is the number of blocks in each record.
+
+
+
+ Get the TAR Buffer's block factor
+
+ The block factor; the number of blocks per record.
+
+
+
+ Construct a default TarBuffer
+
+
+
+
+ Create TarBuffer for reading with default BlockFactor
+
+ Stream to buffer
+ A new suitable for input.
+
+
+
+ Construct TarBuffer for reading inputStream setting BlockFactor
+
+ Stream to buffer
+ Blocking factor to apply
+ A new suitable for input.
+
+
+
+ Construct TarBuffer for writing with default BlockFactor
+
+ output stream for buffer
+ A new suitable for output.
+
+
+
+ Construct TarBuffer for writing Tar output to streams.
+
+ Output stream to write to.
+ Blocking factor to apply
+ A new suitable for output.
+
+
+
+ Initialization common to all constructors.
+
+
+
+
+ Determine if an archive block indicates End of Archive. End of
+ archive is indicated by a block that consists entirely of null bytes.
+ All remaining blocks for the record should also be null's
+ However some older tars only do a couple of null blocks (Old GNU tar for one)
+ and also partial records
+
+ The data block to check.
+ Returns true if the block is an EOF block; false otherwise.
+
+
+
+ Determine if an archive block indicates the End of an Archive has been reached.
+ End of archive is indicated by a block that consists entirely of null bytes.
+ All remaining blocks for the record should also be null's
+ However some older tars only do a couple of null blocks (Old GNU tar for one)
+ and also partial records
+
+ The data block to check.
+ Returns true if the block is an EOF block; false otherwise.
+
+
+
+ Skip over a block on the input stream.
+
+
+
+
+ Read a block from the input stream.
+
+
+ The block of data read.
+
+
+
+
+ Read a record from data stream.
+
+
+ false if End-Of-File, else true.
+
+
+
+
+ Get the current block number, within the current record, zero based.
+
+ Block numbers are zero based values
+
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Get the current block number, within the current record, zero based.
+
+
+ The current zero based block number.
+
+
+ The absolute block number = (record number * block factor) + block number.
+
+
+
+
+ Get the current record number.
+
+
+ The current zero based record number.
+
+
+
+
+ Get the current record number.
+
+
+ The current zero based record number.
+
+
+
+
+ Write a block of data to the archive.
+
+
+ The data to write to the archive.
+
+
+
+
+ Write an archive record to the archive, where the record may be
+ inside of a larger array buffer. The buffer must be "offset plus
+ record size" long.
+
+
+ The buffer containing the record data to write.
+
+
+ The offset of the record data within buffer.
+
+
+
+
+ Write a TarBuffer record to the archive.
+
+
+
+
+ WriteFinalRecord writes the current record buffer to output any unwritten data is present.
+
+ Any trailing bytes are set to zero which is by definition correct behaviour
+ for the end of a tar stream.
+
+
+
+ Close the TarBuffer. If this is an output buffer, also flush the
+ current block before closing.
+
+
+
+
+ This class represents an entry in a Tar archive. It consists
+ of the entry's header, as well as the entry's File. Entries
+ can be instantiated in one of three ways, depending on how
+ they are to be used.
+
+ TarEntries that are created from the header bytes read from
+ an archive are instantiated with the TarEntry( byte[] )
+ constructor. These entries will be used when extracting from
+ or listing the contents of an archive. These entries have their
+ header filled in using the header bytes. They also set the File
+ to null, since they reference an archive entry not a file.
+
+ TarEntries that are created from files that are to be written
+ into an archive are instantiated with the CreateEntryFromFile(string)
+ pseudo constructor. These entries have their header filled in using
+ the File's information. They also keep a reference to the File
+ for convenience when writing entries.
+
+ Finally, TarEntries can be constructed from nothing but a name.
+ This allows the programmer to construct the entry by hand, for
+ instance when only an InputStream is available for writing to
+ the archive, and the header information is constructed from
+ other information. In this case the header fields are set to
+ defaults and the File is set to null.
+
+
+
+
+
+ Initialise a default instance of .
+
+
+
+
+ Construct an entry from an archive's header bytes. File is set
+ to null.
+
+
+ The header bytes from a tar archive entry.
+
+
+
+
+ Construct a TarEntry using the header provided
+
+ Header details for entry
+
+
+
+ Clone this tar entry.
+
+ Returns a clone of this entry.
+
+
+
+ Construct an entry with only a name.
+ This allows the programmer to construct the entry's header "by hand".
+
+ The name to use for the entry
+ Returns the newly created
+
+
+
+ Construct an entry for a file. File is set to file, and the
+ header is constructed from information from the file.
+
+ The file name that the entry represents.
+ Returns the newly created
+
+
+
+ Determine if the two entries are equal. Equality is determined
+ by the header names being equal.
+
+ The to compare with the current Object.
+
+ True if the entries are equal; false if not.
+
+
+
+
+ Derive a Hash value for the current
+
+ A Hash code for the current
+
+
+
+ Determine if the given entry is a descendant of this entry.
+ Descendancy is determined by the name of the descendant
+ starting with this entry's name.
+
+
+ Entry to be checked as a descendent of this.
+
+
+ True if entry is a descendant of this.
+
+
+
+
+ Get this entry's header.
+
+
+ This entry's TarHeader.
+
+
+
+
+ Get/Set this entry's name.
+
+
+
+
+ Get/set this entry's user id.
+
+
+
+
+ Get/set this entry's group id.
+
+
+
+
+ Get/set this entry's user name.
+
+
+
+
+ Get/set this entry's group name.
+
+
+
+
+ Convenience method to set this entry's group and user ids.
+
+
+ This entry's new user id.
+
+
+ This entry's new group id.
+
+
+
+
+ Convenience method to set this entry's group and user names.
+
+
+ This entry's new user name.
+
+
+ This entry's new group name.
+
+
+
+
+ Get/Set the modification time for this entry
+
+
+
+
+ Get this entry's file.
+
+
+ This entry's file.
+
+
+
+
+ Get/set this entry's recorded file size.
+
+
+
+
+ Return true if this entry represents a directory, false otherwise
+
+
+ True if this entry is a directory.
+
+
+
+
+ Fill in a TarHeader with information from a File.
+
+
+ The TarHeader to fill in.
+
+
+ The file from which to get the header information.
+
+
+
+
+ Get entries for all files present in this entries directory.
+ If this entry doesnt represent a directory zero entries are returned.
+
+
+ An array of TarEntry's for this entry's children.
+
+
+
+
+ Write an entry's header information to a header buffer.
+
+
+ The tar entry header buffer to fill in.
+
+
+
+
+ Convenience method that will modify an entry's name directly
+ in place in an entry header buffer byte array.
+
+
+ The buffer containing the entry header to modify.
+
+
+ The new name to place into the header buffer.
+
+
+
+
+ Fill in a TarHeader given only the entry's name.
+
+
+ The TarHeader to fill in.
+
+
+ The tar entry name.
+
+
+
+
+ The name of the file this entry represents or null if the entry is not based on a file.
+
+
+
+
+ The entry's header information.
+
+
+
+
+ TarException represents exceptions specific to Tar classes and code.
+
+
+
+
+ Initialise a new instance of .
+
+
+
+
+ Initialise a new instance of with its message string.
+
+ A that describes the error.
+
+
+
+ Initialise a new instance of .
+
+ A that describes the error.
+ The that caused this exception.
+
+
+
+ Initializes a new instance of the TarException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ Reads the extended header of a Tar stream
+
+
+
+
+ Creates a new .
+
+
+
+
+ Read bytes from
+
+
+
+
+
+
+ Returns the parsed headers as key-value strings
+
+
+
+
+ This class encapsulates the Tar Entry Header used in Tar Archives.
+ The class also holds a number of tar constants, used mostly in headers.
+
+
+ The tar format and its POSIX successor PAX have a long history which makes for compatability
+ issues when creating and reading files.
+
+ This is further complicated by a large number of programs with variations on formats
+ One common issue is the handling of names longer than 100 characters.
+ GNU style long names are currently supported.
+
+ This is the ustar (Posix 1003.1) header.
+
+ struct header
+ {
+ char t_name[100]; // 0 Filename
+ char t_mode[8]; // 100 Permissions
+ char t_uid[8]; // 108 Numerical User ID
+ char t_gid[8]; // 116 Numerical Group ID
+ char t_size[12]; // 124 Filesize
+ char t_mtime[12]; // 136 st_mtime
+ char t_chksum[8]; // 148 Checksum
+ char t_typeflag; // 156 Type of File
+ char t_linkname[100]; // 157 Target of Links
+ char t_magic[6]; // 257 "ustar" or other...
+ char t_version[2]; // 263 Version fixed to 00
+ char t_uname[32]; // 265 User Name
+ char t_gname[32]; // 297 Group Name
+ char t_devmajor[8]; // 329 Major for devices
+ char t_devminor[8]; // 337 Minor for devices
+ char t_prefix[155]; // 345 Prefix for t_name
+ char t_mfill[12]; // 500 Filler up to 512
+ };
+
+
+
+
+ The length of the name field in a header buffer.
+
+
+
+
+ The length of the mode field in a header buffer.
+
+
+
+
+ The length of the user id field in a header buffer.
+
+
+
+
+ The length of the group id field in a header buffer.
+
+
+
+
+ The length of the checksum field in a header buffer.
+
+
+
+
+ Offset of checksum in a header buffer.
+
+
+
+
+ The length of the size field in a header buffer.
+
+
+
+
+ The length of the magic field in a header buffer.
+
+
+
+
+ The length of the version field in a header buffer.
+
+
+
+
+ The length of the modification time field in a header buffer.
+
+
+
+
+ The length of the user name field in a header buffer.
+
+
+
+
+ The length of the group name field in a header buffer.
+
+
+
+
+ The length of the devices field in a header buffer.
+
+
+
+
+ The length of the name prefix field in a header buffer.
+
+
+
+
+ The "old way" of indicating a normal file.
+
+
+
+
+ Normal file type.
+
+
+
+
+ Link file type.
+
+
+
+
+ Symbolic link file type.
+
+
+
+
+ Character device file type.
+
+
+
+
+ Block device file type.
+
+
+
+
+ Directory file type.
+
+
+
+
+ FIFO (pipe) file type.
+
+
+
+
+ Contiguous file type.
+
+
+
+
+ Posix.1 2001 global extended header
+
+
+
+
+ Posix.1 2001 extended header
+
+
+
+
+ Solaris access control list file type
+
+
+
+
+ GNU dir dump file type
+ This is a dir entry that contains the names of files that were in the
+ dir at the time the dump was made
+
+
+
+
+ Solaris Extended Attribute File
+
+
+
+
+ Inode (metadata only) no file content
+
+
+
+
+ Identifies the next file on the tape as having a long link name
+
+
+
+
+ Identifies the next file on the tape as having a long name
+
+
+
+
+ Continuation of a file that began on another volume
+
+
+
+
+ For storing filenames that dont fit in the main header (old GNU)
+
+
+
+
+ GNU Sparse file
+
+
+
+
+ GNU Tape/volume header ignore on extraction
+
+
+
+
+ The magic tag representing a POSIX tar archive. (would be written with a trailing NULL)
+
+
+
+
+ The magic tag representing an old GNU tar archive where version is included in magic and overwrites it
+
+
+
+
+ Initialise a default TarHeader instance
+
+
+
+
+ Get/set the name for this tar entry.
+
+ Thrown when attempting to set the property to null.
+
+
+
+ Get the name of this entry.
+
+ The entry's name.
+
+
+
+ Get/set the entry's Unix style permission mode.
+
+
+
+
+ The entry's user id.
+
+
+ This is only directly relevant to unix systems.
+ The default is zero.
+
+
+
+
+ Get/set the entry's group id.
+
+
+ This is only directly relevant to linux/unix systems.
+ The default value is zero.
+
+
+
+
+ Get/set the entry's size.
+
+ Thrown when setting the size to less than zero.
+
+
+
+ Get/set the entry's modification time.
+
+
+ The modification time is only accurate to within a second.
+
+ Thrown when setting the date time to less than 1/1/1970.
+
+
+
+ Get the entry's checksum. This is only valid/updated after writing or reading an entry.
+
+
+
+
+ Get value of true if the header checksum is valid, false otherwise.
+
+
+
+
+ Get/set the entry's type flag.
+
+
+
+
+ The entry's link name.
+
+ Thrown when attempting to set LinkName to null.
+
+
+
+ Get/set the entry's magic tag.
+
+ Thrown when attempting to set Magic to null.
+
+
+
+ The entry's version.
+
+ Thrown when attempting to set Version to null.
+
+
+
+ The entry's user name.
+
+
+
+
+ Get/set the entry's group name.
+
+
+ This is only directly relevant to unix systems.
+
+
+
+
+ Get/set the entry's major device number.
+
+
+
+
+ Get/set the entry's minor device number.
+
+
+
+
+ Create a new that is a copy of the current instance.
+
+ A new that is a copy of the current instance.
+
+
+
+ Parse TarHeader information from a header buffer.
+
+
+ The tar entry header buffer to get information from.
+
+
+
+
+ 'Write' header information to buffer provided, updating the check sum.
+
+ output buffer for header information
+
+
+
+ Get a hash code for the current object.
+
+ A hash code for the current object.
+
+
+
+ Determines if this instance is equal to the specified object.
+
+ The object to compare with.
+ true if the objects are equal, false otherwise.
+
+
+
+ Set defaults for values used when constructing a TarHeader instance.
+
+ Value to apply as a default for userId.
+ Value to apply as a default for userName.
+ Value to apply as a default for groupId.
+ Value to apply as a default for groupName.
+
+
+
+ Parse an octal string from a header buffer.
+
+ The header buffer from which to parse.
+ The offset into the buffer from which to parse.
+ The number of header bytes to parse.
+ The long equivalent of the octal string.
+
+
+
+ Parse a name from a header buffer.
+
+
+ The header buffer from which to parse.
+
+
+ The offset into the buffer from which to parse.
+
+
+ The number of header bytes to parse.
+
+
+ The name parsed.
+
+
+
+
+ Add name to the buffer as a collection of bytes
+
+ The name to add
+ The offset of the first character
+ The buffer to add to
+ The index of the first byte to add
+ The number of characters/bytes to add
+ The next free index in the
+
+
+
+ Add name to the buffer as a collection of bytes
+
+ The name to add
+ The offset of the first character
+ The buffer to add to
+ The index of the first byte to add
+ The number of characters/bytes to add
+ The next free index in the
+
+
+
+ Add an entry name to the buffer
+
+
+ The name to add
+
+
+ The buffer to add to
+
+
+ The offset into the buffer from which to start adding
+
+
+ The number of header bytes to add
+
+
+ The index of the next free byte in the buffer
+
+
+
+
+ Add an entry name to the buffer
+
+ The name to add
+ The buffer to add to
+ The offset into the buffer from which to start adding
+ The number of header bytes to add
+ The index of the next free byte in the buffer
+
+
+
+ Add a string to a buffer as a collection of ascii bytes.
+
+ The string to add
+ The offset of the first character to add.
+ The buffer to add to.
+ The offset to start adding at.
+ The number of ascii characters to add.
+ The next free index in the buffer.
+
+
+
+ Put an octal representation of a value into a buffer
+
+
+ the value to be converted to octal
+
+
+ buffer to store the octal string
+
+
+ The offset into the buffer where the value starts
+
+
+ The length of the octal string to create
+
+
+ The offset of the character next byte after the octal string
+
+
+
+
+ Put an octal or binary representation of a value into a buffer
+
+ Value to be convert to octal
+ The buffer to update
+ The offset into the buffer to store the value
+ The length of the octal string. Must be 12.
+ Index of next byte
+
+
+
+ Add the checksum integer to header buffer.
+
+
+ The header buffer to set the checksum for
+ The offset into the buffer for the checksum
+ The number of header bytes to update.
+ It's formatted differently from the other fields: it has 6 digits, a
+ null, then a space -- rather than digits, a space, then a null.
+ The final space is already there, from checksumming
+
+ The modified buffer offset
+
+
+
+ Compute the checksum for a tar entry header.
+ The checksum field must be all spaces prior to this happening
+
+ The tar entry's header buffer.
+ The computed checksum.
+
+
+
+ Make a checksum for a tar entry ignoring the checksum contents.
+
+ The tar entry's header buffer.
+ The checksum for the buffer
+
+
+
+ The TarInputStream reads a UNIX tar archive as an InputStream.
+ methods are provided to position at each successive entry in
+ the archive, and the read each entry as a normal input stream
+ using read().
+
+
+
+
+ Construct a TarInputStream with default block factor
+
+ stream to source data from
+
+
+
+ Construct a TarInputStream with user specified block factor
+
+ stream to source data from
+ block factor to apply to archive
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Gets a value indicating whether the current stream supports reading
+
+
+
+
+ Gets a value indicating whether the current stream supports seeking
+ This property always returns false.
+
+
+
+
+ Gets a value indicating if the stream supports writing.
+ This property always returns false.
+
+
+
+
+ The length in bytes of the stream
+
+
+
+
+ Gets or sets the position within the stream.
+ Setting the Position is not supported and throws a NotSupportedExceptionNotSupportedException
+
+ Any attempt to set position
+
+
+
+ Flushes the baseInputStream
+
+
+
+
+ Set the streams position. This operation is not supported and will throw a NotSupportedException
+
+ The offset relative to the origin to seek to.
+ The to start seeking from.
+ The new position in the stream.
+ Any access
+
+
+
+ Sets the length of the stream
+ This operation is not supported and will throw a NotSupportedException
+
+ The new stream length.
+ Any access
+
+
+
+ Writes a block of bytes to this stream using data from a buffer.
+ This operation is not supported and will throw a NotSupportedException
+
+ The buffer containing bytes to write.
+ The offset in the buffer of the frist byte to write.
+ The number of bytes to write.
+ Any access
+
+
+
+ Writes a byte to the current position in the file stream.
+ This operation is not supported and will throw a NotSupportedException
+
+ The byte value to write.
+ Any access
+
+
+
+ Reads a byte from the current tar archive entry.
+
+ A byte cast to an int; -1 if the at the end of the stream.
+
+
+
+ Reads bytes from the current tar archive entry.
+
+ This method is aware of the boundaries of the current
+ entry in the archive and will deal with them appropriately
+
+
+ The buffer into which to place bytes read.
+
+
+ The offset at which to place bytes read.
+
+
+ The number of bytes to read.
+
+
+ The number of bytes read, or 0 at end of stream/EOF.
+
+
+
+
+ Closes this stream. Calls the TarBuffer's close() method.
+ The underlying stream is closed by the TarBuffer.
+
+
+
+
+ Set the entry factory for this instance.
+
+ The factory for creating new entries
+
+
+
+ Get the record size being used by this stream's TarBuffer.
+
+
+
+
+ Get the record size being used by this stream's TarBuffer.
+
+
+ TarBuffer record size.
+
+
+
+
+ Get the available data that can be read from the current
+ entry in the archive. This does not indicate how much data
+ is left in the entire archive, only in the current entry.
+ This value is determined from the entry's size header field
+ and the amount of data already read from the current entry.
+
+
+ The number of available bytes for the current entry.
+
+
+
+
+ Skip bytes in the input buffer. This skips bytes in the
+ current entry's data, not the entire archive, and will
+ stop at the end of the current entry's data if the number
+ to skip extends beyond that point.
+
+
+ The number of bytes to skip.
+
+
+
+
+ Return a value of true if marking is supported; false otherwise.
+
+ Currently marking is not supported, the return value is always false.
+
+
+
+ Since we do not support marking just yet, we do nothing.
+
+
+ The limit to mark.
+
+
+
+
+ Since we do not support marking just yet, we do nothing.
+
+
+
+
+ Get the next entry in this tar archive. This will skip
+ over any remaining data in the current entry, if there
+ is one, and place the input stream at the header of the
+ next entry, and read the header and instantiate a new
+ TarEntry from the header bytes and return that entry.
+ If there are no more entries in the archive, null will
+ be returned to indicate that the end of the archive has
+ been reached.
+
+
+ The next TarEntry in the archive, or null.
+
+
+
+
+ Copies the contents of the current tar archive entry directly into
+ an output stream.
+
+
+ The OutputStream into which to write the entry's data.
+
+
+
+
+ This interface is provided, along with the method , to allow
+ the programmer to have their own subclass instantiated for the
+ entries return from .
+
+
+
+
+ Create an entry based on name alone
+
+
+ Name of the new EntryPointNotFoundException to create
+
+ created TarEntry or descendant class
+
+
+
+ Create an instance based on an actual file
+
+
+ Name of file to represent in the entry
+
+
+ Created TarEntry or descendant class
+
+
+
+
+ Create a tar entry based on the header information passed
+
+
+ Buffer containing header information to create an an entry from.
+
+
+ Created TarEntry or descendant class
+
+
+
+
+ Standard entry factory class creating instances of the class TarEntry
+
+
+
+
+ Create a based on named
+
+ The name to use for the entry
+ A new
+
+
+
+ Create a tar entry with details obtained from file
+
+ The name of the file to retrieve details from.
+ A new
+
+
+
+ Create an entry based on details in header
+
+ The buffer containing entry details.
+ A new
+
+
+
+ Flag set when last block has been read
+
+
+
+
+ Size of this entry as recorded in header
+
+
+
+
+ Number of bytes read for this entry so far
+
+
+
+
+ Buffer used with calls to Read()
+
+
+
+
+ Working buffer
+
+
+
+
+ Current entry being read
+
+
+
+
+ Factory used to create TarEntry or descendant class instance
+
+
+
+
+ Stream used as the source of input data.
+
+
+
+
+ The TarOutputStream writes a UNIX tar archive as an OutputStream.
+ Methods are provided to put entries, and then write their contents
+ by writing to this stream using write().
+
+ public
+
+
+
+ Construct TarOutputStream using default block factor
+
+ stream to write to
+
+
+
+ Construct TarOutputStream with user specified block factor
+
+ stream to write to
+ blocking factor
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ true if the stream supports reading; otherwise, false.
+
+
+
+
+ true if the stream supports seeking; otherwise, false.
+
+
+
+
+ true if stream supports writing; otherwise, false.
+
+
+
+
+ length of stream in bytes
+
+
+
+
+ gets or sets the position within the current stream.
+
+
+
+
+ set the position within the current stream
+
+ The offset relative to the to seek to
+ The to seek from.
+ The new position in the stream.
+
+
+
+ Set the length of the current stream
+
+ The new stream length.
+
+
+
+ Read a byte from the stream and advance the position within the stream
+ by one byte or returns -1 if at the end of the stream.
+
+ The byte value or -1 if at end of stream
+
+
+
+ read bytes from the current stream and advance the position within the
+ stream by the number of bytes read.
+
+ The buffer to store read bytes in.
+ The index into the buffer to being storing bytes at.
+ The desired number of bytes to read.
+ The total number of bytes read, or zero if at the end of the stream.
+ The number of bytes may be less than the count
+ requested if data is not avialable.
+
+
+
+ All buffered data is written to destination
+
+
+
+
+ Ends the TAR archive without closing the underlying OutputStream.
+ The result is that the EOF block of nulls is written.
+
+
+
+
+ Ends the TAR archive and closes the underlying OutputStream.
+
+ This means that Finish() is called followed by calling the
+ TarBuffer's Close().
+
+
+
+ Get the record size being used by this stream's TarBuffer.
+
+
+
+
+ Get the record size being used by this stream's TarBuffer.
+
+
+ The TarBuffer record size.
+
+
+
+
+ Get a value indicating wether an entry is open, requiring more data to be written.
+
+
+
+
+ Put an entry on the output stream. This writes the entry's
+ header and positions the output stream for writing
+ the contents of the entry. Once this method is called, the
+ stream is ready for calls to write() to write the entry's
+ contents. Once the contents are written, closeEntry()
+ MUST be called to ensure that all buffered data
+ is completely written to the output stream.
+
+
+ The TarEntry to be written to the archive.
+
+
+
+
+ Close an entry. This method MUST be called for all file
+ entries that contain data. The reason is that we must
+ buffer data written to the stream in order to satisfy
+ the buffer's block based writes. Thus, there may be
+ data fragments still being assembled that must be written
+ to the output stream before this entry is closed and the
+ next entry written.
+
+
+
+
+ Writes a byte to the current tar archive entry.
+ This method simply calls Write(byte[], int, int).
+
+
+ The byte to be written.
+
+
+
+
+ Writes bytes to the current tar archive entry. This method
+ is aware of the current entry and will throw an exception if
+ you attempt to write bytes past the length specified for the
+ current entry. The method is also (painfully) aware of the
+ record buffering required by TarBuffer, and manages buffers
+ that are not a multiple of recordsize in length, including
+ assembling records from small buffers.
+
+
+ The buffer to write to the archive.
+
+
+ The offset in the buffer from which to get bytes.
+
+
+ The number of bytes to write.
+
+
+
+
+ Write an EOF (end of archive) block to the tar archive.
+ The end of the archive is indicated by two blocks consisting entirely of zero bytes.
+
+
+
+
+ bytes written for this entry so far
+
+
+
+
+ current 'Assembly' buffer length
+
+
+
+
+ Flag indicating wether this instance has been closed or not.
+
+
+
+
+ Size for the current entry
+
+
+
+
+ single block working buffer
+
+
+
+
+ 'Assembly' buffer used to assemble data before writing
+
+
+
+
+ TarBuffer used to provide correct blocking factor
+
+
+
+
+ the destination stream for the archive contents
+
+
+
+
+ This is the Deflater class. The deflater class compresses input
+ with the deflate algorithm described in RFC 1951. It has several
+ compression levels and three different strategies described below.
+
+ This class is not thread safe. This is inherent in the API, due
+ to the split of deflate and setInput.
+
+ author of the original java version : Jochen Hoenicke
+
+
+
+
+ The best and slowest compression level. This tries to find very
+ long and distant string repetitions.
+
+
+
+
+ The worst but fastest compression level.
+
+
+
+
+ The default compression level.
+
+
+
+
+ This level won't compress at all but output uncompressed blocks.
+
+
+
+
+ The compression method. This is the only method supported so far.
+ There is no need to use this constant at all.
+
+
+
+
+ Compression Level as an enum for safer use
+
+
+
+
+ The best and slowest compression level. This tries to find very
+ long and distant string repetitions.
+
+
+
+
+ The worst but fastest compression level.
+
+
+
+
+ The default compression level.
+
+
+
+
+ This level won't compress at all but output uncompressed blocks.
+
+
+
+
+ The compression method. This is the only method supported so far.
+ There is no need to use this constant at all.
+
+
+
+
+ Creates a new deflater with default compression level.
+
+
+
+
+ Creates a new deflater with given compression level.
+
+
+ the compression level, a value between NO_COMPRESSION
+ and BEST_COMPRESSION, or DEFAULT_COMPRESSION.
+
+ if lvl is out of range.
+
+
+
+ Creates a new deflater with given compression level.
+
+
+ the compression level, a value between NO_COMPRESSION
+ and BEST_COMPRESSION.
+
+
+ true, if we should suppress the Zlib/RFC1950 header at the
+ beginning and the adler checksum at the end of the output. This is
+ useful for the GZIP/PKZIP formats.
+
+ if lvl is out of range.
+
+
+
+ Resets the deflater. The deflater acts afterwards as if it was
+ just created with the same compression level and strategy as it
+ had before.
+
+
+
+
+ Gets the current adler checksum of the data that was processed so far.
+
+
+
+
+ Gets the number of input bytes processed so far.
+
+
+
+
+ Gets the number of output bytes so far.
+
+
+
+
+ Flushes the current input block. Further calls to deflate() will
+ produce enough output to inflate everything in the current input
+ block. This is not part of Sun's JDK so I have made it package
+ private. It is used by DeflaterOutputStream to implement
+ flush().
+
+
+
+
+ Finishes the deflater with the current input block. It is an error
+ to give more input after this method was called. This method must
+ be called to force all bytes to be flushed.
+
+
+
+
+ Returns true if the stream was finished and no more output bytes
+ are available.
+
+
+
+
+ Returns true, if the input buffer is empty.
+ You should then call setInput().
+ NOTE: This method can also return true when the stream
+ was finished.
+
+
+
+
+ Sets the data which should be compressed next. This should be only
+ called when needsInput indicates that more input is needed.
+ If you call setInput when needsInput() returns false, the
+ previous input that is still pending will be thrown away.
+ The given byte array should not be changed, before needsInput() returns
+ true again.
+ This call is equivalent to setInput(input, 0, input.length).
+
+
+ the buffer containing the input data.
+
+
+ if the buffer was finished() or ended().
+
+
+
+
+ Sets the data which should be compressed next. This should be
+ only called when needsInput indicates that more input is needed.
+ The given byte array should not be changed, before needsInput() returns
+ true again.
+
+
+ the buffer containing the input data.
+
+
+ the start of the data.
+
+
+ the number of data bytes of input.
+
+
+ if the buffer was Finish()ed or if previous input is still pending.
+
+
+
+
+ Sets the compression level. There is no guarantee of the exact
+ position of the change, but if you call this when needsInput is
+ true the change of compression level will occur somewhere near
+ before the end of the so far given input.
+
+
+ the new compression level.
+
+
+
+
+ Get current compression level
+
+ Returns the current compression level
+
+
+
+ Sets the compression strategy. Strategy is one of
+ DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact
+ position where the strategy is changed, the same as for
+ SetLevel() applies.
+
+
+ The new compression strategy.
+
+
+
+
+ Deflates the current input block with to the given array.
+
+
+ The buffer where compressed data is stored
+
+
+ The number of compressed bytes added to the output, or 0 if either
+ IsNeedingInput() or IsFinished returns true or length is zero.
+
+
+
+
+ Deflates the current input block to the given array.
+
+
+ Buffer to store the compressed data.
+
+
+ Offset into the output array.
+
+
+ The maximum number of bytes that may be stored.
+
+
+ The number of compressed bytes added to the output, or 0 if either
+ needsInput() or finished() returns true or length is zero.
+
+
+ If Finish() was previously called.
+
+
+ If offset or length don't match the array length.
+
+
+
+
+ Sets the dictionary which should be used in the deflate process.
+ This call is equivalent to setDictionary(dict, 0, dict.Length).
+
+
+ the dictionary.
+
+
+ if SetInput () or Deflate () were already called or another dictionary was already set.
+
+
+
+
+ Sets the dictionary which should be used in the deflate process.
+ The dictionary is a byte array containing strings that are
+ likely to occur in the data which should be compressed. The
+ dictionary is not stored in the compressed output, only a
+ checksum. To decompress the output you need to supply the same
+ dictionary again.
+
+
+ The dictionary data
+
+
+ The index where dictionary information commences.
+
+
+ The number of bytes in the dictionary.
+
+
+ If SetInput () or Deflate() were already called or another dictionary was already set.
+
+
+
+
+ Compression level.
+
+
+
+
+ If true no Zlib/RFC1950 headers or footers are generated
+
+
+
+
+ The current state.
+
+
+
+
+ The total bytes of output written.
+
+
+
+
+ The pending output.
+
+
+
+
+ The deflater engine.
+
+
+
+
+ This class contains constants used for deflation.
+
+
+
+
+ Set to true to enable debugging
+
+
+
+
+ Written to Zip file to identify a stored block
+
+
+
+
+ Identifies static tree in Zip file
+
+
+
+
+ Identifies dynamic tree in Zip file
+
+
+
+
+ Header flag indicating a preset dictionary for deflation
+
+
+
+
+ Sets internal buffer sizes for Huffman encoding
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Internal compression engine constant
+
+
+
+
+ Strategies for deflater
+
+
+
+
+ The default strategy
+
+
+
+
+ This strategy will only allow longer string repetitions. It is
+ useful for random data with a small character set.
+
+
+
+
+ This strategy will not look for string repetitions at all. It
+ only encodes with Huffman trees (which means, that more common
+ characters get a smaller encoding.
+
+
+
+
+ Low level compression engine for deflate algorithm which uses a 32K sliding window
+ with secondary compression from Huffman/Shannon-Fano codes.
+
+
+
+
+ Construct instance with pending buffer
+ Adler calculation will be peformed
+
+
+ Pending buffer to use
+
+
+
+
+ Construct instance with pending buffer
+
+
+ Pending buffer to use
+
+
+ If no adler calculation should be performed
+
+
+
+
+ Deflate drives actual compression of data
+
+ True to flush input buffers
+ Finish deflation with the current input.
+ Returns true if progress has been made.
+
+
+
+ Sets input data to be deflated. Should only be called when NeedsInput()
+ returns true
+
+ The buffer containing input data.
+ The offset of the first byte of data.
+ The number of bytes of data to use as input.
+
+
+
+ Determines if more input is needed.
+
+ Return true if input is needed via SetInput
+
+
+
+ Set compression dictionary
+
+ The buffer containing the dictionary data
+ The offset in the buffer for the first byte of data
+ The length of the dictionary data.
+
+
+
+ Reset internal state
+
+
+
+
+ Reset Adler checksum
+
+
+
+
+ Get current value of Adler checksum
+
+
+
+
+ Total data processed
+
+
+
+
+ Get/set the deflate strategy
+
+
+
+
+ Set the deflate level (0-9)
+
+ The value to set the level to.
+
+
+
+ Fill the window
+
+
+
+
+ Inserts the current string in the head hash and returns the previous
+ value for this hash.
+
+ The previous hash value
+
+
+
+ Find the best (longest) string in the window matching the
+ string starting at strstart.
+
+ Preconditions:
+
+ strstart + DeflaterConstants.MAX_MATCH <= window.length.
+
+
+ True if a match greater than the minimum length is found
+
+
+
+ Hashtable, hashing three characters to an index for window, so
+ that window[index]..window[index+2] have this hash code.
+ Note that the array should really be unsigned short, so you need
+ to and the values with 0xffff.
+
+
+
+
+ prev[index & WMASK] points to the previous index that has the
+ same hash code as the string starting at index. This way
+ entries with the same hash code are in a linked list.
+ Note that the array should really be unsigned short, so you need
+ to and the values with 0xffff.
+
+
+
+
+ Points to the current character in the window.
+
+
+
+
+ lookahead is the number of characters starting at strstart in
+ window that are valid.
+ So window[strstart] until window[strstart+lookahead-1] are valid
+ characters.
+
+
+
+
+ This array contains the part of the uncompressed stream that
+ is of relevance. The current character is indexed by strstart.
+
+
+
+
+ The current compression function.
+
+
+
+
+ The input data for compression.
+
+
+
+
+ The total bytes of input read.
+
+
+
+
+ The offset into inputBuf, where input data starts.
+
+
+
+
+ The end offset of the input data.
+
+
+
+
+ The adler checksum
+
+
+
+
+ This is the DeflaterHuffman class.
+
+ This class is not thread safe. This is inherent in the API, due
+ to the split of Deflate and SetInput.
+
+ author of the original java version : Jochen Hoenicke
+
+
+
+
+ Resets the internal state of the tree
+
+
+
+
+ Check that all frequencies are zero
+
+
+ At least one frequency is non-zero
+
+
+
+
+ Set static codes and length
+
+ new codes
+ length for new codes
+
+
+
+ Build dynamic codes and lengths
+
+
+
+
+ Get encoded length
+
+ Encoded length, the sum of frequencies * lengths
+
+
+
+ Scan a literal or distance tree to determine the frequencies of the codes
+ in the bit length tree.
+
+
+
+
+ Write tree values
+
+ Tree to write
+
+
+
+ Pending buffer to use
+
+
+
+
+ Construct instance with pending buffer
+
+ Pending buffer to use
+
+
+
+ Reset internal state
+
+
+
+
+ Write all trees to pending buffer
+
+ The number/rank of treecodes to send.
+
+
+
+ Compress current buffer writing data to pending buffer
+
+
+
+
+ Flush block to output with no compression
+
+ Data to write
+ Index of first byte to write
+ Count of bytes to write
+ True if this is the last block
+
+
+
+ Flush block to output with compression
+
+ Data to flush
+ Index of first byte to flush
+ Count of bytes to flush
+ True if this is the last block
+
+
+
+ Get value indicating if internal buffer is full
+
+ true if buffer is full
+
+
+
+ Add literal to buffer
+
+ Literal value to add to buffer.
+ Value indicating internal buffer is full
+
+
+
+ Add distance code and length to literal and distance trees
+
+ Distance code
+ Length
+ Value indicating if internal buffer is full
+
+
+
+ Reverse the bits of a 16 bit value.
+
+ Value to reverse bits
+ Value with bits reversed
+
+
+
+ This class stores the pending output of the Deflater.
+
+ author of the original java version : Jochen Hoenicke
+
+
+
+
+ Construct instance with default buffer size
+
+
+
+
+ Inflater is used to decompress data that has been compressed according
+ to the "deflate" standard described in rfc1951.
+
+ By default Zlib (rfc1950) headers and footers are expected in the input.
+ You can use constructor public Inflater(bool noHeader) passing true
+ if there is no Zlib header information
+
+ The usage is as following. First you have to set some input with
+ SetInput(), then Inflate() it. If inflate doesn't
+ inflate any bytes there may be three reasons:
+
+
IsNeedingInput() returns true because the input buffer is empty.
+ You have to provide more input with SetInput().
+ NOTE: IsNeedingInput() also returns true when, the stream is finished.
+
+
IsNeedingDictionary() returns true, you have to provide a preset
+ dictionary with SetDictionary().
+
IsFinished returns true, the inflater has finished.
+
+ Once the first output byte is produced, a dictionary will not be
+ needed at a later stage.
+
+ author of the original java version : John Leuner, Jochen Hoenicke
+
+
+
+
+ Copy lengths for literal codes 257..285
+
+
+
+
+ Extra bits for literal codes 257..285
+
+
+
+
+ Copy offsets for distance codes 0..29
+
+
+
+
+ Extra bits for distance codes
+
+
+
+
+ These are the possible states for an inflater
+
+
+
+
+ This variable contains the current state.
+
+
+
+
+ The adler checksum of the dictionary or of the decompressed
+ stream, as it is written in the header resp. footer of the
+ compressed stream.
+ Only valid if mode is DECODE_DICT or DECODE_CHKSUM.
+
+
+
+
+ The number of bits needed to complete the current state. This
+ is valid, if mode is DECODE_DICT, DECODE_CHKSUM,
+ DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS.
+
+
+
+
+ True, if the last block flag was set in the last block of the
+ inflated stream. This means that the stream ends after the
+ current block.
+
+
+
+
+ The total number of inflated bytes.
+
+
+
+
+ The total number of bytes set with setInput(). This is not the
+ value returned by the TotalIn property, since this also includes the
+ unprocessed input.
+
+
+
+
+ This variable stores the noHeader flag that was given to the constructor.
+ True means, that the inflated stream doesn't contain a Zlib header or
+ footer.
+
+
+
+
+ Creates a new inflater or RFC1951 decompressor
+ RFC1950/Zlib headers and footers will be expected in the input data
+
+
+
+
+ Creates a new inflater.
+
+
+ True if no RFC1950/Zlib header and footer fields are expected in the input data
+
+ This is used for GZIPed/Zipped input.
+
+ For compatibility with
+ Sun JDK you should provide one byte of input more than needed in
+ this case.
+
+
+
+
+ Resets the inflater so that a new stream can be decompressed. All
+ pending input and output will be discarded.
+
+
+
+
+ Decodes a zlib/RFC1950 header.
+
+
+ False if more input is needed.
+
+
+ The header is invalid.
+
+
+
+
+ Decodes the dictionary checksum after the deflate header.
+
+
+ False if more input is needed.
+
+
+
+
+ Decodes the huffman encoded symbols in the input stream.
+
+
+ false if more input is needed, true if output window is
+ full or the current block ends.
+
+
+ if deflated stream is invalid.
+
+
+
+
+ Decodes the adler checksum after the deflate stream.
+
+
+ false if more input is needed.
+
+
+ If checksum doesn't match.
+
+
+
+
+ Decodes the deflated stream.
+
+
+ false if more input is needed, or if finished.
+
+
+ if deflated stream is invalid.
+
+
+
+
+ Sets the preset dictionary. This should only be called, if
+ needsDictionary() returns true and it should set the same
+ dictionary, that was used for deflating. The getAdler()
+ function returns the checksum of the dictionary needed.
+
+
+ The dictionary.
+
+
+
+
+ Sets the preset dictionary. This should only be called, if
+ needsDictionary() returns true and it should set the same
+ dictionary, that was used for deflating. The getAdler()
+ function returns the checksum of the dictionary needed.
+
+
+ The dictionary.
+
+
+ The index into buffer where the dictionary starts.
+
+
+ The number of bytes in the dictionary.
+
+
+ No dictionary is needed.
+
+
+ The adler checksum for the buffer is invalid
+
+
+
+
+ Sets the input. This should only be called, if needsInput()
+ returns true.
+
+
+ the input.
+
+
+
+
+ Sets the input. This should only be called, if needsInput()
+ returns true.
+
+
+ The source of input data
+
+
+ The index into buffer where the input starts.
+
+
+ The number of bytes of input to use.
+
+
+ No input is needed.
+
+
+ The index and/or count are wrong.
+
+
+
+
+ Inflates the compressed stream to the output buffer. If this
+ returns 0, you should check, whether IsNeedingDictionary(),
+ IsNeedingInput() or IsFinished() returns true, to determine why no
+ further output is produced.
+
+
+ the output buffer.
+
+
+ The number of bytes written to the buffer, 0 if no further
+ output can be produced.
+
+
+ if buffer has length 0.
+
+
+ if deflated stream is invalid.
+
+
+
+
+ Inflates the compressed stream to the output buffer. If this
+ returns 0, you should check, whether needsDictionary(),
+ needsInput() or finished() returns true, to determine why no
+ further output is produced.
+
+
+ the output buffer.
+
+
+ the offset in buffer where storing starts.
+
+
+ the maximum number of bytes to output.
+
+
+ the number of bytes written to the buffer, 0 if no further output can be produced.
+
+
+ if count is less than 0.
+
+
+ if the index and / or count are wrong.
+
+
+ if deflated stream is invalid.
+
+
+
+
+ Returns true, if the input buffer is empty.
+ You should then call setInput().
+ NOTE: This method also returns true when the stream is finished.
+
+
+
+
+ Returns true, if a preset dictionary is needed to inflate the input.
+
+
+
+
+ Returns true, if the inflater has finished. This means, that no
+ input is needed and no output can be produced.
+
+
+
+
+ Gets the adler checksum. This is either the checksum of all
+ uncompressed bytes returned by inflate(), or if needsDictionary()
+ returns true (and thus no output was yet produced) this is the
+ adler checksum of the expected dictionary.
+
+
+ the adler checksum.
+
+
+
+
+ Gets the total number of output bytes returned by Inflate().
+
+
+ the total number of output bytes.
+
+
+
+
+ Gets the total number of processed compressed input bytes.
+
+
+ The total number of bytes of processed input bytes.
+
+
+
+
+ Gets the number of unprocessed input bytes. Useful, if the end of the
+ stream is reached and you want to further process the bytes after
+ the deflate stream.
+
+
+ The number of bytes of the input which have not been processed.
+
+
+
+
+ Continue decoding header from until more bits are needed or decoding has been completed
+
+ Returns whether decoding could be completed
+
+
+
+ Get literal/length huffman tree, must not be used before has returned true
+
+ If hader has not been successfully read by the state machine
+
+
+
+ Get distance huffman tree, must not be used before has returned true
+
+ If hader has not been successfully read by the state machine
+
+
+
+ Huffman tree used for inflation
+
+
+
+
+ Literal length tree
+
+
+
+
+ Distance tree
+
+
+
+
+ Constructs a Huffman tree from the array of code lengths.
+
+
+ the array of code lengths
+
+
+
+
+ Reads the next symbol from input. The symbol is encoded using the
+ huffman tree.
+
+
+ input the input source.
+
+
+ the next symbol, or -1 if not enough input is available.
+
+
+
+
+ This class is general purpose class for writing data to a buffer.
+
+ It allows you to write bits as well as bytes
+ Based on DeflaterPending.java
+
+ author of the original java version : Jochen Hoenicke
+
+
+
+
+ Internal work buffer
+
+
+
+
+ construct instance using default buffer size of 4096
+
+
+
+
+ construct instance using specified buffer size
+
+
+ size to use for internal buffer
+
+
+
+
+ Clear internal state/buffers
+
+
+
+
+ Write a byte to buffer
+
+
+ The value to write
+
+
+
+
+ Write a short value to buffer LSB first
+
+
+ The value to write.
+
+
+
+
+ write an integer LSB first
+
+ The value to write.
+
+
+
+ Write a block of data to buffer
+
+ data to write
+ offset of first byte to write
+ number of bytes to write
+
+
+
+ The number of bits written to the buffer
+
+
+
+
+ Align internal buffer on a byte boundary
+
+
+
+
+ Write bits to internal buffer
+
+ source of bits
+ number of bits to write
+
+
+
+ Write a short value to internal buffer most significant byte first
+
+ value to write
+
+
+
+ Indicates if buffer has been flushed
+
+
+
+
+ Flushes the pending buffer into the given output array. If the
+ output array is to small, only a partial flush is done.
+
+ The output array.
+ The offset into output array.
+ The maximum number of bytes to store.
+ The number of bytes flushed.
+
+
+
+ Convert internal buffer to byte array.
+ Buffer is empty on completion
+
+
+ The internal buffer contents converted to a byte array.
+
+
+
+
+ A special stream deflating or compressing the bytes that are
+ written to it. It uses a Deflater to perform actual deflating.
+ Authors of the original java version : Tom Tromey, Jochen Hoenicke
+
+
+
+
+ Creates a new DeflaterOutputStream with a default Deflater and default buffer size.
+
+
+ the output stream where deflated output should be written.
+
+
+
+
+ Creates a new DeflaterOutputStream with the given Deflater and
+ default buffer size.
+
+
+ the output stream where deflated output should be written.
+
+
+ the underlying deflater.
+
+
+
+
+ Creates a new DeflaterOutputStream with the given Deflater and
+ buffer size.
+
+
+ The output stream where deflated output is written.
+
+
+ The underlying deflater to use
+
+
+ The buffer size in bytes to use when deflating (minimum value 512)
+
+
+ bufsize is less than or equal to zero.
+
+
+ baseOutputStream does not support writing
+
+
+ deflater instance is null
+
+
+
+
+ Finishes the stream by calling finish() on the deflater.
+
+
+ Not all input is deflated
+
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Allows client to determine if an entry can be patched after its added
+
+
+
+
+ Returns the 10 byte AUTH CODE to be appended immediately following the AES data stream.
+
+
+
+
+ Get/set the password used for encryption.
+
+ When set to null or if the password is empty no encryption is performed
+
+
+
+ Encrypt a block of data
+
+
+ Data to encrypt. NOTE the original contents of the buffer are lost
+
+
+ Offset of first byte in buffer to encrypt
+
+
+ Number of bytes in buffer to encrypt
+
+
+
+
+ Initializes encryption keys based on given .
+
+ The password.
+
+
+
+ Initializes encryption keys based on given password.
+
+
+
+
+ Deflates everything in the input buffers. This will call
+ def.deflate() until all bytes from the input buffers
+ are processed.
+
+
+
+
+ Gets value indicating stream can be read from
+
+
+
+
+ Gets a value indicating if seeking is supported for this stream
+ This property always returns false
+
+
+
+
+ Get value indicating if this stream supports writing
+
+
+
+
+ Get current length of stream
+
+
+
+
+ Gets the current position within the stream.
+
+ Any attempt to set position
+
+
+
+ Sets the current position of this stream to the given value. Not supported by this class!
+
+ The offset relative to the to seek.
+ The to seek from.
+ The new position in the stream.
+ Any access
+
+
+
+ Sets the length of this stream to the given value. Not supported by this class!
+
+ The new stream length.
+ Any access
+
+
+
+ Read a byte from stream advancing position by one
+
+ The byte read cast to an int. THe value is -1 if at the end of the stream.
+ Any access
+
+
+
+ Read a block of bytes from stream
+
+ The buffer to store read data in.
+ The offset to start storing at.
+ The maximum number of bytes to read.
+ The actual number of bytes read. Zero if end of stream is detected.
+ Any access
+
+
+
+ Flushes the stream by calling Flush on the deflater and then
+ on the underlying stream. This ensures that all bytes are flushed.
+
+
+
+
+ Calls and closes the underlying
+ stream when is true.
+
+
+
+
+ Get the Auth code for AES encrypted entries
+
+
+
+
+ Writes a single byte to the compressed output stream.
+
+
+ The byte value.
+
+
+
+
+ Writes bytes from an array to the compressed stream.
+
+
+ The byte array
+
+
+ The offset into the byte array where to start.
+
+
+ The number of bytes to write.
+
+
+
+
+ This buffer is used temporarily to retrieve the bytes from the
+ deflater and write them to the underlying output stream.
+
+
+
+
+ The deflater which is used to deflate the stream.
+
+
+
+
+ Base stream the deflater depends on.
+
+
+
+
+ An input buffer customised for use by
+
+
+ The buffer supports decryption of incoming data.
+
+
+
+
+ Initialise a new instance of with a default buffer size
+
+ The stream to buffer.
+
+
+
+ Initialise a new instance of
+
+ The stream to buffer.
+ The size to use for the buffer
+ A minimum buffer size of 1KB is permitted. Lower sizes are treated as 1KB.
+
+
+
+ Get the length of bytes bytes in the
+
+
+
+
+ Get the contents of the raw data buffer.
+
+ This may contain encrypted data.
+
+
+
+ Get the number of useable bytes in
+
+
+
+
+ Get the contents of the clear text buffer.
+
+
+
+
+ Get/set the number of bytes available
+
+
+
+
+ Call passing the current clear text buffer contents.
+
+ The inflater to set input for.
+
+
+
+ Fill the buffer from the underlying input stream.
+
+
+
+
+ Read a buffer directly from the input stream
+
+ The buffer to fill
+ Returns the number of bytes read.
+
+
+
+ Read a buffer directly from the input stream
+
+ The buffer to read into
+ The offset to start reading data into.
+ The number of bytes to read.
+ Returns the number of bytes read.
+
+
+
+ Read clear text data from the input stream.
+
+ The buffer to add data to.
+ The offset to start adding data at.
+ The number of bytes to read.
+ Returns the number of bytes actually read.
+
+
+
+ Read a from the input stream.
+
+ Returns the byte read.
+
+
+
+ Read an in little endian byte order.
+
+ The short value read case to an int.
+
+
+
+ Read an in little endian byte order.
+
+ The int value read.
+
+
+
+ Read a in little endian byte order.
+
+ The long value read.
+
+
+
+ Get/set the to apply to any data.
+
+ Set this value to null to have no transform applied.
+
+
+
+ This filter stream is used to decompress data compressed using the "deflate"
+ format. The "deflate" format is described in RFC 1951.
+
+ This stream may form the basis for other decompression filters, such
+ as the GZipInputStream.
+
+ Author of the original java version : John Leuner.
+
+
+
+
+ Create an InflaterInputStream with the default decompressor
+ and a default buffer size of 4KB.
+
+
+ The InputStream to read bytes from
+
+
+
+
+ Create an InflaterInputStream with the specified decompressor
+ and a default buffer size of 4KB.
+
+
+ The source of input data
+
+
+ The decompressor used to decompress data read from baseInputStream
+
+
+
+
+ Create an InflaterInputStream with the specified decompressor
+ and the specified buffer size.
+
+
+ The InputStream to read bytes from
+
+
+ The decompressor to use
+
+
+ Size of the buffer to use
+
+
+
+
+ Gets or sets a flag indicating ownership of underlying stream.
+ When the flag is true will close the underlying stream also.
+
+ The default value is true.
+
+
+
+ Skip specified number of bytes of uncompressed data
+
+
+ Number of bytes to skip
+
+
+ The number of bytes skipped, zero if the end of
+ stream has been reached
+
+
+ The number of bytes to skip is less than or equal to zero.
+
+
+
+
+ Clear any cryptographic state.
+
+
+
+
+ Returns 0 once the end of the stream (EOF) has been reached.
+ Otherwise returns 1.
+
+
+
+
+ Fills the buffer with more data to decompress.
+
+
+ Stream ends early
+
+
+
+
+ Gets a value indicating whether the current stream supports reading
+
+
+
+
+ Gets a value of false indicating seeking is not supported for this stream.
+
+
+
+
+ Gets a value of false indicating that this stream is not writeable.
+
+
+
+
+ A value representing the length of the stream in bytes.
+
+
+
+
+ The current position within the stream.
+ Throws a NotSupportedException when attempting to set the position
+
+ Attempting to set the position
+
+
+
+ Flushes the baseInputStream
+
+
+
+
+ Sets the position within the current stream
+ Always throws a NotSupportedException
+
+ The relative offset to seek to.
+ The defining where to seek from.
+ The new position in the stream.
+ Any access
+
+
+
+ Set the length of the current stream
+ Always throws a NotSupportedException
+
+ The new length value for the stream.
+ Any access
+
+
+
+ Writes a sequence of bytes to stream and advances the current position
+ This method always throws a NotSupportedException
+
+ Thew buffer containing data to write.
+ The offset of the first byte to write.
+ The number of bytes to write.
+ Any access
+
+
+
+ Writes one byte to the current stream and advances the current position
+ Always throws a NotSupportedException
+
+ The byte to write.
+ Any access
+
+
+
+ Closes the input stream. When
+ is true the underlying stream is also closed.
+
+
+
+
+ Reads decompressed data into the provided buffer byte array
+
+
+ The array to read and decompress data into
+
+
+ The offset indicating where the data should be placed
+
+
+ The number of bytes to decompress
+
+ The number of bytes read. Zero signals the end of stream
+
+ Inflater needs a dictionary
+
+
+
+
+ Decompressor for this stream
+
+
+
+
+ Input buffer for this stream.
+
+
+
+
+ Base stream the inflater reads from.
+
+
+
+
+ The compressed size
+
+
+
+
+ Flag indicating wether this instance has been closed or not.
+
+
+
+
+ Contains the output from the Inflation process.
+ We need to have a window so that we can refer backwards into the output stream
+ to repeat stuff.
+ Author of the original java version : John Leuner
+
+
+
+
+ Write a byte to this output window
+
+ value to write
+
+ if window is full
+
+
+
+
+ Append a byte pattern already in the window itself
+
+ length of pattern to copy
+ distance from end of window pattern occurs
+
+ If the repeated data overflows the window
+
+
+
+
+ Copy from input manipulator to internal window
+
+ source of data
+ length of data to copy
+ the number of bytes copied
+
+
+
+ Copy dictionary to window
+
+ source dictionary
+ offset of start in source dictionary
+ length of dictionary
+
+ If window isnt empty
+
+
+
+
+ Get remaining unfilled space in window
+
+ Number of bytes left in window
+
+
+
+ Get bytes available for output in window
+
+ Number of bytes filled
+
+
+
+ Copy contents of window to output
+
+ buffer to copy to
+ offset to start at
+ number of bytes to count
+ The number of bytes copied
+
+ If a window underflow occurs
+
+
+
+
+ Reset by clearing window so GetAvailable returns 0
+
+
+
+
+ This class allows us to retrieve a specified number of bits from
+ the input buffer, as well as copy big byte blocks.
+
+ It uses an int buffer to store up to 31 bits for direct
+ manipulation. This guarantees that we can get at least 16 bits,
+ but we only need at most 15, so this is all safe.
+
+ There are some optimizations in this class, for example, you must
+ never peek more than 8 bits more than needed, and you must first
+ peek bits before you may drop them. This is not a general purpose
+ class but optimized for the behaviour of the Inflater.
+
+ authors of the original java version : John Leuner, Jochen Hoenicke
+
+
+
+
+ Get the next sequence of bits but don't increase input pointer. bitCount must be
+ less or equal 16 and if this call succeeds, you must drop
+ at least n - 8 bits in the next call.
+
+ The number of bits to peek.
+
+ the value of the bits, or -1 if not enough bits available. */
+
+
+
+
+ Tries to grab the next bits from the input and
+ sets to the value, adding .
+
+ true if enough bits could be read, otherwise false
+
+
+
+ Tries to grab the next bits from the input and
+ sets of to the value.
+
+ true if enough bits could be read, otherwise false
+
+
+
+ Drops the next n bits from the input. You should have called PeekBits
+ with a bigger or equal n before, to make sure that enough bits are in
+ the bit buffer.
+
+ The number of bits to drop.
+
+
+
+ Gets the next n bits and increases input pointer. This is equivalent
+ to followed by , except for correct error handling.
+
+ The number of bits to retrieve.
+
+ the value of the bits, or -1 if not enough bits available.
+
+
+
+
+ Gets the number of bits available in the bit buffer. This must be
+ only called when a previous PeekBits() returned -1.
+
+
+ the number of bits available.
+
+
+
+
+ Gets the number of bytes available.
+
+
+ The number of bytes available.
+
+
+
+
+ Skips to the next byte boundary.
+
+
+
+
+ Returns true when SetInput can be called
+
+
+
+
+ Copies bytes from input buffer to output buffer starting
+ at output[offset]. You have to make sure, that the buffer is
+ byte aligned. If not enough bytes are available, copies fewer
+ bytes.
+
+
+ The buffer to copy bytes to.
+
+
+ The offset in the buffer at which copying starts
+
+
+ The length to copy, 0 is allowed.
+
+
+ The number of bytes copied, 0 if no bytes were available.
+
+
+ Length is less than zero
+
+
+ Bit buffer isnt byte aligned
+
+
+
+
+ Resets state and empties internal buffers
+
+
+
+
+ Add more input for consumption.
+ Only call when IsNeedingInput returns true
+
+ data to be input
+ offset of first byte of input
+ number of bytes of input to add.
+
+
+
+ FastZipEvents supports all events applicable to FastZip operations.
+
+
+
+
+ Delegate to invoke when processing directories.
+
+
+
+
+ Delegate to invoke when processing files.
+
+
+
+
+ Delegate to invoke during processing of files.
+
+
+
+
+ Delegate to invoke when processing for a file has been completed.
+
+
+
+
+ Delegate to invoke when processing directory failures.
+
+
+
+
+ Delegate to invoke when processing file failures.
+
+
+
+
+ Raise the directory failure event.
+
+ The directory causing the failure.
+ The exception for this event.
+ A boolean indicating if execution should continue or not.
+
+
+
+ Fires the file failure handler delegate.
+
+ The file causing the failure.
+ The exception for this failure.
+ A boolean indicating if execution should continue or not.
+
+
+
+ Fires the ProcessFile delegate.
+
+ The file being processed.
+ A boolean indicating if execution should continue or not.
+
+
+
+ Fires the delegate
+
+ The file whose processing has been completed.
+ A boolean indicating if execution should continue or not.
+
+
+
+ Fires the process directory delegate.
+
+ The directory being processed.
+ Flag indicating if the directory has matching files as determined by the current filter.
+ A of true if the operation should continue; false otherwise.
+
+
+
+ The minimum timespan between events.
+
+ The minimum period of time between events.
+
+ The default interval is three seconds.
+
+
+
+ FastZip provides facilities for creating and extracting zip files.
+
+
+
+
+ Defines the desired handling when overwriting files during extraction.
+
+
+
+
+ Prompt the user to confirm overwriting
+
+
+
+
+ Never overwrite files.
+
+
+
+
+ Always overwrite files.
+
+
+
+
+ Initialise a default instance of .
+
+
+
+
+ Initialise a new instance of
+
+ The events to use during operations.
+
+
+
+ Get/set a value indicating wether empty directories should be created.
+
+
+
+
+ Get / set the password value.
+
+
+
+
+ Get or set the active when creating Zip files.
+
+
+
+
+
+ Get or set the active when creating Zip files.
+
+
+
+
+ Gets or sets the setting for Zip64 handling when writing.
+
+
+ The default value is dynamic which is not backwards compatible with old
+ programs and can cause problems with XP's built in compression which cant
+ read Zip64 archives. However it does avoid the situation were a large file
+ is added and cannot be completed correctly.
+ NOTE: Setting the size for entries before they are added is the best solution!
+ By default the EntryFactory used by FastZip will set fhe file size.
+
+
+
+
+ Get/set a value indicating wether file dates and times should
+ be restored when extracting files from an archive.
+
+ The default value is false.
+
+
+
+ Get/set a value indicating whether file attributes should
+ be restored during extract operations
+
+
+
+
+ Get/set the Compression Level that will be used
+ when creating the zip
+
+
+
+
+ Delegate called when confirming overwriting of files.
+
+
+
+
+ Create a zip file.
+
+ The name of the zip file to create.
+ The directory to source files from.
+ True to recurse directories, false for no recursion.
+ The file filter to apply.
+ The directory filter to apply.
+
+
+
+ Create a zip file/archive.
+
+ The name of the zip file to create.
+ The directory to obtain files and directories from.
+ True to recurse directories, false for no recursion.
+ The file filter to apply.
+
+
+
+ Create a zip archive sending output to the passed.
+
+ The stream to write archive data to.
+ The directory to source files from.
+ True to recurse directories, false for no recursion.
+ The file filter to apply.
+ The directory filter to apply.
+ The is closed after creation.
+
+
+
+ Extract the contents of a zip file.
+
+ The zip file to extract from.
+ The directory to save extracted information in.
+ A filter to apply to files.
+
+
+
+ Extract the contents of a zip file.
+
+ The zip file to extract from.
+ The directory to save extracted information in.
+ The style of overwriting to apply.
+ A delegate to invoke when confirming overwriting.
+ A filter to apply to files.
+ A filter to apply to directories.
+ Flag indicating whether to restore the date and time for extracted files.
+ Allow parent directory traversal in file paths (e.g. ../file)
+
+
+
+ Extract the contents of a zip file held in a stream.
+
+ The seekable input stream containing the zip to extract from.
+ The directory to save extracted information in.
+ The style of overwriting to apply.
+ A delegate to invoke when confirming overwriting.
+ A filter to apply to files.
+ A filter to apply to directories.
+ Flag indicating whether to restore the date and time for extracted files.
+ Flag indicating whether the inputStream will be closed by this method.
+ Allow parent directory traversal in file paths (e.g. ../file)
+
+
+
+ Defines factory methods for creating new values.
+
+
+
+
+ Create a for a file given its name
+
+ The name of the file to create an entry for.
+ Returns a file entry based on the passed.
+
+
+
+ Create a for a file given its name
+
+ The name of the file to create an entry for.
+ If true get details from the file system if the file exists.
+ Returns a file entry based on the passed.
+
+
+
+ Create a for a file given its actual name and optional override name
+
+ The name of the file to create an entry for.
+ An alternative name to be used for the new entry. Null if not applicable.
+ If true get details from the file system if the file exists.
+ Returns a file entry based on the passed.
+
+
+
+ Create a for a directory given its name
+
+ The name of the directory to create an entry for.
+ Returns a directory entry based on the passed.
+
+
+
+ Create a for a directory given its name
+
+ The name of the directory to create an entry for.
+ If true get details from the file system for this directory if it exists.
+ Returns a directory entry based on the passed.
+
+
+
+ Get/set the applicable.
+
+
+
+
+ WindowsNameTransform transforms names to windows compatible ones.
+
+
+
+
+ The maximum windows path name permitted.
+
+ This may not valid for all windows systems - CE?, etc but I cant find the equivalent in the CLR.
+
+
+
+ In this case we need Windows' invalid path characters.
+ Path.GetInvalidPathChars() only returns a subset invalid on all platforms.
+
+
+
+
+ Initialises a new instance of
+
+
+ Allow parent directory traversal in file paths (e.g. ../file)
+
+
+
+ Initialise a default instance of
+
+
+
+
+ Gets or sets a value containing the target directory to prefix values with.
+
+
+
+
+ Allow parent directory traversal in file paths (e.g. ../file)
+
+
+
+
+ Gets or sets a value indicating wether paths on incoming values should be removed.
+
+
+
+
+ Transform a Zip directory name to a windows directory name.
+
+ The directory name to transform.
+ The transformed name.
+
+
+
+ Transform a Zip format file name to a windows style one.
+
+ The file name to transform.
+ The transformed name.
+
+
+
+ Test a name to see if it is a valid name for a windows filename as extracted from a Zip archive.
+
+ The name to test.
+ Returns true if the name is a valid zip name; false otherwise.
+ The filename isnt a true windows path in some fundamental ways like no absolute paths, no rooted paths etc.
+
+
+
+ Force a name to be valid by replacing invalid characters with a fixed value
+
+ The name to make valid
+ The replacement character to use for any invalid characters.
+ Returns a valid name
+
+
+
+ Gets or set the character to replace invalid characters during transformations.
+
+
+
+
+ Determines how entries are tested to see if they should use Zip64 extensions or not.
+
+
+
+
+ Zip64 will not be forced on entries during processing.
+
+ An entry can have this overridden if required
+
+
+
+ Zip64 should always be used.
+
+
+
+
+ #ZipLib will determine use based on entry values when added to archive.
+
+
+
+
+ The kind of compression used for an entry in an archive
+
+
+
+
+ A direct copy of the file contents is held in the archive
+
+
+
+
+ Common Zip compression method using a sliding dictionary
+ of up to 32KB and secondary compression from Huffman/Shannon-Fano trees
+
+
+
+
+ An extension to deflate with a 64KB window. Not supported by #Zip currently
+
+
+
+
+ BZip2 compression. Not supported by #Zip.
+
+
+
+
+ LZMA compression. Not supported by #Zip.
+
+
+
+
+ PPMd compression. Not supported by #Zip.
+
+
+
+
+ WinZip special for AES encryption, Now supported by #Zip.
+
+
+
+
+ Identifies the encryption algorithm used for an entry
+
+
+
+
+ No encryption has been used.
+
+
+
+
+ Encrypted using PKZIP 2.0 or 'classic' encryption.
+
+
+
+
+ DES encryption has been used.
+
+
+
+
+ RC2 encryption has been used for encryption.
+
+
+
+
+ Triple DES encryption with 168 bit keys has been used for this entry.
+
+
+
+
+ Triple DES with 112 bit keys has been used for this entry.
+
+
+
+
+ AES 128 has been used for encryption.
+
+
+
+
+ AES 192 has been used for encryption.
+
+
+
+
+ AES 256 has been used for encryption.
+
+
+
+
+ RC2 corrected has been used for encryption.
+
+
+
+
+ Blowfish has been used for encryption.
+
+
+
+
+ Twofish has been used for encryption.
+
+
+
+
+ RC4 has been used for encryption.
+
+
+
+
+ An unknown algorithm has been used for encryption.
+
+
+
+
+ Defines the contents of the general bit flags field for an archive entry.
+
+
+
+
+ Bit 0 if set indicates that the file is encrypted
+
+
+
+
+ Bits 1 and 2 - Two bits defining the compression method (only for Method 6 Imploding and 8,9 Deflating)
+
+
+
+
+ Bit 3 if set indicates a trailing data desciptor is appended to the entry data
+
+
+
+
+ Bit 4 is reserved for use with method 8 for enhanced deflation
+
+
+
+
+ Bit 5 if set indicates the file contains Pkzip compressed patched data.
+ Requires version 2.7 or greater.
+
+
+
+
+ Bit 6 if set indicates strong encryption has been used for this entry.
+
+
+
+
+ Bit 7 is currently unused
+
+
+
+
+ Bit 8 is currently unused
+
+
+
+
+ Bit 9 is currently unused
+
+
+
+
+ Bit 10 is currently unused
+
+
+
+
+ Bit 11 if set indicates the filename and
+ comment fields for this file must be encoded using UTF-8.
+
+
+
+
+ Bit 12 is documented as being reserved by PKware for enhanced compression.
+
+
+
+
+ Bit 13 if set indicates that values in the local header are masked to hide
+ their actual values, and the central directory is encrypted.
+
+
+ Used when encrypting the central directory contents.
+
+
+
+
+ Bit 14 is documented as being reserved for use by PKware
+
+
+
+
+ Bit 15 is documented as being reserved for use by PKware
+
+
+
+
+ This class contains constants used for Zip format files
+
+
+
+
+ The version made by field for entries in the central header when created by this library
+
+
+ This is also the Zip version for the library when comparing against the version required to extract
+ for an entry. See .
+
+
+
+
+ The version made by field for entries in the central header when created by this library
+
+
+ This is also the Zip version for the library when comparing against the version required to extract
+ for an entry. See ZipInputStream.CanDecompressEntry.
+
+
+
+
+ The minimum version required to support strong encryption
+
+
+
+
+ The minimum version required to support strong encryption
+
+
+
+
+ Version indicating AES encryption
+
+
+
+
+ The version required for Zip64 extensions (4.5 or higher)
+
+
+
+
+ Size of local entry header (excluding variable length fields at end)
+
+
+
+
+ Size of local entry header (excluding variable length fields at end)
+
+
+
+
+ Size of Zip64 data descriptor
+
+
+
+
+ Size of data descriptor
+
+
+
+
+ Size of data descriptor
+
+
+
+
+ Size of central header entry (excluding variable fields)
+
+
+
+
+ Size of central header entry
+
+
+
+
+ Size of end of central record (excluding variable fields)
+
+
+
+
+ Size of end of central record (excluding variable fields)
+
+
+
+
+ Size of 'classic' cryptographic header stored before any entry data
+
+
+
+
+ Size of cryptographic header stored before entry data
+
+
+
+
+ Signature for local entry header
+
+
+
+
+ Signature for local entry header
+
+
+
+
+ Signature for spanning entry
+
+
+
+
+ Signature for spanning entry
+
+
+
+
+ Signature for temporary spanning entry
+
+
+
+
+ Signature for temporary spanning entry
+
+
+
+
+ Signature for data descriptor
+
+
+ This is only used where the length, Crc, or compressed size isnt known when the
+ entry is created and the output stream doesnt support seeking.
+ The local entry cannot be 'patched' with the correct values in this case
+ so the values are recorded after the data prefixed by this header, as well as in the central directory.
+
+
+
+
+ Signature for data descriptor
+
+
+ This is only used where the length, Crc, or compressed size isnt known when the
+ entry is created and the output stream doesnt support seeking.
+ The local entry cannot be 'patched' with the correct values in this case
+ so the values are recorded after the data prefixed by this header, as well as in the central directory.
+
+
+
+
+ Signature for central header
+
+
+
+
+ Signature for central header
+
+
+
+
+ Signature for Zip64 central file header
+
+
+
+
+ Signature for Zip64 central file header
+
+
+
+
+ Signature for Zip64 central directory locator
+
+
+
+
+ Signature for archive extra data signature (were headers are encrypted).
+
+
+
+
+ Central header digitial signature
+
+
+
+
+ Central header digitial signature
+
+
+
+
+ End of central directory record signature
+
+
+
+
+ End of central directory record signature
+
+
+
+
+ Default encoding used for string conversion. 0 gives the default system OEM code page.
+ Using the default code page isnt the full solution neccessarily
+ there are many variable factors, codepage 850 is often a good choice for
+ European users, however be careful about compatability.
+
+
+
+ Depracated wrapper for
+
+
+ Depracated wrapper for
+
+
+ Depracated wrapper for
+
+
+ Depracated wrapper for
+
+
+ Depracated wrapper for
+
+
+ Depracated wrapper for
+
+
+
+ Defines known values for the property.
+
+
+
+
+ Host system = MSDOS
+
+
+
+
+ Host system = Amiga
+
+
+
+
+ Host system = Open VMS
+
+
+
+
+ Host system = Unix
+
+
+
+
+ Host system = VMCms
+
+
+
+
+ Host system = Atari ST
+
+
+
+
+ Host system = OS2
+
+
+
+
+ Host system = Macintosh
+
+
+
+
+ Host system = ZSystem
+
+
+
+
+ Host system = Cpm
+
+
+
+
+ Host system = Windows NT
+
+
+
+
+ Host system = MVS
+
+
+
+
+ Host system = VSE
+
+
+
+
+ Host system = Acorn RISC
+
+
+
+
+ Host system = VFAT
+
+
+
+
+ Host system = Alternate MVS
+
+
+
+
+ Host system = BEOS
+
+
+
+
+ Host system = Tandem
+
+
+
+
+ Host system = OS400
+
+
+
+
+ Host system = OSX
+
+
+
+
+ Host system = WinZIP AES
+
+
+
+
+ This class represents an entry in a zip archive. This can be a file
+ or a directory
+ ZipFile and ZipInputStream will give you instances of this class as
+ information about the members in an archive. ZipOutputStream
+ uses an instance of this class when creating an entry in a Zip file.
+
+ Author of the original java version : Jochen Hoenicke
+
+
+
+
+ Creates a zip entry with the given name.
+
+
+ The name for this entry. Can include directory components.
+ The convention for names is 'unix' style paths with relative names only.
+ There are with no device names and path elements are separated by '/' characters.
+
+
+ The name passed is null
+
+
+
+
+ Creates a zip entry with the given name and version required to extract
+
+
+ The name for this entry. Can include directory components.
+ The convention for names is 'unix' style paths with no device names and
+ path elements separated by '/' characters. This is not enforced see CleanName
+ on how to ensure names are valid if this is desired.
+
+
+ The minimum 'feature version' required this entry
+
+
+ The name passed is null
+
+
+
+
+ Initializes an entry with the given name and made by information
+
+ Name for this entry
+ Version and HostSystem Information
+ Minimum required zip feature version required to extract this entry
+ Compression method for this entry.
+
+ The name passed is null
+
+
+ versionRequiredToExtract should be 0 (auto-calculate) or > 10
+
+
+ This constructor is used by the ZipFile class when reading from the central header
+ It is not generally useful, use the constructor specifying the name only.
+
+
+
+
+ Creates a deep copy of the given zip entry.
+
+
+ The entry to copy.
+
+
+
+
+ Get a value indicating wether the entry has a CRC value available.
+
+
+
+
+ Get/Set flag indicating if entry is encrypted.
+ A simple helper routine to aid interpretation of flags
+
+ This is an assistant that interprets the flags property.
+
+
+
+ Get / set a flag indicating wether entry name and comment text are
+ encoded in unicode UTF8.
+
+ This is an assistant that interprets the flags property.
+
+
+
+ Value used during password checking for PKZIP 2.0 / 'classic' encryption.
+
+
+
+
+ Get/Set general purpose bit flag for entry
+
+
+ General purpose bit flag
+
+ Bit 0: If set, indicates the file is encrypted
+ Bit 1-2 Only used for compression type 6 Imploding, and 8, 9 deflating
+ Imploding:
+ Bit 1 if set indicates an 8K sliding dictionary was used. If clear a 4k dictionary was used
+ Bit 2 if set indicates 3 Shannon-Fanno trees were used to encode the sliding dictionary, 2 otherwise
+
+ Deflating:
+ Bit 2 Bit 1
+ 0 0 Normal compression was used
+ 0 1 Maximum compression was used
+ 1 0 Fast compression was used
+ 1 1 Super fast compression was used
+
+ Bit 3: If set, the fields crc-32, compressed size
+ and uncompressed size are were not able to be written during zip file creation
+ The correct values are held in a data descriptor immediately following the compressed data.
+ Bit 4: Reserved for use by PKZIP for enhanced deflating
+ Bit 5: If set indicates the file contains compressed patch data
+ Bit 6: If set indicates strong encryption was used.
+ Bit 7-10: Unused or reserved
+ Bit 11: If set the name and comments for this entry are in unicode.
+ Bit 12-15: Unused or reserved
+
+
+
+
+
+
+ Get/Set index of this entry in Zip file
+
+ This is only valid when the entry is part of a
+
+
+
+ Get/set offset for use in central header
+
+
+
+
+ Get/Set external file attributes as an integer.
+ The values of this are operating system dependant see
+ HostSystem for details
+
+
+
+
+ Get the version made by for this entry or zero if unknown.
+ The value / 10 indicates the major version number, and
+ the value mod 10 is the minor version number
+
+
+
+
+ Get a value indicating this entry is for a DOS/Windows system.
+
+
+
+
+ Test the external attributes for this to
+ see if the external attributes are Dos based (including WINNT and variants)
+ and match the values
+
+ The attributes to test.
+ Returns true if the external attributes are known to be DOS/Windows
+ based and have the same attributes set as the value passed.
+
+
+
+ Gets the compatability information for the external file attribute
+ If the external file attributes are compatible with MS-DOS and can be read
+ by PKZIP for DOS version 2.04g then this value will be zero. Otherwise the value
+ will be non-zero and identify the host system on which the attributes are compatible.
+
+
+
+ The values for this as defined in the Zip File format and by others are shown below. The values are somewhat
+ misleading in some cases as they are not all used as shown. You should consult the relevant documentation
+ to obtain up to date and correct information. The modified appnote by the infozip group is
+ particularly helpful as it documents a lot of peculiarities. The document is however a little dated.
+
+ 0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
+ 1 - Amiga
+ 2 - OpenVMS
+ 3 - Unix
+ 4 - VM/CMS
+ 5 - Atari ST
+ 6 - OS/2 HPFS
+ 7 - Macintosh
+ 8 - Z-System
+ 9 - CP/M
+ 10 - Windows NTFS
+ 11 - MVS (OS/390 - Z/OS)
+ 12 - VSE
+ 13 - Acorn Risc
+ 14 - VFAT
+ 15 - Alternate MVS
+ 16 - BeOS
+ 17 - Tandem
+ 18 - OS/400
+ 19 - OS/X (Darwin)
+ 99 - WinZip AES
+ remainder - unused
+
+
+
+
+
+ Get minimum Zip feature version required to extract this entry
+
+
+ Minimum features are defined as:
+ 1.0 - Default value
+ 1.1 - File is a volume label
+ 2.0 - File is a folder/directory
+ 2.0 - File is compressed using Deflate compression
+ 2.0 - File is encrypted using traditional encryption
+ 2.1 - File is compressed using Deflate64
+ 2.5 - File is compressed using PKWARE DCL Implode
+ 2.7 - File is a patch data set
+ 4.5 - File uses Zip64 format extensions
+ 4.6 - File is compressed using BZIP2 compression
+ 5.0 - File is encrypted using DES
+ 5.0 - File is encrypted using 3DES
+ 5.0 - File is encrypted using original RC2 encryption
+ 5.0 - File is encrypted using RC4 encryption
+ 5.1 - File is encrypted using AES encryption
+ 5.1 - File is encrypted using corrected RC2 encryption
+ 5.1 - File is encrypted using corrected RC2-64 encryption
+ 6.1 - File is encrypted using non-OAEP key wrapping
+ 6.2 - Central directory encryption (not confirmed yet)
+ 6.3 - File is compressed using LZMA
+ 6.3 - File is compressed using PPMD+
+ 6.3 - File is encrypted using Blowfish
+ 6.3 - File is encrypted using Twofish
+
+
+
+
+
+ Get a value indicating whether this entry can be decompressed by the library.
+
+ This is based on the and
+ wether the compression method is supported.
+
+
+
+ Force this entry to be recorded using Zip64 extensions.
+
+
+
+
+ Get a value indicating wether Zip64 extensions were forced.
+
+ A value of true if Zip64 extensions have been forced on; false if not.
+
+
+
+ Gets a value indicating if the entry requires Zip64 extensions
+ to store the full entry values.
+
+ A value of true if a local header requires Zip64 extensions; false if not.
+
+
+
+ Get a value indicating wether the central directory entry requires Zip64 extensions to be stored.
+
+
+
+
+ Get/Set DosTime value.
+
+
+ The MS-DOS date format can only represent dates between 1/1/1980 and 12/31/2107.
+
+
+
+
+ Gets/Sets the time of last modification of the entry.
+
+
+ The property is updated to match this as far as possible.
+
+
+
+
+ Returns the entry name.
+
+
+ The unix naming convention is followed.
+ Path components in the entry should always separated by forward slashes ('/').
+ Dos device names like C: should also be removed.
+ See the class, or
+
+
+
+
+ Gets/Sets the size of the uncompressed data.
+
+
+ The size or -1 if unknown.
+
+ Setting the size before adding an entry to an archive can help
+ avoid compatability problems with some archivers which dont understand Zip64 extensions.
+
+
+
+ Gets/Sets the size of the compressed data.
+
+
+ The compressed entry size or -1 if unknown.
+
+
+
+
+ Gets/Sets the crc of the uncompressed data.
+
+
+ Crc is not in the range 0..0xffffffffL
+
+
+ The crc value or -1 if unknown.
+
+
+
+
+ Gets/Sets the compression method. Only Deflated and Stored are supported.
+
+
+ The compression method for this entry
+
+
+
+
+
+
+ Gets the compression method for outputting to the local or central header.
+ Returns same value as CompressionMethod except when AES encrypting, which
+ places 99 in the method and places the real method in the extra data.
+
+
+
+
+ Gets/Sets the extra data.
+
+
+ Extra data is longer than 64KB (0xffff) bytes.
+
+
+ Extra data or null if not set.
+
+
+
+
+ For AES encrypted files returns or sets the number of bits of encryption (128, 192 or 256).
+ When setting, only 0 (off), 128 or 256 is supported.
+
+
+
+
+ AES Encryption strength for storage in extra data in entry header.
+ 1 is 128 bit, 2 is 192 bit, 3 is 256 bit.
+
+
+
+
+ Returns the length of the salt, in bytes
+
+
+
+
+ Number of extra bytes required to hold the AES Header fields (Salt, Pwd verify, AuthCode)
+
+
+
+
+ Process extra data fields updating the entry based on the contents.
+
+ True if the extra data fields should be handled
+ for a local header, rather than for a central header.
+
+
+
+
+ Gets/Sets the entry comment.
+
+
+ If comment is longer than 0xffff.
+
+
+ The comment or null if not set.
+
+
+ A comment is only available for entries when read via the class.
+ The class doesnt have the comment data available.
+
+
+
+
+ Gets a value indicating if the entry is a directory.
+ however.
+
+
+ A directory is determined by an entry name with a trailing slash '/'.
+ The external file attributes can also indicate an entry is for a directory.
+ Currently only dos/windows attributes are tested in this manner.
+ The trailing slash convention should always be followed.
+
+
+
+
+ Get a value of true if the entry appears to be a file; false otherwise
+
+
+ This only takes account of DOS/Windows attributes. Other operating systems are ignored.
+ For linux and others the result may be incorrect.
+
+
+
+
+ Test entry to see if data can be extracted.
+
+ Returns true if data can be extracted for this entry; false otherwise.
+
+
+
+ Creates a copy of this zip entry.
+
+ An that is a copy of the current instance.
+
+
+
+ Gets a string representation of this ZipEntry.
+
+ A readable textual representation of this
+
+
+
+ Test a compression method to see if this library
+ supports extracting data compressed with that method
+
+ The compression method to test.
+ Returns true if the compression method is supported; false otherwise
+
+
+
+ Cleans a name making it conform to Zip file conventions.
+ Devices names ('c:\') and UNC share names ('\\server\share') are removed
+ and forward slashes ('\') are converted to back slashes ('/').
+ Names are made relative by trimming leading slashes which is compatible
+ with the ZIP naming convention.
+
+ The name to clean
+ The 'cleaned' name.
+
+ The Zip name transform class is more flexible.
+
+
+
+
+ Basic implementation of
+
+
+
+
+ Defines the possible values to be used for the .
+
+
+
+
+ Use the recorded LastWriteTime value for the file.
+
+
+
+
+ Use the recorded LastWriteTimeUtc value for the file
+
+
+
+
+ Use the recorded CreateTime value for the file.
+
+
+
+
+ Use the recorded CreateTimeUtc value for the file.
+
+
+
+
+ Use the recorded LastAccessTime value for the file.
+
+
+
+
+ Use the recorded LastAccessTimeUtc value for the file.
+
+
+
+
+ Use a fixed value.
+
+ The actual value used can be
+ specified via the constructor or
+ using the with the setting set
+ to which will use the when this class was constructed.
+ The property can also be used to set this value.
+
+
+
+ Initialise a new instance of the class.
+
+ A default , and the LastWriteTime for files is used.
+
+
+
+ Initialise a new instance of using the specified
+
+ The time setting to use when creating Zip entries.
+
+
+
+ Initialise a new instance of using the specified
+
+ The time to set all values to.
+
+
+
+ Get / set the to be used when creating new values.
+
+
+ Setting this property to null will cause a default name transform to be used.
+
+
+
+
+ Get / set the in use.
+
+
+
+
+ Get / set the value to use when is set to
+
+
+
+
+ A bitmask defining the attributes to be retrieved from the actual file.
+
+ The default is to get all possible attributes from the actual file.
+
+
+
+ A bitmask defining which attributes are to be set on.
+
+ By default no attributes are set on.
+
+
+
+ Get set a value indicating wether unidoce text should be set on.
+
+
+
+
+ Make a new for a file.
+
+ The name of the file to create a new entry for.
+ Returns a new based on the .
+
+
+
+ Make a new for a file.
+
+ The name of the file to create a new entry for.
+ If true entry detail is retrieved from the file system if the file exists.
+ Returns a new based on the .
+
+
+
+ Make a new from a name.
+
+ The name of the file to create a new entry for.
+ An alternative name to be used for the new entry. Null if not applicable.
+ If true entry detail is retrieved from the file system if the file exists.
+ Returns a new based on the .
+
+
+
+ Make a new for a directory.
+
+ The raw untransformed name for the new directory
+ Returns a new representing a directory.
+
+
+
+ Make a new for a directory.
+
+ The raw untransformed name for the new directory
+ If true entry detail is retrieved from the file system if the file exists.
+ Returns a new representing a directory.
+
+
+
+ ZipException represents exceptions specific to Zip classes and code.
+
+
+
+
+ Initialise a new instance of .
+
+
+
+
+ Initialise a new instance of with its message string.
+
+ A that describes the error.
+
+
+
+ Initialise a new instance of .
+
+ A that describes the error.
+ The that caused this exception.
+
+
+
+ Initializes a new instance of the ZipException class with serialized data.
+
+
+ The System.Runtime.Serialization.SerializationInfo that holds the serialized
+ object data about the exception being thrown.
+
+
+ The System.Runtime.Serialization.StreamingContext that contains contextual information
+ about the source or destination.
+
+
+
+
+ ExtraData tagged value interface.
+
+
+
+
+ Get the ID for this tagged data value.
+
+
+
+
+ Set the contents of this instance from the data passed.
+
+ The data to extract contents from.
+ The offset to begin extracting data from.
+ The number of bytes to extract.
+
+
+
+ Get the data representing this instance.
+
+ Returns the data for this instance.
+
+
+
+ A raw binary tagged value
+
+
+
+
+ Initialise a new instance.
+
+ The tag ID.
+
+
+
+ Get the ID for this tagged data value.
+
+
+
+
+ Set the data from the raw values provided.
+
+ The raw data to extract values from.
+ The index to start extracting values from.
+ The number of bytes available.
+
+
+
+ Get the binary data representing this instance.
+
+ The raw binary data representing this instance.
+
+
+
+ Get /set the binary data representing this instance.
+
+ The raw binary data representing this instance.
+
+
+
+ The tag ID for this instance.
+
+
+
+
+ Class representing extended unix date time values.
+
+
+
+
+ Flags indicate which values are included in this instance.
+
+
+
+
+ The modification time is included
+
+
+
+
+ The access time is included
+
+
+
+
+ The create time is included.
+
+
+
+
+ Get the ID
+
+
+
+
+ Set the data from the raw values provided.
+
+ The raw data to extract values from.
+ The index to start extracting values from.
+ The number of bytes available.
+
+
+
+ Get the binary data representing this instance.
+
+ The raw binary data representing this instance.
+
+
+
+ Test a value to see if is valid and can be represented here.
+
+ The value to test.
+ Returns true if the value is valid and can be represented; false if not.
+ The standard Unix time is a signed integer data type, directly encoding the Unix time number,
+ which is the number of seconds since 1970-01-01.
+ Being 32 bits means the values here cover a range of about 136 years.
+ The minimum representable time is 1901-12-13 20:45:52,
+ and the maximum representable time is 2038-01-19 03:14:07.
+
+
+
+
+ Get /set the Modification Time
+
+
+
+
+
+
+ Get / set the Access Time
+
+
+
+
+
+
+ Get / Set the Create Time
+
+
+
+
+
+
+ Get/set the values to include.
+
+
+
+
+ Class handling NT date time values.
+
+
+
+
+ Get the ID for this tagged data value.
+
+
+
+
+ Set the data from the raw values provided.
+
+ The raw data to extract values from.
+ The index to start extracting values from.
+ The number of bytes available.
+
+
+
+ Get the binary data representing this instance.
+
+ The raw binary data representing this instance.
+
+
+
+ Test a valuie to see if is valid and can be represented here.
+
+ The value to test.
+ Returns true if the value is valid and can be represented; false if not.
+
+ NTFS filetimes are 64-bit unsigned integers, stored in Intel
+ (least significant byte first) byte order. They determine the
+ number of 1.0E-07 seconds (1/10th microseconds!) past WinNT "epoch",
+ which is "01-Jan-1601 00:00:00 UTC". 28 May 60056 is the upper limit
+
+
+
+
+ Get/set the last modification time.
+
+
+
+
+ Get /set the create time
+
+
+
+
+ Get /set the last access time.
+
+
+
+
+ A factory that creates tagged data instances.
+
+
+
+
+ Get data for a specific tag value.
+
+ The tag ID to find.
+ The data to search.
+ The offset to begin extracting data from.
+ The number of bytes to extract.
+ The located value found, or null if not found.
+
+
+
+
+ A class to handle the extra data field for Zip entries
+
+
+ Extra data contains 0 or more values each prefixed by a header tag and length.
+ They contain zero or more bytes of actual data.
+ The data is held internally using a copy on write strategy. This is more efficient but
+ means that for extra data created by passing in data can have the values modified by the caller
+ in some circumstances.
+
+
+
+
+ Initialise a default instance.
+
+
+
+
+ Initialise with known extra data.
+
+ The extra data.
+
+
+
+ Get the raw extra data value
+
+ Returns the raw byte[] extra data this instance represents.
+
+
+
+ Clear the stored data.
+
+
+
+
+ Gets the current extra data length.
+
+
+
+
+ Get a read-only for the associated tag.
+
+ The tag to locate data for.
+ Returns a containing tag data or null if no tag was found.
+
+
+
+ Get the tagged data for a tag.
+
+ The tag to search for.
+ Returns a tagged value or null if none found.
+
+
+
+ Get the length of the last value found by
+
+ This is only valid if has previously returned true.
+
+
+
+ Get the index for the current read value.
+
+ This is only valid if has previously returned true.
+ Initially the result will be the index of the first byte of actual data. The value is updated after calls to
+ , and .
+
+
+
+ Get the number of bytes remaining to be read for the current value;
+
+
+
+
+ Find an extra data value
+
+ The identifier for the value to find.
+ Returns true if the value was found; false otherwise.
+
+
+
+ Add a new entry to extra data.
+
+ The value to add.
+
+
+
+ Add a new entry to extra data
+
+ The ID for this entry.
+ The data to add.
+ If the ID already exists its contents are replaced.
+
+
+
+ Start adding a new entry.
+
+ Add data using , , , or .
+ The new entry is completed and actually added by calling
+
+
+
+
+ Add entry data added since using the ID passed.
+
+ The identifier to use for this entry.
+
+
+
+ Add a byte of data to the pending new entry.
+
+ The byte to add.
+
+
+
+
+ Add data to a pending new entry.
+
+ The data to add.
+
+
+
+
+ Add a short value in little endian order to the pending new entry.
+
+ The data to add.
+
+
+
+
+ Add an integer value in little endian order to the pending new entry.
+
+ The data to add.
+
+
+
+
+ Add a long value in little endian order to the pending new entry.
+
+ The data to add.
+
+
+
+
+ Delete an extra data field.
+
+ The identifier of the field to delete.
+ Returns true if the field was found and deleted.
+
+
+
+ Read a long in little endian form from the last found data value
+
+ Returns the long value read.
+
+
+
+ Read an integer in little endian form from the last found data value.
+
+ Returns the integer read.
+
+
+
+ Read a short value in little endian form from the last found data value.
+
+ Returns the short value read.
+
+
+
+ Read a byte from an extra data
+
+ The byte value read or -1 if the end of data has been reached.
+
+
+
+ Skip data during reading.
+
+ The number of bytes to skip.
+
+
+
+ Internal form of that reads data at any location.
+
+ Returns the short value read.
+
+
+
+ Dispose of this instance.
+
+
+
+
+ Arguments used with KeysRequiredEvent
+
+
+
+
+ Initialise a new instance of
+
+ The name of the file for which keys are required.
+
+
+
+ Initialise a new instance of
+
+ The name of the file for which keys are required.
+ The current key value.
+
+
+
+ Gets the name of the file for which keys are required.
+
+
+
+
+ Gets or sets the key value
+
+
+
+
+ The strategy to apply to testing.
+
+
+
+
+ Find the first error only.
+
+
+
+
+ Find all possible errors.
+
+
+
+
+ The operation in progress reported by a during testing.
+
+ TestArchive
+
+
+
+ Setting up testing.
+
+
+
+
+ Testing an individual entries header
+
+
+
+
+ Testing an individual entries data
+
+
+
+
+ Testing an individual entry has completed.
+
+
+
+
+ Running miscellaneous tests
+
+
+
+
+ Testing is complete
+
+
+
+
+ Status returned returned by during testing.
+
+ TestArchive
+
+
+
+ Initialise a new instance of
+
+ The this status applies to.
+
+
+
+ Get the current in progress.
+
+
+
+
+ Get the this status is applicable to.
+
+
+
+
+ Get the current/last entry tested.
+
+
+
+
+ Get the number of errors detected so far.
+
+
+
+
+ Get the number of bytes tested so far for the current entry.
+
+
+
+
+ Get a value indicating wether the last entry test was valid.
+
+
+
+
+ Delegate invoked during testing if supplied indicating current progress and status.
+
+ If the message is non-null an error has occured. If the message is null
+ the operation as found in status has started.
+
+
+
+ The possible ways of applying updates to an archive.
+
+
+
+
+ Perform all updates on temporary files ensuring that the original file is saved.
+
+
+
+
+ Update the archive directly, which is faster but less safe.
+
+
+
+
+ This class represents a Zip archive. You can ask for the contained
+ entries, or get an input stream for a file entry. The entry is
+ automatically decompressed.
+
+ You can also update the archive adding or deleting entries.
+
+ This class is thread safe for input: You can open input streams for arbitrary
+ entries in different threads.
+
+ Author of the original java version : Jochen Hoenicke
+
+
+
+ using System;
+ using System.Text;
+ using System.Collections;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.Zip;
+
+ class MainClass
+ {
+ static public void Main(string[] args)
+ {
+ using (ZipFile zFile = new ZipFile(args[0])) {
+ Console.WriteLine("Listing of : " + zFile.Name);
+ Console.WriteLine("");
+ Console.WriteLine("Raw Size Size Date Time Name");
+ Console.WriteLine("-------- -------- -------- ------ ---------");
+ foreach (ZipEntry e in zFile) {
+ if ( e.IsFile ) {
+ DateTime d = e.DateTime;
+ Console.WriteLine("{0, -10}{1, -10}{2} {3} {4}", e.Size, e.CompressedSize,
+ d.ToString("dd-MM-yy"), d.ToString("HH:mm"),
+ e.Name);
+ }
+ }
+ }
+ }
+ }
+
+
+
+
+
+ Delegate for handling keys/password setting during compresion/decompression.
+
+
+
+
+ Event handler for handling encryption keys.
+
+
+
+
+ Handles getting of encryption keys when required.
+
+ The file for which encryption keys are required.
+
+
+
+ Get/set the encryption key value.
+
+
+
+
+ Password to be used for encrypting/decrypting files.
+
+ Set to null if no password is required.
+
+
+
+ Get a value indicating wether encryption keys are currently available.
+
+
+
+
+ Opens a Zip file with the given name for reading.
+
+ The name of the file to open.
+ The argument supplied is null.
+
+ An i/o error occurs
+
+
+ The file doesn't contain a valid zip archive.
+
+
+
+
+ Opens a Zip file reading the given .
+
+ The to read archive data from.
+ The supplied argument is null.
+
+ An i/o error occurs.
+
+
+ The file doesn't contain a valid zip archive.
+
+
+
+
+ Opens a Zip file reading the given .
+
+ The to read archive data from.
+ true to leave the file open when the ZipFile is disposed, false to dispose of it
+ The supplied argument is null.
+
+ An i/o error occurs.
+
+
+ The file doesn't contain a valid zip archive.
+
+
+
+
+ Opens a Zip file reading the given .
+
+ The to read archive data from.
+
+ An i/o error occurs
+
+
+ The stream doesn't contain a valid zip archive.
+
+
+ The stream doesnt support seeking.
+
+
+ The stream argument is null.
+
+
+
+
+ Opens a Zip file reading the given .
+
+ The to read archive data from.
+ true to leave the stream open when the ZipFile is disposed, false to dispose of it
+
+ An i/o error occurs
+
+
+ The stream doesn't contain a valid zip archive.
+
+
+ The stream doesnt support seeking.
+
+
+ The stream argument is null.
+
+
+
+
+ Initialises a default instance with no entries and no file storage.
+
+
+
+
+ Finalize this instance.
+
+
+
+
+ Closes the ZipFile. If the stream is owned then this also closes the underlying input stream.
+ Once closed, no further instance methods should be called.
+
+
+ An i/o error occurs.
+
+
+
+
+ Create a new whose data will be stored in a file.
+
+ The name of the archive to create.
+ Returns the newly created
+ is null
+
+
+
+ Create a new whose data will be stored on a stream.
+
+ The stream providing data storage.
+ Returns the newly created
+ is null
+ doesnt support writing.
+
+
+
+ Get/set a flag indicating if the underlying stream is owned by the ZipFile instance.
+ If the flag is true then the stream will be closed when Close is called.
+
+
+ The default value is true in all cases.
+
+
+
+
+ Get a value indicating wether
+ this archive is embedded in another file or not.
+
+
+
+
+ Get a value indicating that this archive is a new one.
+
+
+
+
+ Gets the comment for the zip file.
+
+
+
+
+ Gets the name of this zip file.
+
+
+
+
+ Gets the number of entries in this zip file.
+
+
+ The Zip file has been closed.
+
+
+
+
+ Get the number of entries contained in this .
+
+
+
+
+ Indexer property for ZipEntries
+
+
+
+
+ Gets an enumerator for the Zip entries in this Zip file.
+
+ Returns an for this archive.
+
+ The Zip file has been closed.
+
+
+
+
+ Return the index of the entry with a matching name
+
+ Entry name to find
+ If true the comparison is case insensitive
+ The index position of the matching entry or -1 if not found
+
+ The Zip file has been closed.
+
+
+
+
+ Searches for a zip entry in this archive with the given name.
+ String comparisons are case insensitive
+
+
+ The name to find. May contain directory components separated by slashes ('/').
+
+
+ A clone of the zip entry, or null if no entry with that name exists.
+
+
+ The Zip file has been closed.
+
+
+
+
+ Gets an input stream for reading the given zip entry data in an uncompressed form.
+ Normally the should be an entry returned by GetEntry().
+
+ The to obtain a data for
+ An input containing data for this
+
+ The ZipFile has already been closed
+
+
+ The compression method for the entry is unknown
+
+
+ The entry is not found in the ZipFile
+
+
+
+
+ Creates an input stream reading a zip entry
+
+ The index of the entry to obtain an input stream for.
+
+ An input containing data for this
+
+
+ The ZipFile has already been closed
+
+
+ The compression method for the entry is unknown
+
+
+ The entry is not found in the ZipFile
+
+
+
+
+ Test an archive for integrity/validity
+
+ Perform low level data Crc check
+ true if all tests pass, false otherwise
+ Testing will terminate on the first error found.
+
+
+
+ Test an archive for integrity/validity
+
+ Perform low level data Crc check
+ The to apply.
+ The handler to call during testing.
+ true if all tests pass, false otherwise
+ The object has already been closed.
+
+
+
+ Test a local header against that provided from the central directory
+
+
+ The entry to test against
+
+ The type of tests to carry out.
+ The offset of the entries data in the file
+
+
+
+ The kind of update to apply.
+
+
+
+
+ Get / set the to apply to names when updating.
+
+
+
+
+ Get/set the used to generate values
+ during updates.
+
+
+
+
+ Get /set the buffer size to be used when updating this zip file.
+
+
+
+
+ Get a value indicating an update has been started.
+
+
+
+
+ Get / set a value indicating how Zip64 Extension usage is determined when adding entries.
+
+
+
+
+ Begin updating this archive.
+
+ The archive storage for use during the update.
+ The data source to utilise during updating.
+ ZipFile has been closed.
+ One of the arguments provided is null
+ ZipFile has been closed.
+
+
+
+ Begin updating to this archive.
+
+ The storage to use during the update.
+
+
+
+ Begin updating this archive.
+
+
+
+
+
+
+
+ Commit current updates, updating this archive.
+
+
+
+ ZipFile has been closed.
+
+
+
+ Abort updating leaving the archive unchanged.
+
+
+
+
+
+
+ Set the file comment to be recorded when the current update is commited.
+
+ The comment to record.
+ ZipFile has been closed.
+
+
+
+ Add a new entry to the archive.
+
+ The name of the file to add.
+ The compression method to use.
+ Ensure Unicode text is used for name and comment for this entry.
+ Argument supplied is null.
+ ZipFile has been closed.
+ Compression method is not supported.
+
+
+
+ Add a new entry to the archive.
+
+ The name of the file to add.
+ The compression method to use.
+ ZipFile has been closed.
+ The compression method is not supported.
+
+
+
+ Add a file to the archive.
+
+ The name of the file to add.
+ Argument supplied is null.
+
+
+
+ Add a file to the archive.
+
+ The name of the file to add.
+ The name to use for the on the Zip file created.
+ Argument supplied is null.
+
+
+
+ Add a file entry with data.
+
+ The source of the data for this entry.
+ The name to give to the entry.
+
+
+
+ Add a file entry with data.
+
+ The source of the data for this entry.
+ The name to give to the entry.
+ The compression method to use.
+
+
+
+ Add a file entry with data.
+
+ The source of the data for this entry.
+ The name to give to the entry.
+ The compression method to use.
+ Ensure Unicode text is used for name and comments for this entry.
+
+
+
+ Add a that contains no data.
+
+ The entry to add.
+ This can be used to add directories, volume labels, or empty file entries.
+
+
+
+ Add a with data.
+
+ The source of the data for this entry.
+ The entry to add.
+ This can be used to add file entries with a custom data source.
+
+
+
+ Add a directory entry to the archive.
+
+ The directory to add.
+
+
+
+ Delete an entry by name
+
+ The filename to delete
+ True if the entry was found and deleted; false otherwise.
+
+
+
+ Delete a from the archive.
+
+ The entry to delete.
+
+
+
+ Write an unsigned short in little endian byte order.
+
+
+
+
+ Write an int in little endian byte order.
+
+
+
+
+ Write an unsigned int in little endian byte order.
+
+
+
+
+ Write a long in little endian byte order.
+
+
+
+
+ Get a raw memory buffer.
+
+ Returns a raw memory buffer.
+
+
+
+ Get the size of the source descriptor for a .
+
+ The update to get the size for.
+ The descriptor size, zero if there isnt one.
+
+
+
+ Get an output stream for the specified
+
+ The entry to get an output stream for.
+ The output stream obtained for the entry.
+
+
+
+ Class used to sort updates.
+
+
+
+
+ Compares two objects and returns a value indicating whether one is
+ less than, equal to or greater than the other.
+
+ First object to compare
+ Second object to compare.
+ Compare result.
+
+
+
+ Represents a pending update to a Zip file.
+
+
+
+
+ Copy an existing entry.
+
+ The existing entry to copy.
+
+
+
+ Get the for this update.
+
+ This is the source or original entry.
+
+
+
+ Get the that will be written to the updated/new file.
+
+
+
+
+ Get the command for this update.
+
+
+
+
+ Get the filename if any for this update. Null if none exists.
+
+
+
+
+ Get/set the location of the size patch for this update.
+
+
+
+
+ Get /set the location of the crc patch for this update.
+
+
+
+
+ Get/set the size calculated by offset.
+ Specifically, the difference between this and next entry's starting offset.
+
+
+
+
+ Releases the unmanaged resources used by the this instance and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources;
+ false to release only unmanaged resources.
+
+
+
+ Read an unsigned short in little endian byte order.
+
+ Returns the value read.
+
+ The stream ends prematurely
+
+
+
+
+ Read a uint in little endian byte order.
+
+ Returns the value read.
+
+ An i/o error occurs.
+
+
+ The file ends prematurely
+
+
+
+
+ Search for and read the central directory of a zip file filling the entries array.
+
+
+ An i/o error occurs.
+
+
+ The central directory is malformed or cannot be found
+
+
+
+
+ Locate the data for a given entry.
+
+
+ The start offset of the data.
+
+
+ The stream ends prematurely
+
+
+ The local header signature is invalid, the entry and central header file name lengths are different
+ or the local and entry compression methods dont match
+
+
+
+
+ Represents a string from a which is stored as an array of bytes.
+
+
+
+
+ Initialise a with a string.
+
+ The textual string form.
+
+
+
+ Initialise a using a string in its binary 'raw' form.
+
+
+
+
+
+ Get a value indicating the original source of data for this instance.
+ True if the source was a string; false if the source was binary data.
+
+
+
+
+ Get the length of the comment when represented as raw bytes.
+
+
+
+
+ Get the comment in its 'raw' form as plain bytes.
+
+
+
+
+ Reset the comment to its initial state.
+
+
+
+
+ Implicit conversion of comment to a string.
+
+ The to convert to a string.
+ The textual equivalent for the input value.
+
+
+
+ An enumerator for Zip entries
+
+
+
+
+ An is a stream that you can write uncompressed data
+ to and flush, but cannot read, seek or do anything else to.
+
+
+
+
+ Gets a value indicating whether the current stream supports reading.
+
+
+
+
+ Write any buffered data to underlying storage.
+
+
+
+
+ Gets a value indicating whether the current stream supports writing.
+
+
+
+
+ Gets a value indicating whether the current stream supports seeking.
+
+
+
+
+ Get the length in bytes of the stream.
+
+
+
+
+ Gets or sets the position within the current stream.
+
+
+
+
+ Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
+
+ An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
+ The zero-based byte offset in buffer at which to begin storing the data read from the current stream.
+ The maximum number of bytes to be read from the current stream.
+
+ The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
+
+ The sum of offset and count is larger than the buffer length.
+ Methods were called after the stream was closed.
+ The stream does not support reading.
+ buffer is null.
+ An I/O error occurs.
+ offset or count is negative.
+
+
+
+ Sets the position within the current stream.
+
+ A byte offset relative to the origin parameter.
+ A value of type indicating the reference point used to obtain the new position.
+
+ The new position within the current stream.
+
+ An I/O error occurs.
+ The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
+ Methods were called after the stream was closed.
+
+
+
+ Sets the length of the current stream.
+
+ The desired length of the current stream in bytes.
+ The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
+ An I/O error occurs.
+ Methods were called after the stream was closed.
+
+
+
+ Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
+
+ An array of bytes. This method copies count bytes from buffer to the current stream.
+ The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
+ The number of bytes to be written to the current stream.
+ An I/O error occurs.
+ The stream does not support writing.
+ Methods were called after the stream was closed.
+ buffer is null.
+ The sum of offset and count is greater than the buffer length.
+ offset or count is negative.
+
+
+
+ A is an
+ whose data is only a part or subsection of a file.
+
+
+
+
+ Initialise a new instance of the class.
+
+ The containing the underlying stream to use for IO.
+ The start of the partial data.
+ The length of the partial data.
+
+
+
+ Read a byte from this stream.
+
+ Returns the byte read or -1 on end of stream.
+
+
+
+ Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
+
+ An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
+ The zero-based byte offset in buffer at which to begin storing the data read from the current stream.
+ The maximum number of bytes to be read from the current stream.
+
+ The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
+
+ The sum of offset and count is larger than the buffer length.
+ Methods were called after the stream was closed.
+ The stream does not support reading.
+ buffer is null.
+ An I/O error occurs.
+ offset or count is negative.
+
+
+
+ Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
+
+ An array of bytes. This method copies count bytes from buffer to the current stream.
+ The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
+ The number of bytes to be written to the current stream.
+ An I/O error occurs.
+ The stream does not support writing.
+ Methods were called after the stream was closed.
+ buffer is null.
+ The sum of offset and count is greater than the buffer length.
+ offset or count is negative.
+
+
+
+ When overridden in a derived class, sets the length of the current stream.
+
+ The desired length of the current stream in bytes.
+ The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
+ An I/O error occurs.
+ Methods were called after the stream was closed.
+
+
+
+ When overridden in a derived class, sets the position within the current stream.
+
+ A byte offset relative to the origin parameter.
+ A value of type indicating the reference point used to obtain the new position.
+
+ The new position within the current stream.
+
+ An I/O error occurs.
+ The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
+ Methods were called after the stream was closed.
+
+
+
+ Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
+
+ An I/O error occurs.
+
+
+
+ Gets or sets the position within the current stream.
+
+
+ The current position within the stream.
+ An I/O error occurs.
+ The stream does not support seeking.
+ Methods were called after the stream was closed.
+
+
+
+ Gets the length in bytes of the stream.
+
+
+ A long value representing the length of the stream in bytes.
+ A class derived from Stream does not support seeking.
+ Methods were called after the stream was closed.
+
+
+
+ Gets a value indicating whether the current stream supports writing.
+
+ false
+ true if the stream supports writing; otherwise, false.
+
+
+
+ Gets a value indicating whether the current stream supports seeking.
+
+ true
+ true if the stream supports seeking; otherwise, false.
+
+
+
+ Gets a value indicating whether the current stream supports reading.
+
+ true.
+ true if the stream supports reading; otherwise, false.
+
+
+
+ Gets a value that determines whether the current stream can time out.
+
+
+ A value that determines whether the current stream can time out.
+
+
+
+ Provides a static way to obtain a source of data for an entry.
+
+
+
+
+ Get a source of data by creating a new stream.
+
+ Returns a to use for compression input.
+ Ideally a new stream is created and opened to achieve this, to avoid locking problems.
+
+
+
+ Represents a source of data that can dynamically provide
+ multiple data sources based on the parameters passed.
+
+
+
+
+ Get a data source.
+
+ The to get a source for.
+ The name for data if known.
+ Returns a to use for compression input.
+ Ideally a new stream is created and opened to achieve this, to avoid locking problems.
+
+
+
+ Default implementation of a for use with files stored on disk.
+
+
+
+
+ Initialise a new instnace of
+
+ The name of the file to obtain data from.
+
+
+
+ Get a providing data.
+
+ Returns a provising data.
+
+
+
+ Default implementation of for files stored on disk.
+
+
+
+
+ Get a providing data for an entry.
+
+ The entry to provide data for.
+ The file name for data if known.
+ Returns a stream providing data; or null if not available
+
+
+
+ Defines facilities for data storage when updating Zip Archives.
+
+
+
+
+ Get the to apply during updates.
+
+
+
+
+ Get an empty that can be used for temporary output.
+
+ Returns a temporary output
+
+
+
+
+ Convert a temporary output stream to a final stream.
+
+ The resulting final
+
+
+
+
+ Make a temporary copy of the original stream.
+
+ The to copy.
+ Returns a temporary output that is a copy of the input.
+
+
+
+ Return a stream suitable for performing direct updates on the original source.
+
+ The current stream.
+ Returns a stream suitable for direct updating.
+ This may be the current stream passed.
+
+
+
+ Dispose of this instance.
+
+
+
+
+ An abstract suitable for extension by inheritance.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The update mode.
+
+
+
+ Gets a temporary output
+
+ Returns the temporary output stream.
+
+
+
+
+ Converts the temporary to its final form.
+
+ Returns a that can be used to read
+ the final storage for the archive.
+
+
+
+
+ Make a temporary copy of a .
+
+ The to make a copy of.
+ Returns a temporary output that is a copy of the input.
+
+
+
+ Return a stream suitable for performing direct updates on the original source.
+
+ The to open for direct update.
+ Returns a stream suitable for direct updating.
+
+
+
+ Disposes this instance.
+
+
+
+
+ Gets the update mode applicable.
+
+ The update mode.
+
+
+
+ An implementation suitable for hard disks.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The file.
+ The update mode.
+
+
+
+ Initializes a new instance of the class.
+
+ The file.
+
+
+
+ Gets a temporary output for performing updates on.
+
+ Returns the temporary output stream.
+
+
+
+ Converts a temporary to its final form.
+
+ Returns a that can be used to read
+ the final storage for the archive.
+
+
+
+ Make a temporary copy of a stream.
+
+ The to copy.
+ Returns a temporary output that is a copy of the input.
+
+
+
+ Return a stream suitable for performing direct updates on the original source.
+
+ The current stream.
+ Returns a stream suitable for direct updating.
+ If the is not null this is used as is.
+
+
+
+ Disposes this instance.
+
+
+
+
+ An implementation suitable for in memory streams.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The to use
+ This constructor is for testing as memory streams dont really require safe mode.
+
+
+
+ Get the stream returned by if this was in fact called.
+
+
+
+
+ Gets the temporary output
+
+ Returns the temporary output stream.
+
+
+
+ Converts the temporary to its final form.
+
+ Returns a that can be used to read
+ the final storage for the archive.
+
+
+
+ Make a temporary copy of the original stream.
+
+ The to copy.
+ Returns a temporary output that is a copy of the input.
+
+
+
+ Return a stream suitable for performing direct updates on the original source.
+
+ The original source stream
+ Returns a stream suitable for direct updating.
+ If the passed is not null this is used;
+ otherwise a new is returned.
+
+
+
+ Disposes this instance.
+
+
+
+
+ Holds data pertinent to a data descriptor.
+
+
+
+
+ Get /set the compressed size of data.
+
+
+
+
+ Get / set the uncompressed size of data
+
+
+
+
+ Get /set the crc value.
+
+
+
+
+ This class assists with writing/reading from Zip files.
+
+
+
+
+ Initialise an instance of this class.
+
+ The name of the file to open.
+
+
+
+ Initialise a new instance of .
+
+ The stream to use.
+
+
+
+ Get / set a value indicating wether the the underlying stream is owned or not.
+
+ If the stream is owned it is closed when this instance is closed.
+
+
+
+ Close the stream.
+
+
+ The underlying stream is closed only if is true.
+
+
+
+
+ Locates a block with the desired .
+
+ The signature to find.
+ Location, marking the end of block.
+ Minimum size of the block.
+ The maximum variable data.
+ Eeturns the offset of the first byte after the signature; -1 if not found
+
+
+
+ Write Zip64 end of central directory records (File header and locator).
+
+ The number of entries in the central directory.
+ The size of entries in the central directory.
+ The offset of the dentral directory.
+
+
+
+ Write the required records to end the central directory.
+
+ The number of entries in the directory.
+ The size of the entries in the directory.
+ The start of the central directory.
+ The archive comment. (This can be null).
+
+
+
+ Read an unsigned short in little endian byte order.
+
+ Returns the value read.
+
+ An i/o error occurs.
+
+
+ The file ends prematurely
+
+
+
+
+ Read an int in little endian byte order.
+
+ Returns the value read.
+
+ An i/o error occurs.
+
+
+ The file ends prematurely
+
+
+
+
+ Read a long in little endian byte order.
+
+ The value read.
+
+
+
+ Write an unsigned short in little endian byte order.
+
+ The value to write.
+
+
+
+ Write a ushort in little endian byte order.
+
+ The value to write.
+
+
+
+ Write an int in little endian byte order.
+
+ The value to write.
+
+
+
+ Write a uint in little endian byte order.
+
+ The value to write.
+
+
+
+ Write a long in little endian byte order.
+
+ The value to write.
+
+
+
+ Write a ulong in little endian byte order.
+
+ The value to write.
+
+
+
+ Write a data descriptor.
+
+ The entry to write a descriptor for.
+ Returns the number of descriptor bytes written.
+
+
+
+ Read data descriptor at the end of compressed data.
+
+ if set to true [zip64].
+ The data to fill in.
+ Returns the number of bytes read in the descriptor.
+
+
+
+ This is an InflaterInputStream that reads the files baseInputStream an zip archive
+ one after another. It has a special method to get the zip entry of
+ the next file. The zip entry contains information about the file name
+ size, compressed size, Crc, etc.
+ It includes support for Stored and Deflated entries.
+
+ Author of the original java version : Jochen Hoenicke
+
+
+ This sample shows how to read a zip file
+
+ using System;
+ using System.Text;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.Zip;
+
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ using ( ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) {
+
+ ZipEntry theEntry;
+ const int size = 2048;
+ byte[] data = new byte[2048];
+
+ while ((theEntry = s.GetNextEntry()) != null) {
+ if ( entry.IsFile ) {
+ Console.Write("Show contents (y/n) ?");
+ if (Console.ReadLine() == "y") {
+ while (true) {
+ size = s.Read(data, 0, data.Length);
+ if (size > 0) {
+ Console.Write(new ASCIIEncoding().GetString(data, 0, size));
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+
+
+
+ Delegate for reading bytes from a stream.
+
+
+
+
+ The current reader this instance.
+
+
+
+
+ Creates a new Zip input stream, for reading a zip archive.
+
+ The underlying providing data.
+
+
+
+ Creates a new Zip input stream, for reading a zip archive.
+
+ The underlying providing data.
+ Size of the buffer.
+
+
+
+ Optional password used for encryption when non-null
+
+ A password for all encrypted entries in this
+
+
+
+ Gets a value indicating if there is a current entry and it can be decompressed
+
+
+ The entry can only be decompressed if the library supports the zip features required to extract it.
+ See the ZipEntry Version property for more details.
+
+
+
+
+ Advances to the next entry in the archive
+
+
+ The next entry in the archive or null if there are no more entries.
+
+
+ If the previous entry is still open CloseEntry is called.
+
+
+ Input stream is closed
+
+
+ Password is not set, password is invalid, compression method is invalid,
+ version required to extract is not supported
+
+
+
+
+ Read data descriptor at the end of compressed data.
+
+
+
+
+ Complete cleanup as the final part of closing.
+
+ True if the crc value should be tested
+
+
+
+ Closes the current zip entry and moves to the next one.
+
+
+ The stream is closed
+
+
+ The Zip stream ends early
+
+
+
+
+ Returns 1 if there is an entry available
+ Otherwise returns 0.
+
+
+
+
+ Returns the current size that can be read from the current entry if available
+
+ Thrown if the entry size is not known.
+ Thrown if no entry is currently available.
+
+
+
+ Reads a byte from the current zip entry.
+
+
+ The byte or -1 if end of stream is reached.
+
+
+
+
+ Handle attempts to read by throwing an .
+
+ The destination array to store data in.
+ The offset at which data read should be stored.
+ The maximum number of bytes to read.
+ Returns the number of bytes actually read.
+
+
+
+ Handle attempts to read from this entry by throwing an exception
+
+
+
+
+ Perform the initial read on an entry which may include
+ reading encryption headers and setting up inflation.
+
+ The destination to fill with data read.
+ The offset to start reading at.
+ The maximum number of bytes to read.
+ The actual number of bytes read.
+
+
+
+ Read a block of bytes from the stream.
+
+ The destination for the bytes.
+ The index to start storing data.
+ The number of bytes to attempt to read.
+ Returns the number of bytes read.
+ Zero bytes read means end of stream.
+
+
+
+ Reads a block of bytes from the current zip entry.
+
+
+ The number of bytes read (this may be less than the length requested, even before the end of stream), or 0 on end of stream.
+
+
+ An i/o error occured.
+
+
+ The deflated stream is corrupted.
+
+
+ The stream is not open.
+
+
+
+
+ Closes the zip input stream
+
+
+
+
+ ZipNameTransform transforms names as per the Zip file naming convention.
+
+ The use of absolute names is supported although its use is not valid
+ according to Zip naming conventions, and should not be used if maximum compatability is desired.
+
+
+
+ Initialize a new instance of
+
+
+
+
+ Initialize a new instance of
+
+ The string to trim from the front of paths if found.
+
+
+
+ Static constructor.
+
+
+
+
+ Transform a windows directory name according to the Zip file naming conventions.
+
+ The directory name to transform.
+ The transformed name.
+
+
+
+ Transform a windows file name according to the Zip file naming conventions.
+
+ The file name to transform.
+ The transformed name.
+
+
+
+ Get/set the path prefix to be trimmed from paths if present.
+
+ The prefix is trimmed before any conversion from
+ a windows path is done.
+
+
+
+ Force a name to be valid by replacing invalid characters with a fixed value
+
+ The name to force valid
+ The replacement character to use.
+ Returns a valid name
+
+
+
+ Test a name to see if it is a valid name for a zip entry.
+
+ The name to test.
+ If true checking is relaxed about windows file names and absolute paths.
+ Returns true if the name is a valid zip name; false otherwise.
+ Zip path names are actually in Unix format, and should only contain relative paths.
+ This means that any path stored should not contain a drive or
+ device letter, or a leading slash. All slashes should forward slashes '/'.
+ An empty name is valid for a file where the input comes from standard input.
+ A null name is not considered valid.
+
+
+
+
+ Test a name to see if it is a valid name for a zip entry.
+
+ The name to test.
+ Returns true if the name is a valid zip name; false otherwise.
+ Zip path names are actually in unix format,
+ and should only contain relative paths if a path is present.
+ This means that the path stored should not contain a drive or
+ device letter, or a leading slash. All slashes should forward slashes '/'.
+ An empty name is valid where the input comes from standard input.
+ A null name is not considered valid.
+
+
+
+
+ This is a DeflaterOutputStream that writes the files into a zip
+ archive one after another. It has a special method to start a new
+ zip entry. The zip entries contains information about the file name
+ size, compressed size, CRC, etc.
+
+ It includes support for Stored and Deflated entries.
+ This class is not thread safe.
+
+ Author of the original java version : Jochen Hoenicke
+
+ This sample shows how to create a zip file
+
+ using System;
+ using System.IO;
+
+ using ICSharpCode.SharpZipLib.Core;
+ using ICSharpCode.SharpZipLib.Zip;
+
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ string[] filenames = Directory.GetFiles(args[0]);
+ byte[] buffer = new byte[4096];
+
+ using ( ZipOutputStream s = new ZipOutputStream(File.Create(args[1])) ) {
+
+ s.SetLevel(9); // 0 - store only to 9 - means best compression
+
+ foreach (string file in filenames) {
+ ZipEntry entry = new ZipEntry(file);
+ s.PutNextEntry(entry);
+
+ using (FileStream fs = File.OpenRead(file)) {
+ StreamUtils.Copy(fs, s, buffer);
+ }
+ }
+ }
+ }
+ }
+
+
+
+
+
+ Creates a new Zip output stream, writing a zip archive.
+
+
+ The output stream to which the archive contents are written.
+
+
+
+
+ Creates a new Zip output stream, writing a zip archive.
+
+ The output stream to which the archive contents are written.
+ Size of the buffer to use.
+
+
+
+ Gets a flag value of true if the central header has been added for this archive; false if it has not been added.
+
+ No further entries can be added once this has been done.
+
+
+
+ Set the zip file comment.
+
+
+ The comment text for the entire archive.
+
+
+ The converted comment is longer than 0xffff bytes.
+
+
+
+
+ Sets the compression level. The new level will be activated
+ immediately.
+
+ The new compression level (1 to 9).
+
+ Level specified is not supported.
+
+
+
+
+
+ Get the current deflater compression level
+
+ The current compression level
+
+
+
+ Get / set a value indicating how Zip64 Extension usage is determined when adding entries.
+
+ Older archivers may not understand Zip64 extensions.
+ If backwards compatability is an issue be careful when adding entries to an archive.
+ Setting this property to off is workable but less desirable as in those circumstances adding a file
+ larger then 4GB will fail.
+
+
+
+ Write an unsigned short in little endian byte order.
+
+
+
+
+ Write an int in little endian byte order.
+
+
+
+
+ Write an int in little endian byte order.
+
+
+
+
+ Starts a new Zip entry. It automatically closes the previous
+ entry if present.
+ All entry elements bar name are optional, but must be correct if present.
+ If the compression method is stored and the output is not patchable
+ the compression for that entry is automatically changed to deflate level 0
+
+
+ the entry.
+
+
+ if entry passed is null.
+
+
+ if an I/O error occured.
+
+
+ if stream was finished
+
+
+ Too many entries in the Zip file
+ Entry name is too long
+ Finish has already been called
+
+
+
+
+ Closes the current entry, updating header and footer information as required
+
+
+ An I/O error occurs.
+
+
+ No entry is active.
+
+
+
+
+ Writes the given buffer to the current entry.
+
+ The buffer containing data to write.
+ The offset of the first byte to write.
+ The number of bytes to write.
+ Archive size is invalid
+ No entry is active.
+
+
+
+ Finishes the stream. This will write the central directory at the
+ end of the zip file and flush the stream.
+
+
+ This is automatically called when the stream is closed.
+
+
+ An I/O error occurs.
+
+
+ Comment exceeds the maximum length
+ Entry name exceeds the maximum length
+
+
+
+
+ The entries for the archive.
+
+
+
+
+ Used to track the crc of data added to entries.
+
+
+
+
+ The current entry being added.
+
+
+
+
+ Used to track the size of data for an entry during writing.
+
+
+
+
+ Offset to be recorded for each entry in the central header.
+
+
+
+
+ Comment for the entire archive recorded in central header.
+
+
+
+
+ Flag indicating that header patching is required for the current entry.
+
+
+
+
+ Position to patch crc
+
+
+
+
+ Position to patch size.
+
+
+
+
+ This static class contains functions for encoding and decoding zip file strings
+
+
+
+ Code page backing field
+
+ The original Zip specification (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) states
+ that file names should only be encoded with IBM Code Page 437 or UTF-8.
+ In practice, most zip apps use OEM or system encoding (typically cp437 on Windows).
+ Let's be good citizens and default to UTF-8 http://utf8everywhere.org/
+
+
+
+ Automatically select codepage while opening archive
+ see https://github.com/icsharpcode/SharpZipLib/pull/280#issuecomment-433608324
+
+
+
+
+ Encoding used for string conversion. Setting this to 65001 (UTF-8) will
+ also set the Language encoding flag to indicate UTF-8 encoded file names.
+
+
+
+
+ Attempt to get the operating system default codepage, or failing that, to
+ the fallback code page IBM 437.
+
+
+
+
+ Get wether the default codepage is set to UTF-8. Setting this property to false will
+ set the to
+
+
+ /// Get OEM codepage from NetFX, which parses the NLP file with culture info table etc etc.
+ But sometimes it yields the special value of 1 which is nicknamed CodePageNoOEM in sources (might also mean CP_OEMCP, but Encoding puts it so).
+ This was observed on Ukranian and Hindu systems.
+ Given this value, throws an .
+ So replace it with , (IBM 437 which is the default code page in a default Windows installation console.
+
+
+
+
+ Convert a portion of a byte array to a string using
+
+
+ Data to convert to string
+
+
+ Number of bytes to convert starting from index 0
+
+
+ data[0]..data[count - 1] converted to a string
+
+
+
+
+ Convert a byte array to a string using
+
+
+ Byte array to convert
+
+
+ dataconverted to a string
+
+
+
+
+ Convert a byte array to a string using
+
+ The applicable general purpose bits flags
+
+ Byte array to convert
+
+ The number of bytes to convert.
+
+ dataconverted to a string
+
+
+
+
+ Convert a byte array to a string using
+
+
+ Byte array to convert
+
+ The applicable general purpose bits flags
+
+ dataconverted to a string
+
+
+
+
+ Convert a string to a byte array using
+
+
+ String to convert to an array
+
+ Converted array
+
+
+
+ Convert a string to a byte array using
+
+ The applicable general purpose bits flags
+
+ String to convert to an array
+
+ Converted array
+
+
+
diff --git a/MES_Manage/Bin/MES_SPC.dll b/MES_Manage/Bin/MES_SPC.dll
new file mode 100644
index 0000000..947ee7f
Binary files /dev/null and b/MES_Manage/Bin/MES_SPC.dll differ
diff --git a/MES_Manage/Bin/MES_SPC.pdb b/MES_Manage/Bin/MES_SPC.pdb
new file mode 100644
index 0000000..0faaa5d
Binary files /dev/null and b/MES_Manage/Bin/MES_SPC.pdb differ
diff --git a/MES_Manage/Bin/NPOI.OOXML.dll b/MES_Manage/Bin/NPOI.OOXML.dll
new file mode 100644
index 0000000..515b9f8
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OOXML.dll differ
diff --git a/MES_Manage/Bin/NPOI.OOXML.pdb b/MES_Manage/Bin/NPOI.OOXML.pdb
new file mode 100644
index 0000000..e27bd4f
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OOXML.pdb differ
diff --git a/MES_Manage/Bin/NPOI.OOXML.xml b/MES_Manage/Bin/NPOI.OOXML.xml
new file mode 100644
index 0000000..c428351
--- /dev/null
+++ b/MES_Manage/Bin/NPOI.OOXML.xml
@@ -0,0 +1,9621 @@
+
+
+
+ NPOI.OOXML
+
+
+
+ The OPC Package
+
+
+ The properties of the OPC namespace, opened as needed
+
+
+ Wrapper to open a namespace, returning an IOException
+ in the event of a problem.
+ Works around shortcomings in java's this() constructor calls
+
+
+ Retrieves all the PackageParts which are defined as
+ relationships of the base document with the
+ specified content type.
+
+
+ Checks that the supplied Stream (which MUST
+ support mark and reSet, or be a PushbackStream)
+ has a OOXML (zip) header at the start of it.
+ If your Stream does not support mark / reSet,
+ then wrap it in a PushBackStream, then be
+ sure to always use that, and not the original!
+ @param inp An Stream which supports either mark/reSet, or is a PushbackStream
+
+
+ Get the document properties. This gives you access to the
+ core ooxml properties, and the extended ooxml properties.
+
+
+ Get the document's embedded files.
+
+
+ Closes the underlying {@link OPCPackage} from which this
+ document was read, if there is one
+
+
+ Write out this document to an Outputstream.
+
+ @param stream - the java Stream you wish to write the file to
+
+ @exception IOException if anything can't be written.
+
+
+ Represents an entry of a OOXML namespace.
+
+
+ Each POIXMLDocumentPart keeps a reference to the underlying a {@link org.apache.poi.openxml4j.opc.PackagePart}.
+
+
+ @author Yegor Kozlov
+
+
+ Counter that provides the amount of incoming relations from other parts
+ to this part.
+
+
+ Construct POIXMLDocumentPart representing a "core document" namespace part.
+
+
+ Creates new POIXMLDocumentPart - called by client code to create new parts from scratch.
+
+ @see #CreateRelationship(POIXMLRelation, POIXMLFactory, int, bool)
+
+
+ Creates an POIXMLDocumentPart representing the given namespace part and relationship.
+ Called by {@link #read(POIXMLFactory, java.util.Map)} when Reading in an exisiting file.
+
+ @param part - The namespace part that holds xml data represenring this sheet.
+ @param rel - the relationship of the given namespace part
+ @see #read(POIXMLFactory, java.util.Map)
+
+
+ Creates an POIXMLDocumentPart representing the given namespace part, relationship and parent
+ Called by {@link #read(POIXMLFactory, java.util.Map)} when Reading in an exisiting file.
+
+ @param parent - Parent part
+ @param part - The namespace part that holds xml data represenring this sheet.
+ @param rel - the relationship of the given namespace part
+ @see #read(POIXMLFactory, java.util.Map)
+
+
+ When you open something like a theme, call this to
+ re-base the XML Document onto the core child of the
+ current core document
+
+
+ Provides access to the underlying PackagePart
+
+ @return the underlying PackagePart
+
+
+ Provides access to the PackageRelationship that identifies this POIXMLDocumentPart
+
+ @return the PackageRelationship that identifies this POIXMLDocumentPart
+
+
+ Returns the list of child relations for this POIXMLDocumentPart
+
+ @return child relations
+
+
+ Returns the target {@link POIXMLDocumentPart}, where a
+ {@link PackageRelationship} is set from the {@link PackagePart} of this
+ {@link POIXMLDocumentPart} to the {@link PackagePart} of the target
+ {@link POIXMLDocumentPart} with a {@link PackageRelationship#GetId()}
+ matching the given parameter value.
+
+ @param id
+ The relation id to look for
+ @return the target part of the relation, or null, if none exists
+
+
+ Returns the {@link PackageRelationship#GetId()} of the
+ {@link PackageRelationship}, that sources from the {@link PackagePart} of
+ this {@link POIXMLDocumentPart} to the {@link PackagePart} of the given
+ parameter value.
+
+ @param part
+ The {@link POIXMLDocumentPart} for which the according
+ relation-id shall be found.
+ @return The value of the {@link PackageRelationship#GetId()} or null, if
+ parts are not related.
+
+
+ Add a new child POIXMLDocumentPart
+
+ @param part the child to add
+
+
+ Remove the relation to the specified part in this namespace and remove the
+ part, if it is no longer needed.
+
+
+ Remove the relation to the specified part in this namespace and remove the
+ part, if it is no longer needed and flag is set to true.
+
+ @param part
+ The related part, to which the relation shall be Removed.
+ @param RemoveUnusedParts
+ true, if the part shall be Removed from the namespace if not
+ needed any longer.
+
+
+ Returns the parent POIXMLDocumentPart. All parts except root have not-null parent.
+
+ @return the parent POIXMLDocumentPart or null for the root element.
+
+
+ Save the content in the underlying namespace part.
+ Default implementation is empty meaning that the namespace part is left unmodified.
+
+ Sub-classes should override and add logic to marshal the "model" into Ooxml4J.
+
+ For example, the code saving a generic XML entry may look as follows:
+
+ protected void commit() {
+ PackagePart part = GetPackagePart();
+ Stream out = part.GetStream();
+ XmlObject bean = GetXmlBean(); //the "model" which holds Changes in memory
+ bean.save(out, DEFAULT_XML_OPTIONS);
+ out.close();
+ }
+
+
+
+
+ Save Changes in the underlying OOXML namespace.
+ Recursively fires {@link #commit()} for each namespace part
+
+ @param alreadySaved context set Containing already visited nodes
+
+
+ Ensure that a memory based package part does not have lingering data from previous
+ commit() calls.
+
+ Note: This is overwritten for some objects, as *PictureData seem to store the actual content
+ in the part directly without keeping a copy like all others therefore we need to handle them differently.
+
+
+ Create a new child POIXMLDocumentPart
+
+ @param descriptor the part descriptor
+ @param factory the factory that will create an instance of the requested relation
+ @return the Created child POIXMLDocumentPart
+
+
+ Create a new child POIXMLDocumentPart
+
+ @param descriptor the part descriptor
+ @param factory the factory that will create an instance of the requested relation
+ @param idx part number
+ @param noRelation if true, then no relationship is Added.
+ @return the Created child POIXMLDocumentPart
+
+
+ Iterate through the underlying PackagePart and create child POIXMLFactory instances
+ using the specified factory
+
+ @param factory the factory object that Creates POIXMLFactory instances
+ @param context context map Containing already visited noted keyed by tarGetURI
+
+
+ Get the PackagePart that is the target of a relationship.
+
+ @param rel The relationship
+ @return The target part
+ @throws InvalidFormatException
+
+
+ Fired when a new namespace part is Created
+
+
+ Fired when a namespace part is read
+
+
+ Fired when a namespace part is about to be Removed from the namespace
+
+
+ Defines a factory API that enables sub-classes to create instances of POIXMLDocumentPart
+
+ @author Yegor Kozlov
+
+
+ Create a POIXMLDocumentPart from existing namespace part and relation. This method is called
+ from {@link POIXMLDocument#load(POIXMLFactory)} when parsing a document
+
+ @param parent parent part
+ @param rel the namespace part relationship
+ @param part the PackagePart representing the Created instance
+ @return A new instance of a POIXMLDocumentPart.
+
+
+ Create a new POIXMLDocumentPart using the supplied descriptor. This method is used when Adding new parts
+ to a document, for example, when Adding a sheet to a workbook, slide to a presentation, etc.
+
+ @param descriptor describes the object to create
+ @return A new instance of a POIXMLDocumentPart.
+
+
+ The core document properties
+
+
+ Extended document properties
+
+
+ Custom document properties
+
+
+ Each custom property element Contains an fmtid attribute
+ with the same GUID value ({D5CDD505-2E9C-101B-9397-08002B2CF9AE}).
+
+
+ Add a new property
+
+ @param name the property name
+ @throws IllegalArgumentException if a property with this name already exists
+
+
+ Add a new string property
+
+ @throws IllegalArgumentException if a property with this name already exists
+
+
+ Add a new double property
+
+ @throws IllegalArgumentException if a property with this name already exists
+
+
+ Add a new integer property
+
+ @throws IllegalArgumentException if a property with this name already exists
+
+
+ Add a new bool property
+
+ @throws IllegalArgumentException if a property with this name already exists
+
+
+ Generate next id that uniquely relates a custom property
+
+ @return next property id starting with 2
+
+
+ Check if a property with this name already exists in the collection of custom properties
+
+ @param name the name to check
+ @return whether a property with the given name exists in the custom properties
+
+
+ Retrieve the custom property with this name, or null if none exists.
+
+ You will need to test the various isSetX methods to work out
+ what the type of the property is, before fetching the
+ appropriate value for it.
+
+ @param name the name of the property to fetch
+
+
+ Wrapper around the two different kinds of OOXML properties
+ a document can have
+
+
+ Returns the core document properties
+
+
+ Returns the extended document properties
+
+
+ Returns the custom document properties
+
+
+ Commit Changes to the underlying OPC namespace
+
+
+ A {@link POITextExtractor} for returning the textual
+ content of the OOXML file properties, eg author
+ and title.
+
+
+ Creates a new POIXMLPropertiesTextExtractor for the
+ given open document.
+
+
+ Creates a new POIXMLPropertiesTextExtractor, for the
+ same file that another TextExtractor is already
+ working on.
+
+
+ Returns the core document properties, eg author
+
+
+ Returns the extended document properties, eg
+ application
+
+
+ Returns the custom document properties, if
+ there are any
+
+
+ Represents a descriptor of a OOXML relation.
+
+ @author Yegor Kozlov
+
+
+ Describes the content stored in a part.
+
+
+ The kind of connection between a source part and a target part in a namespace.
+
+
+ The path component of a pack URI.
+
+
+ Defines what object is used to construct instances of this relationship
+
+
+ Instantiates a POIXMLRelation.
+
+ @param type content type
+ @param rel relationship
+ @param defaultName default item name
+ @param cls defines what object is used to construct instances of this relationship
+
+
+ Instantiates a POIXMLRelation.
+
+ @param type content type
+ @param rel relationship
+ @param defaultName default item name
+
+
+ Return the content type. Content types define a media type, a subtype, and an
+ optional set of parameters, as defined in RFC 2616.
+
+ @return the content type
+
+
+ Return the relationship, the kind of connection between a source part and a target part in a namespace.
+ Relationships make the connections between parts directly discoverable without looking at the content
+ in the parts, and without altering the parts themselves.
+
+ @return the relationship
+
+
+ Return the default part name. Part names are used to refer to a part in the context of a
+ namespace, typically as part of a URI.
+
+ @return the default part name
+
+
+ Returns the filename for the nth one of these,
+ e.g. /xl/comments4.xml
+
+
+ Return type of the obejct used to construct instances of this relationship
+
+ @return the class of the object used to construct instances of this relation
+
+
+ The POIXMLDocument that's open
+
+
+ Creates a new text extractor for the given document
+
+
+ Returns the core document properties
+
+
+ Returns the extended document properties
+
+
+ Returns the custom document properties
+
+
+ Returns opened document
+
+
+ Returns the opened OPCPackage that Contains the document
+
+
+ Returns an OOXML properties text extractor for the
+ document properties metadata, such as title and author.
+
+
+
+ 是否输出列头
+
+
+
+
+ 是否输出隐藏的列
+
+
+
+
+ 是否输出隐藏的行
+
+
+
+
+ 是否输出文本前的空格
+
+
+
+
+ 是否输出行号
+
+
+
+
+ 在跨列的单元格使用DIV标记
+
+
+
+ @return maximum 1-base index of column that were rendered, zero if none
+
+
+ Creates COLGROUP element with width specified for all columns. (Except
+ first if {@link #isOutputRowNumbers()}==true)
+
+
+ Creates a map (i.e. two-dimensional array) filled with ranges. Allow fast
+ retrieving {@link CellRangeAddress} of any cell, if cell is contained in
+ range.
+
+ @see #getMergedRange(CellRangeAddress[][], int, int)
+
+
+ See here for Xio explanation and details
+
+
+ @param mergedRanges
+ map of sheet merged ranges built with
+ {@link #buildMergedRangesMap(HSSFSheet)}
+ @return {@link CellRangeAddress} from map if cell with specified row and
+ column numbers contained in found range, null otherwise
+
+
+ A deprecated indexing scheme for colours that is still required for some records, and for backwards
+ compatibility with OLE2 formats.
+
+
+ Each element corresponds to a color index (zero-based). When using the default indexed color palette,
+ the values are not written out, but instead are implied. When the color palette has been modified from default,
+ then the entire color palette is used.
+
+
+ @author Yegor Kozlov
+
+
+ Returns index of this color
+
+ @return index of this color
+
+
+
+ Only Text and Formulas are imported. Pictures, Drawing, Styles etc. are all ignored.
+
+
+
+
+ Only Text, Comments and Formulas are imported. Pictures, Drawing, Styles etc. are all ignored.
+
+
+
+
+ Everything is imported - this is the same as NONE.
+
+
+
+
+ Factory for creating the appropriate kind of Workbook
+ (be it HSSFWorkbook or XSSFWorkbook), from the given input
+
+
+
+
+ Creates an HSSFWorkbook from the given POIFSFileSystem
+
+
+
+ Creates an HSSFWorkbook from the given NPOIFSFileSystem
+
+
+
+ Creates an XSSFWorkbook from the given OOXML Package
+
+
+
+
+ Creates the appropriate HSSFWorkbook / XSSFWorkbook from
+ the given InputStream. The Stream is wraped inside a PushbackInputStream.
+
+ Input Stream of .xls or .xlsx file
+ IWorkbook depending on the input HSSFWorkbook or XSSFWorkbook is returned.
+
+
+
+
+ Creates the appropriate HSSFWorkbook / XSSFWorkbook from
+ the given InputStream. The Stream is wraped inside a PushbackInputStream.
+
+ Input Stream of .xls or .xlsx file
+ Customize the elements that are processed on the next import
+ IWorkbook depending on the input HSSFWorkbook or XSSFWorkbook is returned.
+
+
+
+ Creates a specific FormulaEvaluator for the given workbook.
+
+
+
+
+ Sets the import option when opening the next workbook.
+ Works only for XSSF. For HSSF workbooks this option is ignored.
+
+ Customize the elements that are processed on the next import
+
+
+
+ 24.08.2009 @author Stefan Stern
+
+
+
+
+
+
+
+
+
+ List of segments of available identifiers
+
+
+ @param lowerbound the lower limit of the id-range to manage. Must be greater than or equal to {@link #MIN_ID}.
+ @param upperbound the upper limit of the id-range to manage. Must be less then or equal {@link #MAX_ID}.
+
+
+ @return a new identifier.
+ @throws IllegalStateException if no more identifiers are available, then an Exception is raised.
+
+
+ @param id
+ the identifier to release. Must be greater than or equal to
+ {@link #lowerbound} and must be less than or equal to {@link #upperbound}
+ @return true, if the identifier was reserved and has been successfully
+ released, false, if the identifier was not reserved.
+
+
+
+
+
+ Provides handy methods to work with OOXML namespaces
+
+ @author Yegor Kozlov
+
+
+ Clone the specified namespace.
+
+ @param pkg the namespace to clone
+ @param file the destination file
+ @return the Cloned namespace
+
+
+ Creates an empty file in the default temporary-file directory,
+
+
+ Recursively copy namespace parts to the destination namespace
+
+
+ Copy core namespace properties
+
+ @param src source properties
+ @param tgt target properties
+
+
+ Helper class to extract text from an OOXML Excel file
+
+
+
+ Should header and footer be included? Default is true
+
+
+
+
+ Should sheet names be included? Default is true
+
+ if set to true [include sheet names].
+
+
+
+ Should we return the formula itself, and not
+ the result it produces? Default is false
+
+ if set to true [formulas not results].
+
+
+
+ Should cell comments be included? Default is false
+
+ if set to true [include cell comments].
+
+
+ Should sheet names be included? Default is true
+
+
+ Should we return the formula itself, and not
+ the result it produces? Default is false
+
+
+ Should cell comments be included? Default is false
+
+
+ Should headers and footers be included? Default is true
+
+
+ Retreives the text contents of the file
+
+
+
+ Maps an XLSX to an XML according to one of the mapping defined.
+
+
+ The output XML Schema must respect this limitations:
+
+
+
all mandatory elements and attributes must be mapped (enable validation to check this)
+
+
no <any> in complex type/element declaration
+
no <anyAttribute> attributes declaration
+
no recursive structures: recursive structures can't be nested more than one level
+
no abstract elements: abstract complex types can be declared but must not be used in elements.
+
no mixed content: an element can't contain simple text and child element(s) together
+
no <substitutionGroup> in complex type/element declaration
+
+
+
+ Creates a new exporter and Sets the mapping to be used when generating the XML output document
+
+ @param map the mapping rule to be used
+
+
+
+ Exports the data in an XML stream
+
+ @param os OutputStream in which will contain the output XML
+ @param validate if true, validates the XML againts the XML Schema
+ @throws SAXException
+ @throws TransformerException
+ @throws ParserConfigurationException
+
+
+ Exports the data in an XML stream
+
+ @param os OutputStream in which will contain the output XML
+ @param encoding the output charset encoding
+ @param validate if true, validates the XML againts the XML Schema
+ @throws SAXException
+ @throws ParserConfigurationException
+ @throws TransformerException
+ @throws InvalidFormatException
+
+
+ Validate the generated XML against the XML Schema associated with the XSSFMap
+
+ @param xml the XML to validate
+ @return
+
+
+ Compares two xpaths to define an ordering according to the XML Schema
+
+
+
+ The cells in a workbook can be calculated in different orders depending on various optimizations and
+ dependencies. The calculation chain object specifies the order in which the cells in a workbook were last calculated.
+
+ @author Yegor Kozlov
+
+
+ Remove a formula reference from the calculation chain
+
+ @param sheetId the sheet Id of a sheet the formula belongs to.
+ @param ref A1 style reference to the cell Containing the formula.
+
+
+ XML Beans uses a list, which is very slow
+ to search, so we wrap things with our own
+ map for fast Lookup.
+
+
+ Called after the reference is updated, so that
+ we can reflect that in our cache
+
+
+
+ Searches the author. If not found he is added to the list of authors.
+
+ author to search
+ index of the author
+
+
+ This method is deprecated and should not be used any more as
+ it overwrites the comment in Cell A1.
+
+ @return
+
+
+ Holds details of links to parts of other workbooks (eg named ranges),
+ along with the most recently seen values for what they point to.
+
+
+ Returns the underlying xmlbeans object for the external
+ link table
+
+
+ get or set the last recorded name of the file that this
+ is linked to
+
+
+
+ This class : the Custom XML Mapping Part (Open Office XML Part 1:
+ chapter 12.3.6)
+
+ An instance of this part type Contains a schema for an XML file, and
+ information on the behavior that is used when allowing this custom XML schema
+ to be mapped into the spreadsheet.
+
+ @author Roberto Manicardi
+
+
+ Returns the parent XSSFWorkbook
+
+ @return the parent XSSFWorkbook
+
+
+
+ @return the internal data object
+
+
+ Gets the
+ @param schemaId the schema ID
+ @return CTSchema by it's ID
+
+
+
+ @return all the mappings configured in this document
+
+
+ Used internally to navigate the paragraph text style hierarchy within a shape and fetch properties
+
+
+
+ @param shape the shape being examined
+ @return true if the desired property was fetched
+
+
+ Table of strings shared across all sheets in a workbook.
+
+ A workbook may contain thousands of cells Containing string (non-numeric) data. Furthermore this data is very
+ likely to be repeated across many rows or columns. The goal of implementing a single string table that is shared
+ across the workbook is to improve performance in opening and saving the file by only Reading and writing the
+ repetitive information once.
+
+
+ Consider for example a workbook summarizing information for cities within various countries. There may be a
+ column for the name of the country, a column for the name of each city in that country, and a column
+ Containing the data for each city. In this case the country name is repetitive, being duplicated in many cells.
+ In many cases the repetition is extensive, and a tremendous savings is realized by making use of a shared string
+ table when saving the workbook. When displaying text in the spreadsheet, the cell table will just contain an
+ index into the string table as the value of a cell, instead of the full string.
+
+
+ The shared string table Contains all the necessary information for displaying the string: the text, formatting
+ properties, and phonetic properties (for East Asian languages).
+
+
+ @author Nick Birch
+ @author Yegor Kozlov
+
+
+ Array of individual string items in the Shared String table.
+
+
+ Maps strings and their indexes in the strings arrays
+
+
+ An integer representing the total count of strings in the workbook. This count does not
+ include any numbers, it counts only the total of text strings in the workbook.
+
+
+ An integer representing the total count of unique strings in the Shared String Table.
+ A string is unique even if it is a copy of another string, but has different formatting applied
+ at the character level.
+
+
+ Return a string item by index
+
+ @param idx index of item to return.
+ @return the item at the specified position in this Shared String table.
+
+
+ Return an integer representing the total count of strings in the workbook. This count does not
+ include any numbers, it counts only the total of text strings in the workbook.
+
+ @return the total count of strings in the workbook
+
+
+ Returns an integer representing the total count of unique strings in the Shared String Table.
+ A string is unique even if it is a copy of another string, but has different formatting applied
+ at the character level.
+
+ @return the total count of unique strings in the workbook
+
+
+ Add an entry to this Shared String table (a new value is appened to the end).
+
+
+ If the Shared String table already Contains this CT_Rst bean, its index is returned.
+ Otherwise a new entry is aded.
+
+
+ @param st the entry to add
+ @return index the index of Added entry
+
+
+ Provide low-level access to the underlying array of CT_Rst beans
+
+ @return array of CT_Rst beans
+
+
+
+ this table out as XML.
+
+ @param out The stream to write to.
+ @throws IOException if an error occurs while writing.
+
+
+
+ This class : the Single Cell Tables Part (Open Office XML Part 4:
+ chapter 3.5.2)
+
+
+ @author Roberto Manicardi
+
+
+
+ @return all the SimpleXmlCell Contained in this SingleXmlCells element
+
+
+ Table of styles shared across all sheets in a workbook.
+
+ @author ugo
+
+
+ The first style id available for use as a custom style
+
+
+ Create a new, empty StylesTable
+
+
+ Read this shared styles table from an XML file.
+
+ @param is The input stream Containing the XML document.
+ @throws IOException if an error occurs while Reading.
+
+
+ Records the given font in the font table.
+ Will re-use an existing font index if this
+ font matches another, EXCEPT if forced
+ registration is requested.
+ This allows people to create several fonts
+ then customise them later.
+ Note - End Users probably want to call
+ {@link XSSFFont#registerTo(StylesTable)}
+
+
+ get the size of cell styles
+
+
+ For unit testing only
+
+
+ For unit testing only
+
+
+ For unit testing only
+
+
+ For unit testing only!
+
+
+ Write this table out as XML.
+
+ @param out The stream to write to.
+ @throws IOException if an error occurs while writing.
+
+
+ Finds a font that matches the one with the supplied attributes
+
+
+ Class that represents theme of XLSX document. The theme includes specific
+ colors and fonts.
+
+
+ Construct a ThemesTable.
+ @param part A PackagePart.
+ @param rel A PackageRelationship.
+
+
+ Construct a ThemesTable from an existing ThemeDocument.
+ @param theme A ThemeDocument.
+
+
+ Convert a theme "index" into a color.
+ @param idx A theme "index"
+ @return The mapped XSSFColor, or null if not mapped.
+
+
+ If the colour is based on a theme, then inherit
+ information (currently just colours) from it as
+ required.
+
+
+
+ map of tracked columns, with values containing the best-fit width for the column
+ Using a HashMap instead of a TreeMap because insertion (trackColumn), removal (untrackColumn), and membership (everything)
+ will be called more frequently than getTrackedColumns(). The O(1) cost of insertion, removal, and membership operations
+ outweigh the infrequent O(n*log n) cost of sorting getTrackedColumns().
+ Memory consumption for a HashMap and TreeMap is about the same
+
+
+
+ Gets the current best-fit column width for the provided settings
+
+ @param useMergedCells true if merged cells are considered into the best-fit column width calculation
+ @return best fit column width, measured in default character widths.
+
+
+ Sets the best-fit column width to the maximum of the current width and the provided width
+
+ @param unmergedWidth the best-fit column width calculated with useMergedCells=False
+ @param mergedWidth the best-fit column width calculated with useMergedCells=True
+
+
+ AutoSizeColumnTracker constructor. Holds no reference to sheet
+
+ @param sheet the sheet associated with this auto-size column tracker
+ @since 3.14beta1
+
+
+ Get the currently tracked columns, naturally ordered.
+ Note if all columns are tracked, this will only return the columns that have been explicitly or implicitly tracked,
+ which is probably only columns containing 1 or more non-blank values
+
+ @return a set of the indices of all tracked columns
+ @since 3.14beta1
+
+
+ Returns true if column is currently tracked for auto-sizing.
+
+ @param column the index of the column to check
+ @return true if column is tracked
+ @since 3.14beta1
+
+
+ Returns true if all columns are implicitly tracked.
+
+ @return true if all columns are implicitly tracked
+ @since 3.14beta1
+
+
+ Tracks all non-blank columns
+ Allows columns that have been explicitly untracked to be tracked
+ @since 3.14beta1
+
+
+ Untrack all columns that were previously tracked for auto-sizing.
+ All best-fit column widths are forgotten.
+ @since 3.14beta1
+
+
+ Marks multiple columns for inclusion in auto-size column tracking.
+ Note this has undefined behavior if columns are tracked after one or more rows are written to the sheet.
+ Any column in columns that are already tracked are ignored by this call.
+
+ @param columns the indices of the columns to track
+ @since 3.14beta1
+
+
+ Marks a column for inclusion in auto-size column tracking.
+ Note this has undefined behavior if a column is tracked after one or more rows are written to the sheet.
+ If column is already tracked, this call does nothing.
+
+ @param column the index of the column to track for auto-sizing
+ @return if column is already tracked, the call does nothing and returns false
+ @since 3.14beta1
+
+
+ Implicitly track a column if it has not been explicitly untracked
+ If it has been explicitly untracked, this call does nothing and returns false.
+ Otherwise return true
+
+ @param column the column to implicitly track
+ @return false if column has been explicitly untracked, otherwise return true
+
+
+ Removes columns that were previously marked for inclusion in auto-size column tracking.
+ When a column is untracked, the best-fit width is forgotten.
+ Any column in columns that is not tracked will be ignored by this call.
+
+ @param columns the indices of the columns to track for auto-sizing
+ @return true if one or more columns were untracked as a result of this call
+ @since 3.14beta1
+
+
+ Removes a column that was previously marked for inclusion in auto-size column tracking.
+ When a column is untracked, the best-fit width is forgotten.
+ If column is not tracked, it will be ignored by this call.
+
+ @param column the index of the column to track for auto-sizing
+ @return true if column was tracked prior this call, false if no action was taken
+ @since 3.14beta1
+
+
+ Get the best-fit width of a tracked column
+
+ @param column the index of the column to get the current best-fit width of
+ @param useMergedCells true if merged cells should be considered when computing the best-fit width
+ @return best-fit column width, measured in number of characters
+ @throws IllegalStateException if column is not tracked and trackAllColumns is false
+ @since 3.14beta1
+
+
+ Calculate the best fit width for each tracked column in row
+
+ @param row the row to get the cells
+ @since 3.14beta1
+
+
+ Helper for {@link #updateColumnWidths(Row)}.
+ Implicitly track the columns corresponding to the cells in row.
+ If all columns in the row are already tracked, this call does nothing.
+ Explicitly untracked columns will not be tracked.
+
+ @param row the row containing cells to implicitly track the columns
+ @since 3.14beta1
+
+
+ Helper for {@link #updateColumnWidths(Row)}.
+
+ @param cell the cell to compute the best fit width on
+ @param pair the column width pair to update
+ @since 3.14beta1
+
+
+ @param sharedStringsTable the shared strings table, or null if inline text is used
+
+
+ @return temp file to write sheet data
+
+
+ Table of strings shared across this workbook.
+ If two cells contain the same string, then the cell value is the same index into SharedStringsTable
+
+
+ Create a temp file to write sheet data.
+ By default, temp files are created in the default temporary-file directory
+ with a prefix "poi-sxssf-sheet" and suffix ".xml". Subclasses can override
+ it and specify a different temp directory or filename or suffix, e.g. .gz
+
+ @return temp file to write sheet data
+
+
+ Create a writer for the sheet data.
+
+ @param fd the file to write to
+
+
+ Override this to translate (such as encrypt or compress) the file output stream
+ as it is being written to disk.
+ The default behavior is to to pass the stream through unmodified.
+
+ @param fos the stream to decorate
+ @return a decorated stream
+ @throws IOException
+ @see #decorateInputStream(FileInputStream)
+
+
+ flush and close the temp data writer.
+ This method must be invoked before calling {@link #getWorksheetXMLInputStream()}
+
+
+ @return a stream to read temp file with the sheet data
+
+
+ Override this to translate (such as decrypt or expand) the file input stream
+ as it is being read from disk.
+ The default behavior is to to pass the stream through unmodified.
+
+ @param fis the stream to decorate
+ @return a decorated stream
+ @throws IOException
+ @see #decorateOutputStream(FileOutputStream)
+
+
+ Write a row to the file
+
+ @param rownum 0-based row number
+ @param row a row
+
+
+ @return whether the string has leading / trailing spaces that
+ need to be preserved with the xml:space=\"preserve\" attribute
+
+
+ Deletes the temporary file that backed this sheet on disk.
+ @return true if the file was deleted, false if it wasn't.
+
+
+ Will return {@link CellType} in a future version of POI.
+ For forwards compatibility, do not hard-code cell type literals in your code.
+
+ @return cell type
+
+
+ @since POI 3.15 beta 3
+ @deprecated POI 3.15 beta 3.
+ Will be deleted when we make the CellType enum transition. See bug 59791.
+
+
+ Will return {@link CellType} in a future version of POI.
+ For forwards compatibility, do not hard-code cell type literals in your code.
+
+ @return cell type of cached formula result
+
+
+ @since POI 3.15 beta 3
+ @deprecated POI 3.15 beta 3.
+ Will be deleted when we make the CellType enum transition. See bug 59791.
+
+
+
+ throws RuntimeException if the bounds are exceeded.
+
+
+
+
+ Return the column number of a cell if it is in this row
+ Otherwise return -1
+
+ @param cell the cell to get the index of
+ @return cell column index if it is in this row, -1 otherwise
+
+
+ Create an iterator over the cells from [0, getLastCellNum()).
+ Includes blank cells, excludes empty cells
+
+ Returns an iterator over all filled cells (created via Row.createCell())
+ Throws ConcurrentModificationException if cells are added, moved, or
+ removed after the iterator is created.
+
+
+ Set row groupings (like groupRow) in a stream-friendly manner
+
+
+ groupRows requires all rows in the group to be in the current window.
+ This is not always practical. Instead use setRowOutlineLevel to
+ explicitly set the group level. Level 1 is the top level group,
+ followed by 2, etc. It is up to the user to ensure that level 2
+ groups are correctly nested under level 1, etc.
+
+
+ @param rownum index of row to update (0-based)
+ @param level outline level (greater than 0)
+
+
+ @param rowIndex the zero based row index to find from
+
+
+ Specifies how many rows can be accessed at most via getRow().
+ The exeeding rows (if any) are flushed to the disk while rows
+ with lower index values are flushed first.
+
+
+
+ Streaming version of the XSSFWorkbook, originally implemented in the "BigGridDemo".
+
+
+
+
+ whether temp file should be compresss.
+
+
+
+
+ shared string table - a cache of strings in this workbook.
+
+
+
+
+ Currently only supports writing not reading. E.g. the number of rows returned from a worksheet will be wrong etc.
+
+
+
+
+
+
+
+ Dispose of temporary files backing this workbook on disk.
+ Calling this method will render the workbook unusable.
+ @return true if all temporary files were deleted successfully.
+
+
+
+ Holds data for a XSSF Line Chart
+
+
+
+
+
+ List of all data series.
+
+
+ Base class for all axis types.
+
+ @author Roman Kashitsyn
+
+
+ @author Roman Kashitsyn
+
+
+ @return new scatter chart data instance
+
+
+ @return factory instance
+
+
+ Represents a SpreadsheetML chart legend
+ @author Roman Kashitsyn
+
+
+ Underlaying CTLagend bean
+
+
+ Create a new SpreadsheetML chart legend
+
+
+ Set sensible default styling.
+
+
+ Return the underlying CTLegend bean.
+
+ @return the underlying CTLegend bean
+
+
+ Package private class with utility methods.
+
+ @author Roman Kashitsyn
+
+
+ Builds CTAxDataSource object content from POI ChartDataSource.
+ @param ctAxDataSource OOXML data source to build
+ @param dataSource POI data source to use
+
+
+ Builds CTNumDataSource object content from POI ChartDataSource
+ @param ctNumDataSource OOXML data source to build
+ @param dataSource POI data source to use
+
+
+
+ Holds data for a XSSF Line Chart
+
+
+
+
+
+ List of all data series.
+
+
+ Represents a SpreadsheetML manual layout.
+ @author Roman Kashitsyn
+
+
+ Underlaying CTManualLayout bean.
+
+
+ Create a new SpreadsheetML manual layout.
+ @param layout a Spreadsheet ML layout that should be used as base.
+
+
+ Create a new SpreadsheetML manual layout for chart.
+ @param chart a chart to create layout for.
+
+
+ Return the underlying CTManualLayout bean.
+
+ @return the underlying CTManualLayout bean.
+
+
+ Represents DrawingML scatter chart.
+
+ @author Roman Kashitsyn
+
+
+ List of all data series.
+
+
+ Package private ScatterChartSerie implementation.
+
+
+ Returns data source used for X axis values.
+ @return data source used for X axis values
+
+
+ Returns data source used for Y axis values.
+ @return data source used for Y axis values
+
+
+ @param useCache if true, cached results will be Added on plot
+
+
+ Value axis type.
+
+ @author Roman Kashitsyn
+
+
+ Cell Settings avaiable in the Format/Alignment tab
+
+
+ Creates a Cell Alignment from the supplied XML defInition
+
+ @param cellAlignment
+
+
+ Get the type of vertical alignment for the cell
+
+ @return the type of aligment
+ @see VerticalAlignment
+
+
+ Get the type of horizontal alignment for the cell
+
+ @return the type of aligment
+ @see HorizontalAlignment
+
+
+ Get the number of spaces to indent the text in the cell
+
+ @return indent - number of spaces
+
+
+
+ Whether the text should be wrapped
+
+ @return a bool value indicating if the text in a cell should be line-wrapped within the cell.
+
+
+ Access to low-level data
+
+
+ The enumeration value indicating the side being used for a cell border.
+
+
+ This element Contains border formatting information, specifying border defInition formats (left, right, top, bottom, diagonal)
+ for cells in the workbook.
+ Color is optional.
+
+
+ Creates a Cell Border from the supplied XML defInition
+
+
+ Creates a Cell Border from the supplied XML defInition
+
+
+ Creates a new, empty Cell Border.
+ You need to attach this to the Styles Table
+
+
+ Records the Themes Table that is associated with
+ the current font, used when looking up theme
+ based colours and properties.
+
+
+ Returns the underlying XML bean.
+
+ @return CT_Border
+
+
+ Get the type of border to use for the selected border
+
+ @param side - - where to apply the color defInition
+ @return borderstyle - the type of border to use. default value is NONE if border style is not Set.
+ @see BorderStyle
+
+
+ Set the type of border to use for the selected border
+
+ @param side - - where to apply the color defInition
+ @param style - border style
+ @see BorderStyle
+
+
+ Get the color to use for the selected border
+
+ @param side - where to apply the color defInition
+ @return color - color to use as XSSFColor. null if color is not set
+
+
+ Set the color to use for the selected border
+
+ @param side - where to apply the color defInition
+ @param color - the color to use
+
+
+ This element specifies fill formatting.
+ A cell fill consists of a background color, foreground color, and pattern to be applied across the cell.
+
+
+ Creates a CellFill from the supplied parts
+
+ @param fill - fill
+
+
+ Creates an empty CellFill
+
+
+ Get the background fill color.
+
+ @return fill color, null if color is not set
+
+
+ Set the background fill color represented as a indexed color value.
+
+ @param index
+
+
+ Set the background fill color represented as a {@link XSSFColor} value.
+
+ @param color
+
+
+ Get the foreground fill color.
+
+ @return XSSFColor - foreground color. null if color is not set
+
+
+ Set the foreground fill color as a indexed color value
+
+ @param index - the color to use
+
+
+ Set the foreground fill color represented as a {@link XSSFColor} value.
+
+ @param color - the color to use
+
+
+ get the fill pattern
+
+ @return fill pattern type. null if fill pattern is not set
+
+
+ set the fill pattern
+
+ @param patternType fill pattern to use
+
+
+ Returns the underlying XML bean.
+
+ @return CT_Fill
+
+
+
+ Parent class of all XSSF headers and footers.
+
+
+
+ Create an instance of XSSFHeaderFooter from the supplied XML bean
+
+ @param headerFooter
+
+
+ Returns the underlying CTHeaderFooter xml bean
+
+ @return the underlying CTHeaderFooter xml bean
+
+
+ Are fields currently being stripped from the text that this
+ {@link XSSFHeaderFooter} returns? Default is false, but can be Changed
+
+
+ Should fields (eg macros) be stripped from the text that this class
+ returns? Default is not to strip.
+
+ @param StripFields
+
+
+ Removes any fields (eg macros, page markers etc) from the string.
+ Normally used to make some text suitable for showing to humans, and the
+ resultant text should not normally be saved back into the document!
+
+
+ get the text representing the center part of this element
+
+
+ get the text representing the left part of this element
+
+
+ get the text representing the right part of this element
+
+
+ Helper class for dealing with the Column Settings on
+ a CT_Worksheet (the data part of a sheet).
+ Note - within POI, we use 0 based column indexes, but
+ the column defInitions in the XML are 1 based!
+
+
+ Returns the Column at the given 0 based index
+
+
+ Returns the Column at the given 1 based index.
+ POI default is 0 based, but the file stores
+ as 1 based.
+
+
+ @see Sweep line algorithm
+
+
+ Does the column at the given 0 based index exist
+ in the supplied list of column defInitions?
+
+
+ Return the CT_Col at the given (0 based) column index,
+ creating it if required.
+
+
+ Split into left, center, right
+
+
+ Utility to update formulas and named ranges when a sheet name was Changed
+
+ @author Yegor Kozlov
+
+
+ Update sheet name in all formulas and named ranges.
+ Called from {@link XSSFWorkbook#setSheetName(int, String)}
+
+
+ The idea is to parse every formula and render it back to string
+ with the updated sheet name. This is done by parsing into Ptgs,
+ looking for ones with sheet references in them, and changing those
+
+
+ @param sheetIndex the 0-based index of the sheet being changed
+ @param oldName the old sheet name
+ @param newName the new sheet name
+
+
+ Parse cell formula and re-assemble it back using the specified FormulaRenderingWorkbook.
+
+ @param cell the cell to update
+ @param frwb the formula rendering workbbok that returns new sheet name
+
+
+ Parse formula in the named range and re-assemble it back using the specified FormulaRenderingWorkbook.
+
+ @param name the name to update
+ @param frwb the formula rendering workbbok that returns new sheet name
+
+
+ @author Yegor Kozlov
+
+
+ Shift merged regions
+
+ @param startRow the row to start Shifting
+ @param endRow the row to end Shifting
+ @param n the number of rows to shift
+ @return an array of affected cell regions
+
+
+ Check if the row and column are in the specified cell range
+
+ @param cr the cell range to check in
+ @param rowIx the row to check
+ @param colIx the column to check
+ @return true if the range Contains the cell [rowIx,colIx]
+
+
+ Updated named ranges
+
+
+ Update formulas.
+
+
+ Shift a formula using the supplied FormulaShifter
+
+ @param row the row of the cell this formula belongs to. Used to get a reference to the parent workbook.
+ @param formula the formula to shift
+ @param Shifter the FormulaShifter object that operates on the Parsed formula tokens
+ @return the Shifted formula if the formula was Changed,
+ null if the formula wasn't modified
+
+
+ *
+ * This class is a wrapper around the CTSingleXmlCell (Open Office XML Part 4:
+ * chapter 3.5.2.1)
+ *
+
+ *
+ * @author Roberto Manicardi
+ *
+
+
+ Gets the XSSFCell referenced by the R attribute or Creates a new one if cell doesn't exists
+ @return the referenced XSSFCell, null if the cell reference is invalid
+
+
+
+ This class is a wrapper around the CT_XmlColumnPr (Open Office XML Part 4:
+ chapter 3.5.1.7)
+
+
+ @author Roberto Manicardi
+
+
+ (see Open Office XML Part 4: chapter 3.5.1.3)
+ @return An integer representing the unique identifier of this column.
+
+
+ If the XPath is, for example, /Node1/Node2/Node3 and /Node1/Node2 is the common XPath for the table, the local XPath is /Node3
+
+ @return the local XPath
+
+
+ Specifies type of automatic numbered bullet points that should be applied to a paragraph.
+
+
+ (a), (b), (c), ...
+
+
+ (A), (B), (C), ...
+
+
+ a), b), c), ...
+
+
+ A), B), C), ...
+
+
+ a., b., c., ...
+
+
+ A., B., C., ...
+
+
+ (1), (2), (3), ...
+
+
+ 1), 2), 3), ...
+
+
+ 1., 2., 3., ...
+
+
+ 1, 2, 3, ...
+
+
+ (i), (ii), (iii), ...
+
+
+ (I), (II), (III), ...
+
+
+ i), ii), iii), ...
+
+
+ I), II), III), ...
+
+
+ i., ii., iii., ...
+
+
+ I., II., III., ...
+
+
+ Dbl-byte circle numbers
+
+
+ Wingdings black circle numbers
+
+
+ Wingdings white circle numbers
+
+
+ Specified a list of text alignment types
+
+
+ Align text to the left margin.
+
+
+ Align text in the center.
+
+
+ Align text to the right margin.
+
+
+ Align text so that it is justified across the whole line. It
+ is smart in the sense that it will not justify sentences
+ which are short
+
+
+ Specifies a list of auto-fit types.
+
+ Autofit specifies that a shape should be auto-fit to fully contain the text described within it.
+ Auto-fitting is when text within a shape is scaled in order to contain all the text inside
+
+
+
+ Specifies that text within the text body should not be auto-fit to the bounding box.
+ Auto-fitting is when text within a text box is scaled in order to remain inside
+ the text box.
+
+
+ Specifies that text within the text body should be normally auto-fit to the bounding box.
+ Autofitting is when text within a text box is scaled in order to remain inside the text box.
+
+
+ Example: Consider the situation where a user is building a diagram and needs
+ to have the text for each shape that they are using stay within the bounds of the shape.
+ An easy way this might be done is by using NORMAL autofit
+
+
+
+ Specifies that a shape should be auto-fit to fully contain the text described within it.
+ Auto-fitting is when text within a shape is scaled in order to contain all the text inside.
+
+
+ Example: Consider the situation where a user is building a diagram and needs to have
+ the text for each shape that they are using stay within the bounds of the shape.
+ An easy way this might be done is by using SHAPE autofit
+
+
+
+ Text Capitalization that is to be applied to the text Run. This is a render-only
+ modification and does not affect the actual characters stored in the text Run.
+
+
+ Vertical Text Types
+
+
+ Horizontal text. This should be default.
+
+
+ Vertical orientation.
+ (each line is 90 degrees rotated clockwise, so it goes
+ from top to bottom; each next line is to the left from
+ the previous one).
+
+
+ Vertical orientation.
+ (each line is 270 degrees rotated clockwise, so it goes
+ from bottom to top; each next line is to the right from
+ the previous one).
+
+
+ Determines if all of the text is vertical
+ ("one letter on top of another").
+
+
+ Specified a list of text font alignment types
+
+
+ Automatic alignment
+
+
+ Align text to the top.
+
+
+ Align text in the center.
+
+
+ Align text to the baseline.
+
+
+ Align text to the bottom.
+
+
+ Text Horizontal Overflow
+
+
+ When a big character does not fit into a line, allow a
+ horizontal overflow.
+
+
+ When a big character does not fit into a line, clip it at
+ the proper horizontal overflow.
+
+
+ Text Vertical Overflow
+
+
+ Overflow the text and pay no attention to top and bottom barriers.
+
+
+ Pay attention to top and bottom barriers. Use an
+ ellipsis to denote that there is text which is not visible.
+
+
+ Pay attention to top and bottom barriers. Provide no
+ indication that there is text which is not visible.
+
+
+ An anchor is what specifics the position of a shape within a client object
+ or within another containing shape.
+
+ @author Yegor Kozlov
+
+
+ Represents autofiltering for the specified worksheet.
+
+ @author Yegor Kozlov
+
+
+ @author Yegor Kozlov
+
+
+ High level representation of a cell in a row of a spreadsheet.
+
+ Cells can be numeric, formula-based or string-based (text). The cell type
+ specifies this. String cells cannot conatin numbers and numeric cells cannot
+ contain strings (at least according to our model). Client apps should do the
+ conversions themselves. Formula cells have the formula string, as well as
+ the formula result, which can be numeric or string.
+
+
+ Cells should have their number (0 based) before being Added to a row. Only
+ cells that have values should be Added.
+
+
+
+ the xml bean Containing information about the cell's location, value,
+ data type, formatting, and formula
+
+
+ the XSSFRow this cell belongs to
+
+
+ 0-based column index
+
+
+ Table of strings shared across this workbook.
+ If two cells contain the same string, then the cell value is the same index into SharedStringsTable
+
+
+ Table of cell styles shared across all cells in a workbook.
+
+
+ Construct a XSSFCell.
+
+ @param row the parent row.
+ @param cell the xml bean Containing information about the cell.
+
+
+ @return table of strings shared across this workbook
+
+
+ @return table of cell styles shared across this workbook
+
+
+ Returns the sheet this cell belongs to
+
+ @return the sheet this cell belongs to
+
+
+ Returns the row this cell belongs to
+
+ @return the row this cell belongs to
+
+
+ Get the value of the cell as a bool.
+
+ For strings, numbers, and errors, we throw an exception. For blank cells we return a false.
+
+ @return the value of the cell as a bool
+ @throws InvalidOperationException if the cell type returned by {@link #CellType}
+ is not CellType.Boolean, CellType.Blank or CellType.Formula
+
+
+ Set a bool value for the cell
+
+ @param value the bool value to Set this cell to. For formulas we'll Set the
+ precalculated value, for bools we'll Set its value. For other types we
+ will change the cell to a bool cell and Set its value.
+
+
+ Get the value of the cell as a number.
+
+ For strings we throw an exception. For blank cells we return a 0.
+ For formulas or error cells we return the precalculated value;
+
+ @return the value of the cell as a number
+ @throws InvalidOperationException if the cell type returned by {@link #CellType} is CellType.String
+ @exception NumberFormatException if the cell value isn't a parsable double.
+ @see DataFormatter for turning this number into a string similar to that which Excel would render this number as.
+
+
+ Set a numeric value for the cell
+
+ @param value the numeric value to Set this cell to. For formulas we'll Set the
+ precalculated value, for numerics we'll Set its value. For other types we
+ will change the cell to a numeric cell and Set its value.
+
+
+ Get the value of the cell as a string
+
+ For numeric cells we throw an exception. For blank cells we return an empty string.
+ For formulaCells that are not string Formulas, we throw an exception
+
+ @return the value of the cell as a string
+
+
+ Get the value of the cell as a XSSFRichTextString
+
+ For numeric cells we throw an exception. For blank cells we return an empty string.
+ For formula cells we return the pre-calculated value if a string, otherwise an exception
+
+ @return the value of the cell as a XSSFRichTextString
+
+
+ Set a string value for the cell.
+
+ @param str value to Set the cell to. For formulas we'll Set the formula
+ cached string result, for String cells we'll Set its value. For other types we will
+ change the cell to a string cell and Set its value.
+ If value is null then we will change the cell to a Blank cell.
+
+
+ Set a string value for the cell.
+
+ @param str value to Set the cell to. For formulas we'll Set the 'pre-Evaluated result string,
+ for String cells we'll Set its value. For other types we will
+ change the cell to a string cell and Set its value.
+ If value is null then we will change the cell to a Blank cell.
+
+
+
+ Return a formula for the cell, for example, SUM(C4:E4)
+
+
+
+
+ Creates a non shared formula from the shared formula counterpart
+
+ Shared Group Index
+ non shared formula created for the given shared formula and this cell
+
+
+ Sets formula for this cell.
+
+ Note, this method only Sets the formula string and does not calculate the formula value.
+ To Set the precalculated value use {@link #setCellValue(double)} or {@link #setCellValue(String)}
+
+
+ @param formula the formula to Set, e.g. "SUM(C4:E4)".
+ If the argument is null then the current formula is Removed.
+ @throws NPOI.ss.formula.FormulaParseException if the formula has incorrect syntax or is otherwise invalid
+ @throws InvalidOperationException if the operation is not allowed, for example,
+ when the cell is a part of a multi-cell array formula
+
+
+
+ Returns zero-based column index of this cell
+
+
+
+
+ Returns zero-based row index of a row in the sheet that contains this cell
+
+
+
+
+ Returns an A1 style reference to the location of this cell
+
+ A1 style reference to the location of this cell
+
+
+
+ Return the cell's style.
+
+
+
+
+ Return the cell type.
+
+
+
+
+ Only valid for formula cells
+
+
+
+
+ Detect cell type based on the "t" attribute of the CT_Cell bean
+
+
+
+
+
+
+ Get the value of the cell as a date.
+
+
+
+
+ Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as a date.
+
+ the date value to Set this cell to. For formulas we'll set the precalculated value,
+ for numerics we'll Set its value. For other types we will change the cell to a numeric cell and Set its value.
+
+
+
+ Returns the error message, such as #VALUE!
+
+
+
+
+ Get the value of the cell as an error code.
+ For strings, numbers, and bools, we throw an exception.
+ For blank cells we return a 0.
+
+
+
+
+ Set a error value for the cell
+
+ the error value to Set this cell to.
+ For formulas we'll Set the precalculated value , for errors we'll set
+ its value. For other types we will change the cell to an error cell and Set its value.
+
+
+
+
+ Sets this cell as the active cell for the worksheet.
+
+
+
+
+ Blanks this cell. Blank cells have no formula or value but may have styling.
+ This method erases all the data previously associated with this cell.
+
+
+
+
+ Sets column index of this cell
+
+
+
+
+
+ Set the cells type (numeric, formula or string)
+
+
+
+
+
+ Returns a string representation of the cell
+
+ Formula cells return the formula string, rather than the formula result.
+ Dates are displayed in dd-MMM-yyyy format
+ Errors are displayed as #ERR<errIdx>
+
+
+
+ Returns the raw, underlying ooxml value for the cell
+
+ If the cell Contains a string, then this value is an index into
+ the shared string table, pointing to the actual string value. Otherwise,
+ the value of the cell is expressed directly in this element. Cells Containing formulas express
+ the last calculated result of the formula in this element.
+
+
+ @return the raw cell value as Contained in the underlying CT_Cell bean,
+ null for blank cells.
+
+
+
+ Used to help format error messages
+
+
+
+
+
+ Used to help format error messages
+
+
+ @throws RuntimeException if the bounds are exceeded.
+
+
+
+ Returns cell comment associated with this cell
+
+
+
+
+ Removes the comment for this cell, if there is one.
+
+
+
+
+ Get or set hyperlink associated with this cell
+ If the supplied hyperlink is null on setting, the hyperlink for this cell will be removed.
+
+
+
+ Removes the hyperlink for this cell, if there is one.
+
+
+ Returns the xml bean containing information about the cell's location (reference), value,
+ data type, formatting, and formula
+
+ @return the xml bean containing information about this cell
+
+
+ Chooses a new bool value for the cell when its type is changing.
+
+ Usually the caller is calling SetCellType() with the intention of calling
+ SetCellValue(bool) straight afterwards. This method only exists to give
+ the cell a somewhat reasonable value until the SetCellValue() call (if at all).
+ TODO - perhaps a method like SetCellTypeAndValue(int, Object) should be introduced to avoid this
+
+
+ The purpose of this method is to validate the cell state prior to modification
+
+ @see #NotifyArrayFormulaChanging()
+
+
+
+ Called when this cell is modified.The purpose of this method is to validate the cell state prior to modification.
+
+ if modification is not allowed
+
+
+
+ High level representation of the the possible formatting information for the contents of the cells on a sheet in a
+ SpreadsheetML document.
+
+ @see NPOI.xssf.usermodel.XSSFWorkbook#CreateCellStyle()
+ @see NPOI.xssf.usermodel.XSSFWorkbook#getCellStyleAt(short)
+ @see NPOI.xssf.usermodel.XSSFCell#setCellStyle(NPOI.ss.usermodel.CellStyle)
+
+
+ Creates a Cell Style from the supplied parts
+ @param cellXfId The main XF for the cell. Must be a valid 0-based index into the XF table
+ @param cellStyleXfId Optional, style xf. A value of -1 means no xf.
+ @param stylesSource Styles Source to work off
+
+
+ Used so that StylesSource can figure out our location
+
+
+ Used so that StylesSource can figure out our location
+
+
+
+ Creates an empty Cell Style
+
+
+
+
+ Verifies that this style belongs to the supplied Workbook
+ Styles Source.
+ Will throw an exception if it belongs to a different one.
+ This is normally called when trying to assign a style to a
+ cell, to ensure the cell and the style are from the same
+ workbook (if they're not, it won't work)
+ @throws ArgumentException if there's a workbook mis-match
+
+
+ Clones all the style information from another
+ XSSFCellStyle, onto this one. This
+ XSSFCellStyle will then have all the same
+ properties as the source, but the two may
+ be edited independently.
+ Any stylings on this XSSFCellStyle will be lost!
+
+ The source XSSFCellStyle could be from another
+ XSSFWorkbook if you like. This allows you to
+ copy styles from one XSSFWorkbook to another.
+
+
+
+ Get the type of horizontal alignment for the cell
+
+ the type of alignment
+
+
+
+ Get the type of border to use for the right border of the cell
+
+
+
+ Get the color to use for the bottom border
+ Color is optional. When missing, IndexedColors.Automatic is implied.
+ @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#AUTOMATIC}
+ @see NPOI.ss.usermodel.IndexedColors
+
+
+ Get the color to use for the bottom border as a {@link XSSFColor}
+
+ @return the used color or null if not Set
+
+
+ Get the index of the number format (numFmt) record used by this cell format.
+
+ @return the index of the number format
+
+
+ Set the index of a data format
+
+ @param fmt the index of a data format
+
+
+ Get the contents of the format string, by looking up
+ the StylesSource
+
+ @return the number format string
+
+
+
+ Get the background fill color.
+ Note - many cells are actually filled with a foreground fill, not a background fill
+
+
+
+ Get the background fill color.
+
+ Note - many cells are actually Filled with a foreground
+ Fill, not a background fill - see {@link #getFillForegroundColor()}
+
+ @see NPOI.xssf.usermodel.XSSFColor#getRgb()
+ @return XSSFColor - fill color or null if not Set
+
+
+ Get the foreground fill color.
+
+ Many cells are Filled with this, instead of a
+ background color ({@link #getFillBackgroundColor()})
+
+ @see IndexedColors
+ @return fill color, default value is {@link NPOI.ss.usermodel.IndexedColors#AUTOMATIC}
+
+
+
+ Get the foreground fill color.
+
+
+
+
+ Get the foreground fill color.
+
+
+
+ Gets the font for this style
+ @return Font - font
+
+
+ Gets the index of the font for this style
+
+ @return short - font index
+ @see NPOI.xssf.usermodel.XSSFWorkbook#getFontAt(short)
+
+
+ Get whether the cell's using this style are to be hidden
+
+ @return bool - whether the cell using this style is hidden
+
+
+ Get the number of spaces to indent the text in the cell
+
+ @return indent - number of spaces
+
+
+ Get the index within the StylesTable (sequence within the collection of CT_Xf elements)
+
+ @return unique index number of the underlying record this style represents
+
+
+ Get the color to use for the left border
+
+ @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#BLACK}
+ @see NPOI.ss.usermodel.IndexedColors
+
+
+ Get the color to use for the left border
+
+ @return the index of the color defInition or null if not Set
+ @see NPOI.ss.usermodel.IndexedColors
+
+
+
+ Get whether the cell's using this style are locked
+
+
+
+
+ Get the color to use for the right border
+
+
+
+
+ Get the color to use for the right border
+
+
+
+
+
+ Get the degree of rotation (between 0 and 180 degrees) for the text in the cell
+
+
+ Expressed in degrees. Values range from 0 to 180. The first letter of
+ the text is considered the center-point of the arc.
+ For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the horizon is calculated as:
+ [degrees below horizon] = 90 - textRotation.
+
+
+
+ Get the color to use for the top border
+
+ @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#BLACK}
+ @see NPOI.ss.usermodel.IndexedColors
+
+
+
+ Get the color to use for the top border
+
+
+
+
+
+ Get the type of vertical alignment for the cell
+
+
+
+
+ Get the type of vertical alignment for the cell
+
+
+
+
+
+ Whether the text in a cell should be line-wrapped within the cell.
+
+
+
+ Set the color to use for the bottom border
+
+ @param color the color to use, null means no color
+
+
+
+ * Set the foreground fill color represented as a {@link XSSFColor} value.
+ *
+ * Note: Ensure Foreground color is Set prior to background color.
+ * @param color the color to use
+ * @see #setFillBackgroundColor(NPOI.xssf.usermodel.XSSFColor) )
+
+
+ Get a copy of the currently used CT_Fill, if none is used, return a new instance.
+
+
+ Get a copy of the currently used CT_Border, if none is used, return a new instance.
+
+
+ Set the font for this style
+
+ @param font a font object Created or retrieved from the XSSFWorkbook object
+ @see NPOI.xssf.usermodel.XSSFWorkbook#CreateFont()
+ @see NPOI.xssf.usermodel.XSSFWorkbook#getFontAt(short)
+
+
+ Set the color to use for the left border as a {@link XSSFColor} value
+
+ @param color the color to use
+
+
+ Set the color to use for the right border as a {@link XSSFColor} value
+
+ @param color the color to use
+
+
+ Set the color to use for the top border as a {@link XSSFColor} value
+
+ @param color the color to use
+
+
+ Set the type of vertical alignment for the cell
+
+ @param align - align the type of alignment
+ @see NPOI.ss.usermodel.CellStyle#VERTICAL_TOP
+ @see NPOI.ss.usermodel.CellStyle#VERTICAL_CENTER
+ @see NPOI.ss.usermodel.CellStyle#VERTICAL_BOTTOM
+ @see NPOI.ss.usermodel.CellStyle#VERTICAL_JUSTIFY
+ @see NPOI.ss.usermodel.VerticalAlignment
+
+
+ Gets border color
+
+ @param side the border side
+ @return the used color
+
+
+ Set the color to use for the selected border
+
+ @param side - where to apply the color defInition
+ @param color - the color to use
+
+
+ Get the cellAlignment object to use for manage alignment
+ @return XSSFCellAlignment - cell alignment
+
+
+ Return the CT_CellAlignment instance for alignment
+
+ @return CT_CellAlignment
+
+
+ Returns a hash code value for the object. The hash is derived from the underlying CT_Xf bean.
+
+ @return the hash code value for this style
+
+
+ Checks is the supplied style is equal to this style
+
+ @param o the style to check
+ @return true if the supplied style is equal to this style
+
+
+ Make a copy of this style. The underlying CT_Xf bean is Cloned,
+ the references to Fills and borders remain.
+
+ @return a copy of this style
+
+
+ Represents a SpreadsheetML Chart
+ @author Nick Burch
+ @author Roman Kashitsyn
+
+
+ Parent graphic frame.
+
+
+ Root element of the SpreadsheetML Chart part
+
+
+ The Chart within that
+
+
+ Create a new SpreadsheetML chart
+
+
+ Construct a SpreadsheetML chart from a namespace part.
+
+ @param part the namespace part holding the chart data,
+ the content type must be application/vnd.Openxmlformats-officedocument.Drawingml.chart+xml
+ @param rel the namespace relationship holding this chart,
+ the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/chart
+
+
+ Construct a new CTChartSpace bean.
+ By default, it's just an empty placeholder for chart objects.
+
+ @return a new CTChartSpace bean
+
+
+ Return the underlying CTChartSpace bean, the root element of the SpreadsheetML Chart part.
+
+ @return the underlying CTChartSpace bean
+
+
+ Return the underlying CTChart bean, within the Chart Space
+
+ @return the underlying CTChart bean
+
+
+ Returns the parent graphic frame.
+ @return the graphic frame this chart belongs to
+
+
+ Sets the parent graphic frame.
+
+
+ @return true if only visible cells will be present on the chart,
+ false otherwise
+
+
+ @param plotVisOnly a flag specifying if only visible cells should be
+ present on the chart
+
+
+ Returns the title, or null if none is Set
+
+
+ High level representation of Sheet Parts that are of type 'chartsheet'.
+
+ Chart sheet is a special kind of Sheet that Contains only chart and no data.
+
+
+ @author Yegor Kozlov
+
+
+ Provide access to the CTChartsheet bean holding this sheet's data
+
+ @return the CTChartsheet bean holding this sheet's data
+
+
+ A client anchor is attached to an excel worksheet. It anchors against
+ top-left and bottom-right cells.
+
+ @author Yegor Kozlov
+
+
+ Starting anchor point
+
+
+ Ending anchor point
+
+
+ Creates a new client anchor and defaults all the anchor positions to 0.
+
+
+ Creates a new client anchor and Sets the top-left and bottom-right
+ coordinates of the anchor.
+
+ @param dx1 the x coordinate within the first cell.
+ @param dy1 the y coordinate within the first cell.
+ @param dx2 the x coordinate within the second cell.
+ @param dy2 the y coordinate within the second cell.
+ @param col1 the column (0 based) of the first cell.
+ @param row1 the row (0 based) of the first cell.
+ @param col2 the column (0 based) of the second cell.
+ @param row2 the row (0 based) of the second cell.
+
+
+ Create XSSFClientAnchor from existing xml beans
+
+ @param cell1 starting anchor point
+ @param cell2 ending anchor point
+
+
+ Return starting anchor point
+
+ @return starting anchor point
+
+
+ Return ending anchor point
+
+ @return ending anchor point
+
+
+ Represents a color in SpreadsheetML
+
+
+ Create an instance of XSSFColor from the supplied XML bean
+
+
+ Create an new instance of XSSFColor
+
+
+
+ A bool value indicating the ctColor is automatic and system ctColor dependent.
+
+
+
+ Indexed ctColor value. Only used for backwards compatibility. References a ctColor in indexedColors.
+
+
+ Standard Red Green Blue ctColor value (RGB).
+ If there was an A (Alpha) value, it will be stripped.
+
+
+ Standard Alpha Red Green Blue ctColor value (ARGB).
+
+
+ Standard Red Green Blue ctColor value (RGB) with applied tint.
+ Alpha values are ignored.
+
+
+ Return the ARGB value in hex format, eg FF00FF00.
+ Works for both regular and indexed colours.
+
+
+ Standard Alpha Red Green Blue ctColor value (ARGB).
+
+
+
+ Specifies the tint value applied to the ctColor.
+
+
+ If tint is supplied, then it is applied to the RGB value of the ctColor to determine the final
+ ctColor applied.
+
+
+ The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and
+ 1.0 means 100% lighten. Also, 0.0 means no Change.
+
+
+ In loading the RGB value, it is Converted to HLS where HLS values are (0..HLSMAX), where
+ HLSMAX is currently 255.
+
+ Here are some examples of how to apply tint to ctColor:
+
+
+ @param tint the tint value
+ Returns the underlying XML bean
+
+ @return the underlying XML bean
+
+
+ cached reference to the string with the comment text
+
+
+ Creates a new XSSFComment, associated with a given
+ low level comment object.
+
+
+
+ @return Name of the original comment author. Default value is blank.
+
+
+ @return the 0-based column of the cell that the comment is associated with.
+
+
+ @return the 0-based row index of the cell that the comment is associated with.
+
+
+ @return whether the comment is visible
+
+
+ @return the rich text string of the comment
+
+
+ Sets the rich text string used by this comment.
+
+ @param string the XSSFRichTextString used by this object.
+
+
+ @return the xml bean holding this comment's properties
+
+
+ @author Yegor Kozlov
+
+
+ @return array of CellRangeAddresss. Never null
+
+
+ Replaces an existing Conditional Formatting rule at position idx.
+ Excel allows to create up to 3 Conditional Formatting rules.
+ This method can be useful to modify existing Conditional Formatting rules.
+
+ @param idx position of the rule. Should be between 0 and 2.
+ @param cfRule - Conditional Formatting rule
+
+
+ Add a Conditional Formatting rule.
+ Excel allows to create up to 3 Conditional Formatting rules.
+
+ @param cfRule - Conditional Formatting rule
+
+
+ @return the Conditional Formatting rule at position idx.
+
+
+ @return number of Conditional Formatting rules.
+
+
+ @author Yegor Kozlov
+
+
+ Create a new border formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - border formatting object, never returns null.
+
+
+ @return - border formatting object if defined, null otherwise
+
+
+ Create a new font formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - font formatting object, never returns null.
+
+
+ @return - font formatting object if defined, null otherwise
+
+
+ Create a new pattern formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - pattern formatting object, never returns null.
+
+
+ @return - pattern formatting object if defined, null otherwise
+
+
+ Type of conditional formatting rule.
+
+ MUST be either {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS}
+ or {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA}
+
+
+ @return the type of condition
+
+
+ The comparison function used when the type of conditional formatting is Set to
+ {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS}
+
+ MUST be a constant from {@link NPOI.ss.usermodel.ComparisonOperator}
+
+
+ @return the conditional format operator
+
+
+ The formula used to Evaluate the first operand for the conditional formatting rule.
+
+ If the condition type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS},
+ this field is the first operand of the comparison.
+ If type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA}, this formula is used
+ to determine if the conditional formatting is applied.
+
+
+ If comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function
+
+
+ @return the first formula
+
+
+ The formula used to Evaluate the second operand of the comparison when
+ comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} and operator
+ is either {@link NPOI.ss.usermodel.ComparisonOperator#BETWEEN} or {@link NPOI.ss.usermodel.ComparisonOperator#NOT_BETWEEN}
+
+ @return the second formula
+
+
+ A connection shape Drawing element. A connection shape is a line, etc.
+ that connects two other shapes in this Drawing.
+
+ @author Yegor Kozlov
+
+
+ Construct a new XSSFConnector object.
+
+ @param Drawing the XSSFDrawing that owns this shape
+ @param ctShape the shape bean that holds all the shape properties
+
+
+ Initialize default structure of a new auto-shape
+
+
+
+ Gets the shape type, one of the constants defined in {@link NPOI.ss.usermodel.ShapeTypes}.
+
+ @return the shape type
+ @see NPOI.ss.usermodel.ShapeTypes
+
+
+ Creates a new XSSFRichTextString for you.
+
+
+ Creates a XSSFFormulaEvaluator, the object that Evaluates formula cells.
+
+ @return a XSSFFormulaEvaluator instance
+
+
+ Creates a XSSFClientAnchor. Use this object to position Drawing object in
+ a sheet
+
+ @return a XSSFClientAnchor instance
+ @see NPOI.ss.usermodel.Drawing
+
+
+ Handles data formats for XSSF.
+
+
+
+ Get the format index that matches the given format
+ string, creating a new format entry if required.
+ Aliases text to the proper format as required.
+
+ @param format string matching a built in format
+ @return index of format.
+
+
+ Get the format string that matches the given format index
+ @param index of a format
+ @return string represented at index of format or null if there is not a format at that index
+
+
+ get the format string that matches the given format index
+ @param index of a format
+ @return string represented at index of format or null if there is not a format at that index
+
+
+ @author Radhakrishnan J
+
+
+
+ @author Radhakrishnan J
+
+
+
+ @author Radhakrishnan J
+
+
+
+ Represents a SpreadsheetML Drawing
+
+ @author Yegor Kozlov
+
+
+ Root element of the SpreadsheetML Drawing part
+
+
+ Create a new SpreadsheetML Drawing
+
+ @see NPOI.xssf.usermodel.XSSFSheet#CreateDrawingPatriarch()
+
+
+ Construct a SpreadsheetML Drawing from a namespace part
+
+ @param part the namespace part holding the Drawing data,
+ the content type must be application/vnd.openxmlformats-officedocument.Drawing+xml
+ @param rel the namespace relationship holding this Drawing,
+ the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing
+
+
+ Construct a new CT_Drawing bean. By default, it's just an empty placeholder for Drawing objects
+
+ @return a new CT_Drawing bean
+
+
+ Return the underlying CT_Drawing bean, the root element of the SpreadsheetML Drawing part.
+
+ @return the underlying CT_Drawing bean
+
+
+ Constructs a textbox under the Drawing.
+
+ @param anchor the client anchor describes how this group is attached
+ to the sheet.
+ @return the newly Created textbox.
+
+
+ Creates a picture.
+
+ @param anchor the client anchor describes how this picture is attached to the sheet.
+ @param pictureIndex the index of the picture in the workbook collection of pictures,
+ {@link NPOI.xssf.usermodel.XSSFWorkbook#getAllPictures()} .
+
+ @return the newly Created picture shape.
+
+
+
+ Creates a chart.
+
+ the client anchor describes how this chart is attached to
+ the newly created chart
+
+
+ Add the indexed picture to this Drawing relations
+
+ @param pictureIndex the index of the picture in the workbook collection of pictures,
+ {@link NPOI.xssf.usermodel.XSSFWorkbook#getAllPictures()} .
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+
+ @param anchor the client anchor describes how this group is attached
+ to the sheet.
+ @return the newly Created shape.
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+
+ @param anchor the client anchor describes how this group is attached
+ to the sheet.
+ @return the newly Created shape.
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+
+ @param anchor the client anchor describes how this group is attached
+ to the sheet.
+ @return the newly Created shape.
+
+
+ Creates a comment.
+ @param anchor the client anchor describes how this comment is attached
+ to the sheet.
+ @return the newly Created comment.
+
+
+ Creates a new graphic frame.
+
+ @param anchor the client anchor describes how this frame is attached
+ to the sheet
+ @return the newly Created graphic frame
+
+
+ Returns all charts in this Drawing.
+
+
+ Create and Initialize a CT_TwoCellAnchor that anchors a shape against top-left and bottom-right cells.
+
+ @return a new CT_TwoCellAnchor
+
+
+
+ @return list of shapes in this drawing
+
+
+ XSSF wrapper for a cell under Evaluation
+
+ @author Josh Micich
+
+
+ XSSF wrapper for a sheet under Evaluation
+
+ @author Josh Micich
+
+
+ Internal POI use only
+
+ @author Josh Micich
+
+
+ @return the sheet index of the sheet with the given external index.
+
+
+ @return the external sheet index of the sheet with the given internal
+ index. Used by some of the more obscure formula and named range things.
+ Fairly easy on XSSF (we think...) since the internal and external
+ indicies are the same
+
+
+ XSSF allows certain extra textual characters in the formula that
+ HSSF does not. As these can't be composed down to HSSF-compatible
+ Ptgs, this method strips them out for us.
+
+
+
+ Even page footer value. Corresponds to even printed pages.
+ Even page(s) in the sheet may not be printed, for example, if the print area is specified to be
+ a range such that it falls outside an even page's scope.
+ If no even footer is specified, then the odd footer's value is assumed for even page footers.
+
+
+
+ Create an instance of XSSFEvenFooter from the supplied XML bean
+ @see XSSFSheet#GetEvenFooter()
+ @param headerFooter
+
+
+ Get the content text representing the footer
+ @return text
+
+
+
+ Even page header value. Corresponds to even printed pages.
+ Even page(s) in the sheet may not be printed, for example, if the print area is specified to be
+ a range such that it falls outside an even page's scope.
+ If no even header is specified, then odd header value is assumed for even page headers.
+
+
+
+
+ Create an instance of XSSFEvenHeader from the supplied XML bean
+ @see XSSFSheet#GetEvenHeader()
+ @param headerFooter
+
+
+ Get the content text representing this header
+ @return text
+
+
+ Instantiates sub-classes of POIXMLDocumentPart depending on their relationship type
+
+ @author Yegor Kozlov
+
+
+
+ First page footer content. Corresponds to first printed page.
+ The first logical page in the sheet may not be printed, for example, if the print area is specified to
+ be a range such that it falls outside the first page's scope.
+
+
+
+ Create an instance of XSSFFirstFooter from the supplied XML bean
+ @see XSSFSheet#getFirstFooter()
+ @param headerFooter
+
+
+ Get the content text representing the footer
+ @return text
+
+
+
+ First page header content. Corresponds to first printed page.
+ The first logical page in the sheet may not be printed, for example, if the print area is specified to
+ be a range such that it falls outside the first page's scope.
+
+
+
+ Create an instance of XSSFFirstHeader from the supplied XML bean
+ @see XSSFSheet#getFirstHeader()
+ @param headerFooter
+
+
+ Get the content text representing this header
+ @return text
+
+
+ Represents a font used in a workbook.
+
+ @author Gisella Bronzetti
+
+
+ By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11
+
+
+ By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11
+
+
+ Default font color is black
+ @see NPOI.SS.usermodel.IndexedColors#BLACK
+
+
+ Create a new XSSFFont
+
+ @param font the underlying CT_Font bean
+
+
+ Create a new XSSFont. This method is protected to be used only by XSSFWorkbook
+
+
+ get the underlying CT_Font font
+
+
+ get a bool value for the boldness to use.
+
+ @return bool - bold
+
+
+ get character-set to use.
+
+ @return int - character-set (0-255)
+ @see NPOI.SS.usermodel.FontCharset
+
+
+ get the indexed color value for the font
+ References a color defined in IndexedColors.
+
+ @return short - indexed color to use
+ @see IndexedColors
+
+
+ get the color value for the font
+ References a color defined as Standard Alpha Red Green Blue color value (ARGB).
+
+ @return XSSFColor - rgb color to use
+
+
+ get the color value for the font
+ References a color defined in theme.
+
+ @return short - theme defined to use
+
+
+
+ Get the font height in unit's of 1/20th of a point.
+
+
+
+
+ Get the font height in points.
+
+
+
+ get the name of the font (i.e. Arial)
+
+ @return String - a string representing the name of the font to use
+
+
+ get a bool value that specify whether to use italics or not
+
+ @return bool - value for italic
+
+
+ get a bool value that specify whether to use a strikeout horizontal line through the text or not
+
+ @return bool - value for strikeout
+
+
+ get normal,super or subscript.
+
+ @return short - offset type to use (none,super,sub)
+ @see Font#SS_NONE
+ @see Font#SS_SUPER
+ @see Font#SS_SUB
+
+
+ get type of text underlining to use
+
+ @return byte - underlining type
+ @see NPOI.SS.usermodel.FontUnderline
+
+
+ get the boldness to use
+ @return boldweight
+ @see #BOLDWEIGHT_NORMAL
+ @see #BOLDWEIGHT_BOLD
+
+
+ set character-set to use.
+
+ @param charset - charset
+ @see FontCharset
+
+
+ set character-set to use.
+
+ @param charset - charset
+ @see FontCharset
+
+
+ set character-set to use.
+
+ @param charSet
+
+
+ set the color for the font in Standard Alpha Red Green Blue color value
+
+ @param color - color to use
+
+
+ set the theme color for the font to use
+
+ @param theme - theme color to use
+
+
+ set an enumeration representing the style of underlining that is used.
+ The none style is equivalent to not using underlining at all.
+ The possible values for this attribute are defined by the FontUnderline
+
+ @param underline - FontUnderline enum value
+
+
+ **
+
+
+ Records the Themes Table that is associated with
+ the current font, used when looking up theme
+ based colours and properties.
+
+
+ get the font scheme property.
+ is used only in StylesTable to create the default instance of font
+
+ @return FontScheme
+ @see NPOI.XSSF.model.StylesTable#CreateDefaultFont()
+
+
+ set font scheme property
+
+ @param scheme - FontScheme enum value
+ @see FontScheme
+
+
+ get the font family to use.
+
+ @return the font family to use
+ @see NPOI.SS.usermodel.FontFamily
+
+
+ set an enumeration representing the font family this font belongs to.
+ A font family is a set of fonts having common stroke width and serif characteristics.
+
+ @param family font family
+ @link #SetFamily(int value)
+
+
+ get the index within the XSSFWorkbook (sequence within the collection of Font objects)
+ @return unique index number of the underlying record this Font represents (probably you don't care
+ unless you're comparing which one is which)
+
+
+ @author Yegor Kozlov
+
+
+ Get the type of super or subscript for the font
+
+ @return super or subscript option
+ @see #SS_NONE
+ @see #SS_SUPER
+ @see #SS_SUB
+
+
+ @return font color index
+
+
+
+ @return xssf color wrapper or null if color info is missing
+
+
+ Gets the height of the font in 1/20th point units
+
+ @return fontheight (in points/20); or -1 if not modified
+
+
+ Get the type of underlining for the font
+
+ @return font underlining type
+
+ @see #U_NONE
+ @see #U_SINGLE
+ @see #U_DOUBLE
+ @see #U_SINGLE_ACCOUNTING
+ @see #U_DOUBLE_ACCOUNTING
+
+
+ Get whether the font weight is Set to bold or not
+
+ @return bold - whether the font is bold or not
+
+
+ @return true if font style was Set to italic
+
+
+ Set font style options.
+
+ @param italic - if true, Set posture style to italic, otherwise to normal
+ @param bold if true, Set font weight to bold, otherwise to normal
+
+
+ Set font style options to default values (non-italic, non-bold)
+
+
+ Evaluates formula cells.
+
+ For performance reasons, this class keeps a cache of all previously calculated intermediate
+ cell values. Be sure to call {@link #ClearAllCachedResultValues()} if any workbook cells are Changed between
+ calls to Evaluate~ methods on this class.
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ @author Josh Micich
+
+
+ @param stabilityClassifier used to optimise caching performance. Pass null
+ for the (conservative) assumption that any cell may have its defInition Changed After
+ Evaluation begins.
+ @deprecated (Sep 2009) (reduce overloading) use {@link #Create(XSSFWorkbook, NPOI.ss.formula.IStabilityClassifier, NPOI.ss.formula.udf.UDFFinder)}
+
+
+ @param stabilityClassifier used to optimise caching performance. Pass null
+ for the (conservative) assumption that any cell may have its defInition Changed After
+ Evaluation begins.
+ @param udfFinder pass null for default (AnalysisToolPak only)
+
+
+ Should be called whenever there are major Changes (e.g. moving sheets) to input cells
+ in the Evaluated workbook.
+ Failure to call this method After changing cell values will cause incorrect behaviour
+ of the Evaluate~ methods of this class
+
+
+ If cell Contains a formula, the formula is Evaluated and returned,
+ else the CellValue simply copies the appropriate cell value from
+ the cell and also its cell type. This method should be preferred over
+ EvaluateInCell() when the call should not modify the contents of the
+ original cell.
+ @param cell
+
+
+ If cell Contains formula, it Evaluates the formula,
+ and saves the result of the formula. The cell
+ remains as a formula cell.
+ Else if cell does not contain formula, this method leaves
+ the cell unChanged.
+ Note that the type of the formula result is returned,
+ so you know what kind of value is also stored with
+ the formula.
+
+ int EvaluatedCellType = Evaluator.EvaluateFormulaCell(cell);
+
+ Be aware that your cell will hold both the formula,
+ and the result. If you want the cell Replaced with
+ the result of the formula, use {@link #Evaluate(NPOI.ss.usermodel.Cell)} }
+ @param cell The cell to Evaluate
+ @return The type of the formula result (the cell's type remains as HSSFCell.CELL_TYPE_FORMULA however)
+
+
+ If cell Contains formula, it Evaluates the formula, and
+ Puts the formula result back into the cell, in place
+ of the old formula.
+ Else if cell does not contain formula, this method leaves
+ the cell unChanged.
+ Note that the same instance of HSSFCell is returned to
+ allow chained calls like:
+
+ int EvaluatedCellType = Evaluator.EvaluateInCell(cell).CellType;
+
+ Be aware that your cell value will be Changed to hold the
+ result of the formula. If you simply want the formula
+ value computed for you, use {@link #EvaluateFormulaCell(NPOI.ss.usermodel.Cell)} }
+ @param cell
+
+
+ Loops over all cells in all sheets of the supplied
+ workbook.
+ For cells that contain formulas, their formulas are
+ Evaluated, and the results are saved. These cells
+ remain as formula cells.
+ For cells that do not contain formulas, no Changes
+ are made.
+ This is a helpful wrapper around looping over all
+ cells, and calling EvaluateFormulaCell on each one.
+
+
+ Loops over all cells in all sheets of the supplied
+ workbook.
+ For cells that contain formulas, their formulas are
+ Evaluated, and the results are saved. These cells
+ remain as formula cells.
+ For cells that do not contain formulas, no Changes
+ are made.
+ This is a helpful wrapper around looping over all
+ cells, and calling EvaluateFormulaCell on each one.
+
+
+ Returns a CellValue wrapper around the supplied ValueEval instance.
+
+
+ Represents DrawingML GraphicalObjectFrame.
+
+ @author Roman Kashitsyn
+
+
+ Construct a new XSSFGraphicFrame object.
+
+ @param Drawing the XSSFDrawing that owns this frame
+ @param ctGraphicFrame the XML bean that stores this frame content
+
+
+ Initialize default structure of a new graphic frame
+
+
+ Sets the frame macro.
+
+
+ Returns the frame name.
+ @return name of the frame
+
+
+ Returns the frame anchor.
+ @return the anchor this frame is attached to
+
+
+ Assign a DrawingML chart to the graphic frame.
+
+
+ Gets the frame id.
+
+
+
+ Always . You cannot change text of a line break.
+
+
+ This class : the Map element (Open Office XML Part 4:
+ chapter 3.16.2)
+
+ This element Contains all of the properties related to the XML map,
+ and the behaviors expected during data refresh operations.
+
+ @author Roberto Manicardi
+
+
+ @return the list of Single Xml Cells that provide a map rule to this mapping.
+
+
+ @return the list of all Tables that provide a map rule to this mapping
+
+
+ Represents a defined named range in a SpreadsheetML workbook.
+
+ Defined names are descriptive text that is used to represents a cell, range of cells, formula, or constant value.
+ Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30.
+
+ Example:
+
+ XSSFWorkbook wb = new XSSFWorkbook();
+ XSSFSheet sh = wb.CreateSheet("Sheet1");
+
+ //applies to the entire workbook
+ XSSFName name1 = wb.CreateName();
+ name1.SetNameName("FMLA");
+ name1.SetRefersToFormula("Sheet1!$B$3");
+
+ //applies to Sheet1
+ XSSFName name2 = wb.CreateName();
+ name2.SetNameName("SheetLevelName");
+ name2.SetComment("This name is scoped to Sheet1");
+ name2.SetLocalSheetId(0);
+ name2.SetRefersToFormula("Sheet1!$B$3");
+
+
+
+ @author Nick Burch
+ @author Yegor Kozlov
+
+
+ A built-in defined name that specifies the workbook's print area
+
+
+ A built-in defined name that specifies the row(s) or column(s) to repeat
+ at the top of each printed page.
+
+
+ A built-in defined name that refers to a range Containing the criteria values
+ to be used in Applying an advanced filter to a range of data
+
+
+ this defined name refers to the range Containing the filtered
+ output values resulting from Applying an advanced filter criteria to a source
+ range
+
+
+
+ A built-in defined name that refers to a consolidation area
+
+
+ A built-in defined name that specified that the range specified is from a database data source
+
+
+ A built-in defined name that refers to a sheet title.
+
+
+ Creates an XSSFName object - called internally by XSSFWorkbook.
+
+ @param name - the xml bean that holds data represenring this defined name.
+ @param workbook - the workbook object associated with the name
+ @see NPOI.XSSF.usermodel.XSSFWorkbook#CreateName()
+
+
+ Returns the underlying named range object
+
+
+ Returns the name that will appear in the user interface for the defined name.
+
+ @return text name of this defined name
+
+
+ Returns the sheet index this name applies to.
+
+ @return the sheet index this name applies to, -1 if this name applies to the entire workbook
+
+
+ Indicates that the defined name refers to a user-defined function.
+ This attribute is used when there is an Add-in or other code project associated with the file.
+
+ @return true indicates the name refers to a function.
+
+
+ Returns the function group index if the defined name refers to a function. The function
+ group defines the general category for the function. This attribute is used when there is
+ an Add-in or other code project associated with the file.
+
+ @return the function group index that defines the general category for the function
+
+
+ Get the sheets name which this named range is referenced to
+
+ @return sheet name, which this named range referred to.
+ Empty string if the referenced sheet name weas not found.
+
+
+ Is the name refers to a user-defined function ?
+
+ @return true if this name refers to a user-defined function
+
+
+ Returns the comment the user provided when the name was Created.
+
+ @return the user comment for this named range
+
+
+ Compares this name to the specified object.
+ The result is true if the argument is XSSFName and the
+ underlying CTDefinedName bean Equals to the CTDefinedName representing this name
+
+ @param o the object to compare this XSSFName against.
+ @return true if the XSSFName are Equal;
+ false otherwise.
+
+
+ XSSF Implementation of a Hyperlink.
+ Note - unlike with HSSF, many kinds of hyperlink
+ are largely stored as relations of the sheet
+
+
+ Create a new XSSFHyperlink. This method is protected to be used only by XSSFCreationHelper
+
+ @param type - the type of hyperlink to create
+
+
+ Create a XSSFHyperlink amd Initialize it from the supplied CTHyperlink bean and namespace relationship
+
+ @param ctHyperlink the xml bean Containing xml properties
+ @param hyperlinkRel the relationship in the underlying OPC namespace which stores the actual link's Address
+
+
+ @return the underlying CTHyperlink object
+
+
+ Do we need to a relation too, to represent
+ this hyperlink?
+
+
+ Generates the relation if required
+
+
+ Return the type of this hyperlink
+
+ @return the type of this hyperlink
+
+
+ Get the reference of the cell this applies to,
+ es A55
+
+
+ Hyperlink Address. Depending on the hyperlink type it can be URL, e-mail, path to a file
+
+ @return the Address of this hyperlink
+
+
+ Return text label for this hyperlink
+
+ @return text to display
+
+
+ Location within target. If target is a workbook (or this workbook) this shall refer to a
+ sheet and cell or a defined name. Can also be an HTML anchor if target is HTML file.
+
+ @return location
+
+
+ Assigns this hyperlink to the given cell reference
+
+
+ Return the column of the first cell that Contains the hyperlink
+
+ @return the 0-based column of the first cell that Contains the hyperlink
+
+
+ Return the column of the last cell that Contains the hyperlink
+ For XSSF, a Hyperlink may only reference one cell
+
+ @return the 0-based column of the last cell that Contains the hyperlink
+
+
+ Return the row of the first cell that Contains the hyperlink
+
+ @return the 0-based row of the cell that Contains the hyperlink
+
+
+ Return the row of the last cell that Contains the hyperlink
+ For XSSF, a Hyperlink may only reference one cell
+
+ @return the 0-based row of the last cell that Contains the hyperlink
+
+
+
+ get or set additional text to help the user understand more about the hyperlink
+
+
+
+ Odd page footer value. Corresponds to odd printed pages.
+ Odd page(s) in the sheet may not be printed, for example, if the print area is specified to be
+ a range such that it falls outside an odd page's scope.
+
+
+
+ Create an instance of XSSFOddFooter from the supplied XML bean
+ @see XSSFSheet#GetOddFooter()
+ @param headerFooter
+
+
+ Get the content text representing the footer
+ @return text
+
+
+ Odd page header value. Corresponds to odd printed pages.
+ Odd page(s) in the sheet may not be printed, for example, if the print area is specified to be
+ a range such that it falls outside an odd page's scope.
+
+
+
+ Create an instance of XSSFOddHeader from the supplied XML bean
+ @see XSSFSheet#GetOddHeader()
+ @param headerFooter
+
+
+ Get the content text representing this header
+ @return text
+
+
+ @author Yegor Kozlov
+
+
+ Represents a picture shape in a SpreadsheetML Drawing.
+
+ @author Yegor Kozlov
+
+
+ A default instance of CTShape used for creating new shapes.
+
+
+ This object specifies a picture object and all its properties
+
+
+ Construct a new XSSFPicture object. This constructor is called from
+ {@link XSSFDrawing#CreatePicture(XSSFClientAnchor, int)}
+
+ @param Drawing the XSSFDrawing that owns this picture
+
+
+ Returns a prototype that is used to construct new shapes
+
+ @return a prototype that is used to construct new shapes
+
+
+ Link this shape with the picture data
+
+ @param rel relationship referring the picture data
+
+
+ Return the underlying CT_Picture bean that holds all properties for this picture
+
+ @return the underlying CT_Picture bean
+
+
+ Reset the image to the original size.
+
+
+ Please note, that this method works correctly only for workbooks
+ with the default font size (Calibri 11pt for .xlsx).
+ If the default font is Changed the resized image can be streched vertically or horizontally.
+
+
+
+ Resize the image proportionally.
+
+ @see #resize(double, double)
+
+
+ Resize the image relatively to its current size.
+
+ Please note, that this method works correctly only for workbooks
+ with the default font size (Calibri 11pt for .xlsx).
+ If the default font is changed the resized image can be streched vertically or horizontally.
+
+
+ resize(1.0,1.0) keeps the original size,
+ resize(0.5,0.5) resize to 50% of the original,
+ resize(2.0,2.0) resizes to 200% of the original.
+ resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image.
+
+
+ @param scaleX the amount by which the image width is multiplied relative to the original width,
+ when set to {@link java.lang.Double#MAX_VALUE} the width of the embedded image is used
+ @param scaleY the amount by which the image height is multiplied relative to the original height,
+ when set to {@link java.lang.Double#MAX_VALUE} the height of the embedded image is used
+
+
+ Calculate the preferred size for this picture.
+
+ @return XSSFClientAnchor with the preferred size for this image
+
+
+ Calculate the preferred size for this picture.
+
+ @param scale the amount by which image dimensions are multiplied relative to the original size.
+ @return XSSFClientAnchor with the preferred size for this image
+
+
+ Calculate the preferred size for this picture.
+
+ @param scaleX the amount by which image width is multiplied relative to the original width.
+ @param scaleY the amount by which image height is multiplied relative to the original height.
+ @return XSSFClientAnchor with the preferred size for this image
+
+
+ Return the dimension of this image
+
+ @param part the namespace part holding raw picture data
+ @param type type of the picture: {@link Workbook#PICTURE_TYPE_JPEG},
+ {@link Workbook#PICTURE_TYPE_PNG} or {@link Workbook#PICTURE_TYPE_DIB}
+
+ @return image dimension in pixels
+
+
+ Return the dimension of the embedded image in pixel
+
+ @return image dimension in pixels
+
+
+ @return the anchor that is used by this shape.
+
+
+ @return the sheet which contains the picture shape
+
+
+ Raw picture data, normally attached to a SpreadsheetML Drawing.
+ As a rule, pictures are stored in the /xl/media/ part of a SpreadsheetML package.
+
+
+ Relationships for each known picture type
+
+
+ Create a new XSSFPictureData node
+
+ @see NPOI.xssf.usermodel.XSSFWorkbook#AddPicture(byte[], int)
+
+
+ Construct XSSFPictureData from a namespace part
+
+ @param part the namespace part holding the Drawing data,
+ @param rel the namespace relationship holding this Drawing,
+ the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/image
+
+
+ Suggests a file extension for this image.
+
+ @return the file extension.
+
+
+ Return an integer constant that specifies type of this picture
+
+ @return an integer constant that specifies type of this picture
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_EMF
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_WMF
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_PICT
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_JPEG
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_PNG
+ @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_DIB
+
+
+
+ Gets the picture data as a byte array.
+
+
+
+ *PictureData objects store the actual content in the part directly without keeping a
+ copy like all others therefore we need to handle them differently.
+
+
+ Creates n XSSFPivotCache representing the given package part and relationship.
+ Should only be called when Reading in an existing file.
+
+ @param part - The package part that holds xml data representing this pivot cache defInition.
+ @param rel - the relationship of the given package part in the underlying OPC package
+
+
+ Creates an XSSFPivotCacheDefintion representing the given package part and relationship.
+ Should only be called when Reading in an existing file.
+
+ @param part - The package part that holds xml data representing this pivot cache defInition.
+ @param rel - the relationship of the given package part in the underlying OPC package
+
+
+ Generates a cache field for each column in the reference area for the pivot table.
+ @param sheet The sheet where the data i collected from
+
+
+ Creates an XSSFPivotCacheRecords representing the given package part and relationship.
+ Should only be called when Reading in an existing file.
+
+ @param part - The package part that holds xml data representing this pivot cache records.
+ @param rel - the relationship of the given package part in the underlying OPC package
+
+
+ Creates an XSSFPivotTable representing the given package part and relationship.
+ Should only be called when Reading in an existing file.
+
+ @param part - The package part that holds xml data representing this pivot table.
+ @param rel - the relationship of the given package part in the underlying OPC package
+
+
+ Set default values for the table defInition.
+
+
+ Add a row label using data from the given column.
+ @param columnIndex the index of the column to be used as row label.
+
+
+ Add a column label using data from the given column and specified function
+ @param columnIndex the index of the column to be used as column label.
+ @param function the function to be used on the data
+ The following functions exists:
+ Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp
+ @param valueFieldName the name of pivot table value field
+
+
+ Add a column label using data from the given column and specified function
+ @param columnIndex the index of the column to be used as column label.
+ @param function the function to be used on the data
+ The following functions exists:
+ Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp
+
+
+ Add data field with data from the given column and specified function.
+ @param function the function to be used on the data
+ @param index the index of the column to be used as column label.
+ The following functions exists:
+ Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp
+ @param valueFieldName the name of pivot table value field
+
+
+ Add column Containing data from the referenced area.
+ @param columnIndex the index of the column Containing the data
+ @param isDataField true if the data should be displayed in the pivot table.
+
+
+ Add filter for the column with the corresponding index and cell value
+ @param columnIndex index of column to filter on
+
+
+ Creates cacheSource and workSheetSource for pivot table and Sets the source reference as well assets the location of the pivot table
+ @param source Source for data for pivot table
+ @param position Position for pivot table in sheet
+ @param sourceSheet Sheet where the source will be collected from
+
+
+ Page Setup and page margins Settings for the worksheet.
+
+
+ Set the paper size as enum value.
+
+ @param size value for the paper size.
+
+
+ Orientation of the page: landscape - portrait.
+
+ @return Orientation of the page
+ @see PrintOrientation
+
+
+ Get print page order.
+
+ @return PageOrder
+
+
+ Returns the paper size.
+
+ @return short - paper size
+
+
+ Returns the paper size as enum.
+
+ @return PaperSize paper size
+ @see PaperSize
+
+
+ Returns the scale.
+
+ @return short - scale
+
+
+ Set the page numbering start.
+ Page number for first printed page. If no value is specified, then 'automatic' is assumed.
+
+ @return page number for first printed page
+
+
+ Returns the number of pages wide to fit sheet in.
+
+ @return number of pages wide to fit sheet in
+
+
+ Returns the number of pages high to fit the sheet in.
+
+ @return number of pages high to fit the sheet in
+
+
+ Returns the left to right print order.
+
+ @return left to right print order
+
+
+ Returns the landscape mode.
+
+ @return landscape mode
+
+
+ Use the printer's defaults Settings for page Setup values and don't use the default values
+ specified in the schema. For example, if dpi is not present or specified in the XML, the
+ application shall not assume 600dpi as specified in the schema as a default and instead
+ shall let the printer specify the default dpi.
+
+ @return valid Settings
+
+
+ Returns the black and white Setting.
+
+ @return black and white Setting
+
+
+ Returns the draft mode.
+
+ @return draft mode
+
+
+ Returns the print notes.
+
+ @return print notes
+
+
+ Returns the no orientation.
+
+ @return no orientation
+
+
+ Returns the use page numbers.
+
+ @return use page numbers
+
+
+ Returns the horizontal resolution.
+
+ @return horizontal resolution
+
+
+ Returns the vertical resolution.
+
+ @return vertical resolution
+
+
+ Returns the header margin.
+
+ @return header margin
+
+
+ Returns the footer margin.
+
+ @return footer margin
+
+
+ Returns the number of copies.
+
+ @return number of copies
+
+
+
+
+
+ A map to lookup POIXMLRelation by its relation type
+
+
+ JPG is an intentional duplicate of JPEG, to handle documents generated by other software. *
+
+
+ Fetches the InputStream to read the contents, based
+ of the specified core part, for which we are defined
+ as a suitable relationship
+
+
+ Get POIXMLRelation by relation type
+
+ @param rel relation type, for example,
+ http://schemas.openxmlformats.org/officeDocument/2006/relationships/image
+ @return registered POIXMLRelation or null if not found
+
+
+
+ Removes the relation from the internal table.
+ Following readings of files will ignoring the removed relation.
+
+ Relation to remove
+
+
+
+ Adds the relation to the internal table.
+ Following readings of files will process the given relation.
+
+ Relation to add
+
+
+ Rich text unicode string. These strings can have fonts applied to arbitary parts of the string.
+
+
+ Most strings in a workbook have formatting applied at the cell level, that is, the entire string in the cell has the
+ same formatting applied. In these cases, the formatting for the cell is stored in the styles part,
+ and the string for the cell can be shared across the workbook. The following code illustrates the example.
+
+ In the above example all three cells will use the same string cached on workbook level.
+
+
+ Some strings in the workbook may have formatting applied at a level that is more granular than the cell level.
+ For instance, specific characters within the string may be bolded, have coloring, italicizing, etc.
+ In these cases, the formatting is stored along with the text in the string table, and is treated as
+ a unique entry in the workbook. The following xml and code snippet illustrate this.
+
+
+
+ @author Yegor Kozlov
+
+
+ Create a rich text string
+
+
+ Create empty rich text string and Initialize it with empty string
+
+
+ Create a rich text string from the supplied XML bean
+
+
+ Applies a font to the specified characters of a string.
+
+ @param startIndex The start index to apply the font to (inclusive)
+ @param endIndex The end index to apply the font to (exclusive)
+ @param fontIndex The font to use.
+
+
+ Applies a font to the specified characters of a string.
+
+ @param startIndex The start index to apply the font to (inclusive)
+ @param endIndex The end index to apply to font to (exclusive)
+ @param font The index of the font to use.
+
+
+ Sets the font of the entire string.
+ @param font The font to use.
+
+
+ Applies the specified font to the entire string.
+
+ @param fontIndex the font to Apply.
+
+
+ Append new text to this text run and apply the specify font to it
+
+ @param text the text to append
+ @param font the font to apply to the Appended text or null if no formatting is required
+
+
+ Append new text to this text run
+
+ @param text the text to append
+
+
+ Copy font attributes from CTFont bean into CTRPrElt bean
+
+
+ Removes any formatting that may have been applied to the string.
+
+
+ The index within the string to which the specified formatting run applies.
+
+ @param index the index of the formatting run
+ @return the index within the string.
+
+
+ Returns the number of characters this format run covers.
+
+ @param index the index of the formatting run
+ @return the number of characters this format run covers
+
+
+ Returns the plain string representation.
+
+
+ Returns the number of characters in this string.
+
+
+ @return The number of formatting Runs used.
+
+
+ Gets a copy of the font used in a particular formatting Run.
+
+ @param index the index of the formatting run
+ @return A copy of the font used or null if no formatting is applied to the specified text Run.
+
+
+ Return a copy of the font in use at a particular index.
+
+ @param index The index.
+ @return A copy of the font that's currently being applied at that
+ index or null if no font is being applied or the
+ index is out of range.
+
+
+ Return the underlying xml bean
+
+
+
+ CTRPrElt --> CTFont adapter
+
+
+ **
+
+
+ For all characters which cannot be represented in XML as defined by the XML 1.0 specification,
+ the characters are escaped using the Unicode numerical character representation escape character
+ format _xHHHH_, where H represents a hexadecimal character in the character's value.
+
+ Example: The Unicode character 0D is invalid in an XML 1.0 document,
+ so it shall be escaped as _x000D_.
+
+ See section 3.18.9 in the OOXML spec.
+
+ @param value the string to decode
+ @return the decoded string
+
+
+ High level representation of a row of a spreadsheet.
+
+
+ the xml bean Containing all cell defInitions for this row
+
+
+ Cells of this row keyed by their column indexes.
+ The TreeMap ensures that the cells are ordered by columnIndex in the ascending order.
+
+
+ the parent sheet
+
+
+ Construct a XSSFRow.
+
+ @param row the xml bean Containing all cell defInitions for this row.
+ @param sheet the parent sheet.
+
+
+ Returns the XSSFSheet this row belongs to
+
+ @return the XSSFSheet that owns this row
+
+
+
+ Alias for {@link #cellIterator()} to allow foreach loops:
+
+ for(Cell cell : row){
+ ...
+ }
+
+
+ @return an iterator over cells in this row.
+
+
+ Compares two XSSFRow objects. Two rows are equal if they belong to the same worksheet and
+ their row indexes are Equal.
+
+ @param row the XSSFRow to be Compared.
+ @return the value 0 if the row number of this XSSFRow is
+ equal to the row number of the argument XSSFRow; a value less than
+ 0 if the row number of this this XSSFRow is numerically less
+ than the row number of the argument XSSFRow; and a value greater
+ than 0 if the row number of this this XSSFRow is numerically
+ greater than the row number of the argument XSSFRow.
+ @throws ArgumentException if the argument row belongs to a different worksheet
+
+
+
+
+ Returns the cell at the given (0 based) index,
+ with the {@link NPOI.SS.usermodel.Row.MissingCellPolicy} from the parent Workbook.
+
+ @return the cell at the given (0 based) index
+
+
+
+ Get the hssfcell representing a given column (logical cell)
+ 0-based. If you ask for a cell that is not defined, then
+ you Get a null.
+ This is the basic call, with no policies applied
+
+ 0 based column number
+ Cell representing that column or null if Undefined.
+
+
+
+ Get the number of the first cell Contained in this row.
+
+ @return short representing the first logical cell in the row,
+ or -1 if the row does not contain any cells.
+
+
+ Gets the index of the last cell Contained in this row PLUS ONE. The result also
+ happens to be the 1-based column number of the last cell. This value can be used as a
+ standard upper bound when iterating over cells:
+
+ short minColIx = row.GetFirstCellNum();
+ short maxColIx = row.GetLastCellNum();
+ for(short colIx=minColIx; colIx<maxColIx; colIx++) {
+ XSSFCell cell = row.GetCell(colIx);
+ if(cell == null) {
+ continue;
+ }
+ //... do something with cell
+ }
+
+
+ @return short representing the last logical cell in the row PLUS ONE,
+ or -1 if the row does not contain any cells.
+
+
+ Get the row's height measured in twips (1/20th of a point). If the height is not Set, the default worksheet value is returned,
+ See {@link NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints()}
+
+ @return row height measured in twips (1/20th of a point)
+
+
+ Returns row height measured in point size. If the height is not Set, the default worksheet value is returned,
+ See {@link NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints()}
+
+ @return row height measured in point size
+ @see NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints()
+
+
+ Gets the number of defined cells (NOT number of cells in the actual row!).
+ That is to say if only columns 0,4,5 have values then there would be 3.
+
+ @return int representing the number of defined cells in the row.
+
+
+ Get row number this row represents
+
+ @return the row number (0 based)
+
+
+ Get whether or not to display this row with 0 height
+
+ @return - height is zero or not.
+
+
+ Is this row formatted? Most aren't, but some rows
+ do have whole-row styles. For those that do, you
+ can get the formatting from {@link #GetRowStyle()}
+
+
+ Returns the whole-row cell style. Most rows won't
+ have one of these, so will return null. Call
+ {@link #isFormatted()} to check first.
+
+
+ Applies a whole-row cell styling to the row.
+ If the value is null then the style information is Removed,
+ causing the cell to used the default workbook style.
+
+
+ Remove the Cell from this row.
+
+ @param cell the cell to remove
+
+
+ Returns the underlying CT_Row xml bean Containing all cell defInitions in this row
+
+ @return the underlying CT_Row xml bean
+
+
+ Fired when the document is written to an output stream.
+
+ @see NPOI.XSSF.usermodel.XSSFSheet#Write(java.io.OutputStream) ()
+
+
+ @return formatted xml representation of this row
+
+
+ update cell references when Shifting rows
+
+ @param n the number of rows to move
+
+
+ Represents a shape in a SpreadsheetML Drawing.
+
+ @author Yegor Kozlov
+
+
+ Parent Drawing
+
+
+ The parent shape, always not-null for shapes in groups
+
+
+ anchor that is used by this shape
+
+
+ Return the Drawing that owns this shape
+
+ @return the parent Drawing that owns this shape
+
+
+ Gets the parent shape.
+
+
+ @return the anchor that is used by this shape.
+
+
+ Returns xml bean with shape properties.
+
+ @return xml bean with shape properties.
+
+
+ Whether this shape is not Filled with a color
+
+ @return true if this shape is not Filled with a color.
+
+
+ Sets the color used to fill this shape using the solid fill pattern.
+
+
+ The color applied to the lines of this shape.
+
+
+ This object specifies a group shape that represents many shapes grouped together. This shape is to be treated
+ just as if it were a regular shape but instead of being described by a single geometry it is made up of all the
+ shape geometries encompassed within it. Within a group shape each of the shapes that make up the group are
+ specified just as they normally would.
+
+ @author Yegor Kozlov
+
+
+ Construct a new XSSFSimpleShape object.
+
+ @param Drawing the XSSFDrawing that owns this shape
+ @param ctGroup the XML bean that stores this group content
+
+
+ Initialize default structure of a new shape group
+
+
+ Constructs a textbox.
+
+ @param anchor the child anchor describes how this shape is attached
+ to the group.
+ @return the newly Created textbox.
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+
+ @param anchor the child anchor describes how this shape is attached
+ to the group.
+ @return the newly Created shape.
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+
+ @param anchor the child anchor describes how this shape is attached
+ to the group.
+ @return the newly Created shape.
+
+
+ Creates a picture.
+
+ @param anchor the client anchor describes how this picture is attached to the sheet.
+ @param pictureIndex the index of the picture in the workbook collection of pictures,
+ {@link XSSFWorkbook#getAllPictures()} .
+ @return the newly Created picture shape.
+
+
+ Sets the coordinate space of this group. All children are constrained
+ to these coordinates.
+
+
+ High level representation of a SpreadsheetML worksheet.
+
+
+ Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work.
+ The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can
+ contain text, numbers, dates, and formulas. Cells can also be formatted.
+
+
+
+ cache of master shared formulas in this sheet.
+ Master shared formula is the first formula in a group of shared formulas is saved in the f element.
+
+
+ Creates new XSSFSheet - called by XSSFWorkbook to create a sheet from scratch.
+
+ @see NPOI.XSSF.usermodel.XSSFWorkbook#CreateSheet()
+
+
+ Creates an XSSFSheet representing the given namespace part and relationship.
+ Should only be called by XSSFWorkbook when Reading in an exisiting file.
+
+ @param part - The namespace part that holds xml data represenring this sheet.
+ @param rel - the relationship of the given namespace part in the underlying OPC namespace
+
+
+ Returns the parent XSSFWorkbook
+
+ @return the parent XSSFWorkbook
+
+
+ Initialize worksheet data when Reading in an exisiting file.
+
+
+ Initialize worksheet data when creating a new sheet.
+
+
+ Read hyperlink relations, link them with CT_Hyperlink beans in this worksheet
+ and Initialize the internal array of XSSFHyperlink objects
+
+
+ Create a new CT_Worksheet instance with all values set to defaults
+
+ @return a new instance
+
+
+ Provide access to the CT_Worksheet bean holding this sheet's data
+
+ @return the CT_Worksheet bean holding this sheet's data
+
+
+ Returns the name of this sheet
+
+ @return the name of this sheet
+
+
+ Adds a merged region of cells (hence those cells form one).
+
+ @param region (rowfrom/colfrom-rowto/colto) to merge
+ @return index of this region
+
+
+ Adjusts the column width to fit the contents.
+
+ This process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ Processing.
+
+ @param column the column index
+
+
+ Adjusts the column width to fit the contents.
+
+ This process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ Processing.
+
+ You can specify whether the content of merged cells should be considered or ignored.
+ Default is to ignore merged cells.
+
+ @param column the column index
+ @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
+
+
+ Return the sheet's existing Drawing, or null if there isn't yet one.
+
+ Use {@link #CreateDrawingPatriarch()} to Get or create
+
+ @return a SpreadsheetML Drawing
+
+
+ Create a new SpreadsheetML Drawing. If this sheet already Contains a Drawing - return that.
+
+ @return a SpreadsheetML Drawing
+
+
+ Get VML drawing for this sheet (aka 'legacy' drawig)
+
+ @param autoCreate if true, then a new VML drawing part is Created
+
+ @return the VML drawing of null if the drawing was not found and autoCreate=false
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+ @param colSplit Horizonatal position of split.
+ @param rowSplit Vertical position of split.
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+
+
+ If both colSplit and rowSplit are zero then the existing freeze pane is Removed
+
+
+ @param colSplit Horizonatal position of split.
+ @param rowSplit Vertical position of split.
+ @param leftmostColumn Left column visible in right pane.
+ @param topRow Top row visible in bottom pane
+
+
+ Creates a new comment for this sheet. You still
+ need to assign it to a cell though
+
+ @deprecated since Nov 2009 this method is not compatible with the common SS interfaces,
+ use {@link NPOI.XSSF.usermodel.XSSFDrawing#CreateCellComment
+ (NPOI.SS.usermodel.ClientAnchor)} instead
+
+
+ Create a new row within the sheet and return the high level representation
+
+ @param rownum row number
+ @return High level {@link XSSFRow} object representing a row in the sheet
+ @see #RemoveRow(NPOI.SS.usermodel.Row)
+
+
+ Creates a split pane. Any existing freezepane or split pane is overwritten.
+ @param xSplitPos Horizonatal position of split (in 1/20th of a point).
+ @param ySplitPos Vertical position of split (in 1/20th of a point).
+ @param topRow Top row visible in bottom pane
+ @param leftmostColumn Left column visible in right pane.
+ @param activePane Active pane. One of: PANE_LOWER_RIGHT,
+ PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
+ @see NPOI.SS.usermodel.Sheet#PANE_LOWER_LEFT
+ @see NPOI.SS.usermodel.Sheet#PANE_LOWER_RIGHT
+ @see NPOI.SS.usermodel.Sheet#PANE_UPPER_LEFT
+ @see NPOI.SS.usermodel.Sheet#PANE_UPPER_RIGHT
+
+
+ Vertical page break information used for print layout view, page layout view, drawing print breaks
+ in normal view, and for printing the worksheet.
+
+ @return column indexes of all the vertical page breaks, never null
+
+
+ Get the actual column width (in units of 1/256th of a character width )
+
+
+ Note, the returned value is always gerater that {@link #GetDefaultColumnWidth()} because the latter does not include margins.
+ Actual column width measured as the number of characters of the maximum digit width of the
+ numbers 0, 1, 2, ..., 9 as rendered in the normal style's font. There are 4 pixels of margin
+ pAdding (two on each side), plus 1 pixel pAdding for the gridlines.
+
+
+ @param columnIndex - the column to set (0-based)
+ @return width - the width in units of 1/256th of a character width
+
+
+ Get the actual column width in pixels
+
+
+ Please note, that this method works correctly only for workbooks
+ with the default font size (Calibri 11pt for .xlsx).
+
+
+
+ Get the default column width for the sheet (if the columns do not define their own width) in
+ characters.
+
+ Note, this value is different from {@link #GetColumnWidth(int)}. The latter is always greater and includes
+ 4 pixels of margin pAdding (two on each side), plus 1 pixel pAdding for the gridlines.
+
+ @return column width, default value is 8
+
+
+ Get the default row height for the sheet (if the rows do not define their own height) in
+ twips (1/20 of a point)
+
+ @return default row height
+
+
+ Get the default row height for the sheet measued in point size (if the rows do not define their own height).
+
+ @return default row height in points
+
+
+ Returns the CellStyle that applies to the given
+ (0 based) column, or null if no style has been
+ set for that column
+
+
+ Whether the text is displayed in right-to-left mode in the window
+
+ @return whether the text is displayed in right-to-left mode in the window
+
+
+ Get whether to display the guts or not,
+ default value is true
+
+ @return bool - guts or no guts
+
+
+ Gets the flag indicating whether the window should show 0 (zero) in cells Containing zero value.
+ When false, cells with zero value appear blank instead of Showing the number zero.
+
+ @return whether all zero values on the worksheet are displayed
+
+
+ Gets the first row on the sheet
+
+ @return the number of the first logical row on the sheet, zero based
+
+
+ Flag indicating whether the Fit to Page print option is enabled.
+
+ @return true
+
+
+ Returns the default footer for the sheet,
+ creating one as needed.
+ You may also want to look at
+ {@link #GetFirstFooter()},
+ {@link #GetOddFooter()} and
+ {@link #GetEvenFooter()}
+
+
+ Returns the default header for the sheet,
+ creating one as needed.
+ You may also want to look at
+ {@link #GetFirstHeader()},
+ {@link #GetOddHeader()} and
+ {@link #GetEvenHeader()}
+
+
+ Returns the odd footer. Used on all pages unless
+ other footers also present, when used on only
+ odd pages.
+
+
+ Returns the even footer. Not there by default, but
+ when Set, used on even pages.
+
+
+ Returns the first page footer. Not there by
+ default, but when Set, used on the first page.
+
+
+ Returns the odd header. Used on all pages unless
+ other headers also present, when used on only
+ odd pages.
+
+
+ Returns the even header. Not there by default, but
+ when Set, used on even pages.
+
+
+ Returns the first page header. Not there by
+ default, but when Set, used on the first page.
+
+
+ Determine whether printed output for this sheet will be horizontally centered.
+
+
+ Gets the size of the margin in inches.
+
+ @param margin which margin to get
+ @return the size of the margin
+ @see Sheet#LeftMargin
+ @see Sheet#RightMargin
+ @see Sheet#TopMargin
+ @see Sheet#BottomMargin
+ @see Sheet#HeaderMargin
+ @see Sheet#FooterMargin
+
+
+ Sets the size of the margin in inches.
+
+ @param margin which margin to get
+ @param size the size of the margin
+ @see Sheet#LeftMargin
+ @see Sheet#RightMargin
+ @see Sheet#TopMargin
+ @see Sheet#BottomMargin
+ @see Sheet#HeaderMargin
+ @see Sheet#FooterMargin
+
+
+ @return the merged region at the specified index
+ @throws InvalidOperationException if this worksheet does not contain merged regions
+
+
+ Returns the number of merged regions defined in this worksheet
+
+ @return number of merged regions in this worksheet
+
+
+ Returns the information regarding the currently configured pane (split or freeze).
+
+ @return null if no pane configured, or the pane information.
+
+
+ Returns the number of phsyically defined rows (NOT the number of rows in the sheet)
+
+ @return the number of phsyically defined rows
+
+
+ Gets the print Setup object.
+
+ @return The user model for the print Setup object.
+
+
+ Answer whether protection is enabled or disabled
+
+ @return true => protection enabled; false => protection disabled
+
+
+ Enables sheet protection and Sets the password for the sheet.
+ Also Sets some attributes on the {@link CT_SheetProtection} that correspond to
+ the default values used by Excel
+
+ @param password to set for protection. Pass null to remove protection
+
+
+ Converts a String to a {@link STUnsignedshortHex} value that Contains the {@link PasswordRecord#hashPassword(String)}
+ value in hexadecimal format
+
+ @param password the password string you wish convert to an {@link STUnsignedshortHex}
+ @return {@link STUnsignedshortHex} that Contains Excel hashed password in Hex format
+
+
+ Returns the logical row ( 0-based). If you ask for a row that is not
+ defined you get a null. This is to say row 4 represents the fifth row on a sheet.
+
+ @param rownum row to get
+ @return XSSFRow representing the rownumber or null if its not defined on the sheet
+
+
+ Horizontal page break information used for print layout view, page layout view, drawing print breaks in normal
+ view, and for printing the worksheet.
+
+ @return row indexes of all the horizontal page breaks, never null
+
+
+ Flag indicating whether summary rows appear below detail in an outline, when Applying an outline.
+
+
+ When true a summary row is inserted below the detailed data being summarized and a
+ new outline level is established on that row.
+
+
+ When false a summary row is inserted above the detailed data being summarized and a new outline level
+ is established on that row.
+
+ @return true if row summaries appear below detail in the outline
+
+
+ Flag indicating whether summary columns appear to the right of detail in an outline, when Applying an outline.
+
+
+ When true a summary column is inserted to the right of the detailed data being summarized
+ and a new outline level is established on that column.
+
+
+ When false a summary column is inserted to the left of the detailed data being
+ summarized and a new outline level is established on that column.
+
+ @return true if col summaries appear right of the detail in the outline
+
+
+ Ensure CT_Worksheet.CT_SheetPr.CT_OutlinePr
+
+
+
+ A flag indicating whether scenarios are locked when the sheet is protected.
+
+
+
+
+ The top row in the visible view when the sheet is first viewed after opening it in a viewer
+
+
+
+ Determine whether printed output for this sheet will be vertically centered.
+
+ @return whether printed output for this sheet will be vertically centered.
+
+
+ Group between (0 based) columns
+
+
+ Do not leave the width attribute undefined (see #52186).
+
+
+ Tie a range of cell toGether so that they can be collapsed or expanded
+
+ @param fromRow start row (0-based)
+ @param toRow end row (0-based)
+
+
+ Determines if there is a page break at the indicated column
+
+
+ Get the hidden state for a given column.
+
+ @param columnIndex - the column to set (0-based)
+ @return hidden - false if the column is visible
+
+
+ Gets the flag indicating whether this sheet should display formulas.
+
+ @return true if this sheet should display formulas.
+
+
+ Gets the flag indicating whether this sheet displays the lines
+ between rows and columns to make editing and Reading easier.
+
+ @return true if this sheet displays gridlines.
+ @see #isPrintGridlines() to check if printing of gridlines is turned on or off
+
+
+ Gets the flag indicating whether this sheet should display row and column headings.
+
+ Row heading are the row numbers to the side of the sheet
+
+
+ Column heading are the letters or numbers that appear above the columns of the sheet
+
+
+ @return true if this sheet should display row and column headings.
+
+
+ Returns whether gridlines are printed.
+
+ @return whether gridlines are printed
+
+
+ Tests if there is a page break at the indicated row
+
+ @param row index of the row to test
+ @return true if there is a page break at the indicated row
+
+
+ Sets a page break at the indicated row
+ Breaks occur above the specified row and left of the specified column inclusive.
+
+ For example, sheet.SetColumnBreak(2); breaks the sheet into two parts
+ with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.SetRowBreak(2);
+ breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
+ and rows starting with rownum=4 in the second.
+
+ @param row the row to break, inclusive
+
+
+ Removes a page break at the indicated column
+
+
+ Removes a merged region of cells (hence letting them free)
+
+ @param index of the region to unmerge
+
+
+ Removes a number of merged regions of cells (hence letting them free)
+
+ This method can be used to bulk-remove merged regions in a way
+ much faster than calling RemoveMergedRegion() for every single
+ merged region.
+
+ @param indices A Set of the regions to unmerge
+
+
+ Remove a row from this sheet. All cells Contained in the row are Removed as well
+
+ @param row the row to Remove.
+
+
+ Removes the page break at the indicated row
+
+
+ Whether Excel will be asked to recalculate all formulas when the
+ workbook is opened.
+
+
+ Flag indicating whether the sheet displays Automatic Page Breaks.
+
+ @return true if the sheet displays Automatic Page Breaks.
+
+
+ Sets a page break at the indicated column.
+ Breaks occur above the specified row and left of the specified column inclusive.
+
+ For example, sheet.SetColumnBreak(2); breaks the sheet into two parts
+ with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.SetRowBreak(2);
+ breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
+ and rows starting with rownum=4 in the second.
+
+ @param column the column to break, inclusive
+
+
+ Sets all adjacent columns of the same outline level to the specified
+ hidden status.
+
+ @param pIdx
+ the col info index of the start of the outline group
+ @return the column index of the last column in the outline group
+
+
+ 'Collapsed' state is stored in a single column col info record
+ immediately after the outline group
+
+ @param idx
+ @return a bool represented if the column is collapsed
+
+
+ Get the visibility state for a given column.
+
+ @param columnIndex - the column to get (0-based)
+ @param hidden - the visiblity state of the column
+
+
+
+ group the row It is possible for collapsed to be false and yet still have
+ the rows in question hidden. This can be achieved by having a lower
+ outline level collapsed, thus hiding all the child rows. Note that in
+ this case, if the lowest level were expanded, the middle level would
+ remain collapsed.
+
+ @param rowIndex -
+ the row involved, 0 based
+ @param collapse -
+ bool value for collapse
+
+
+ @param rowIndex the zero based row index to collapse
+
+
+ @param rowIndex the zero based row index to find from
+
+
+ @param rowNumber the zero based row index to expand
+
+
+ @param row the zero based row index to find from
+
+
+ @param row the zero based row index to find from
+
+
+ @param row the zero based row index to find from
+
+
+ Sets the zoom magnication for the sheet. The zoom is expressed as a
+ fraction. For example to express a zoom of 75% use 3 for the numerator
+ and 4 for the denominator.
+
+ @param numerator The numerator for the zoom magnification.
+ @param denominator The denominator for the zoom magnification.
+ @see #SetZoom(int)
+
+
+
+
+
+ Location of the top left visible cell Location of the top left visible cell in the bottom right
+ pane (when in Left-to-Right mode).
+
+ @param toprow the top row to show in desktop window pane
+ @param leftcol the left column to show in desktop window pane
+
+
+ Ungroup a range of rows that were previously groupped
+
+ @param fromRow start row (0-based)
+ @param toRow end row (0-based)
+
+
+ Returns a flag indicating whether this sheet is selected.
+
+ When only 1 sheet is selected and active, this value should be in synch with the activeTab value.
+ In case of a conflict, the Start Part Setting wins and Sets the active sheet tab.
+
+ Note: multiple sheets can be selected, but only one sheet can be active at one time.
+
+ @return true if this sheet is selected
+
+
+ Assign a cell comment to a cell region in this worksheet
+
+ @param cellRef cell region
+ @param comment the comment to assign
+ @deprecated since Nov 2009 use {@link XSSFCell#SetCellComment(NPOI.SS.usermodel.Comment)} instead
+
+
+ Register a hyperlink in the collection of hyperlinks on this sheet
+
+ @param hyperlink the link to add
+
+
+ Removes a hyperlink in the collection of hyperlinks on this sheet
+
+ @param row row index
+ @param column column index
+
+
+ Return location of the active cell, e.g. A1.
+
+ @return the location of the active cell.
+
+
+ Does this sheet have any comments on it? We need to know,
+ so we can decide about writing it to disk or not
+
+
+ Return the default sheet view. This is the last one if the sheet's views, according to sec. 3.3.1.83
+ of the OOXML spec: "A single sheet view defInition. When more than 1 sheet view is defined in the file,
+ it means that when opening the workbook, each sheet view corresponds to a separate window within the
+ spreadsheet application, where each window is Showing the particular sheet. Containing the same
+ workbookViewId value, the last sheetView defInition is loaded, and the others are discarded.
+ When multiple windows are viewing the same sheet, multiple sheetView elements (with corresponding
+ workbookView entries) are saved."
+
+
+ Returns the sheet's comments object if there is one,
+ or null if not
+
+ @param create create a new comments table if it does not exist
+
+
+ Return a master shared formula by index
+
+ @param sid shared group index
+ @return a CT_CellFormula bean holding shared formula or null if not found
+
+
+ @return true when Autofilters are locked and the sheet is protected.
+
+
+ @return true when Deleting columns is locked and the sheet is protected.
+
+
+ @return true when Deleting rows is locked and the sheet is protected.
+
+
+ @return true when Formatting cells is locked and the sheet is protected.
+
+
+ @return true when Formatting columns is locked and the sheet is protected.
+
+
+ @return true when Formatting rows is locked and the sheet is protected.
+
+
+ @return true when Inserting columns is locked and the sheet is protected.
+
+
+ @return true when Inserting hyperlinks is locked and the sheet is protected.
+
+
+ @return true when Inserting rows is locked and the sheet is protected.
+
+
+ @return true when Pivot tables are locked and the sheet is protected.
+
+
+ @return true when Sorting is locked and the sheet is protected.
+
+
+ @return true when Objects are locked and the sheet is protected.
+
+
+ @return true when Scenarios are locked and the sheet is protected.
+
+
+ @return true when Selection of locked cells is locked and the sheet is protected.
+
+
+ @return true when Selection of unlocked cells is locked and the sheet is protected.
+
+
+ @return true when Sheet is Protected.
+
+
+ Enable sheet protection
+
+
+ Disable sheet protection
+
+
+ Enable Autofilters locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Autofilters locking.
+ This does not modify sheet protection status.
+
+
+ Enable Deleting columns locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Deleting columns locking.
+ This does not modify sheet protection status.
+
+
+ Enable Deleting rows locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Deleting rows locking.
+ This does not modify sheet protection status.
+
+
+ Enable Formatting cells locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Formatting cells locking.
+ This does not modify sheet protection status.
+
+
+ Enable Formatting columns locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Formatting columns locking.
+ This does not modify sheet protection status.
+
+
+ Enable Formatting rows locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Formatting rows locking.
+ This does not modify sheet protection status.
+
+
+ Enable Inserting columns locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Inserting columns locking.
+ This does not modify sheet protection status.
+
+
+ Enable Inserting hyperlinks locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Inserting hyperlinks locking.
+ This does not modify sheet protection status.
+
+
+ Enable Inserting rows locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Inserting rows locking.
+ This does not modify sheet protection status.
+
+
+ Enable Pivot Tables locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Pivot Tables locking.
+ This does not modify sheet protection status.
+
+
+ Enable Sort locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Sort locking.
+ This does not modify sheet protection status.
+
+
+ Enable Objects locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Objects locking.
+ This does not modify sheet protection status.
+
+
+ Enable Scenarios locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Scenarios locking.
+ This does not modify sheet protection status.
+
+
+ Enable Selection of locked cells locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Selection of locked cells locking.
+ This does not modify sheet protection status.
+
+
+ Enable Selection of unlocked cells locking.
+ This does not modify sheet protection status.
+ To enforce this locking, call {@link #enableLocking()}
+
+
+ Disable Selection of unlocked cells locking.
+ This does not modify sheet protection status.
+
+
+ Also Creates cells if they don't exist
+
+
+ Creates a new Table, and associates it with this Sheet
+
+
+ Returns any tables associated with this Sheet
+
+
+ Set background color of the sheet tab
+
+ @param colorIndex the indexed color to set, must be a constant from {@link IndexedColors}
+
+
+ Creates an empty XSSFPivotTable and Sets up all its relationships
+ including: pivotCacheDefInition, pivotCacheRecords
+ @return returns a pivotTable
+
+
+ Create a pivot table and Set area of source, source sheet and a position for pivot table
+ @param source Area from where data will be collected
+ @param position A reference to the cell where the table will start
+ @param sourceSheet The sheet where source will be collected from
+ @return The pivot table
+
+
+ Create a pivot table and Set area of source and a position for pivot table
+ @param source Area from where data will be collected
+ @param position A reference to the cell where the table will start
+ @return The pivot table
+
+
+ Returns all the pivot tables for this Sheet
+
+
+ @author Yegor Kozlov
+
+
+ A factory method allowing to create a conditional formatting rule
+ with a cell comparison operator
+ TODO - formulas Containing cell references are currently not Parsed properly
+
+ @param comparisonOperation - a constant value from
+ {@link NPOI.hssf.record.CFRuleRecord.ComparisonOperator}:
+
+
BETWEEN
+
NOT_BETWEEN
+
EQUAL
+
NOT_EQUAL
+
GT
+
LT
+
GE
+
LE
+
+
+ @param formula1 - formula for the valued, Compared with the cell
+ @param formula2 - second formula (only used with
+ {@link NPOI.ss.usermodel.ComparisonOperator#BETWEEN}) and
+ {@link NPOI.ss.usermodel.ComparisonOperator#NOT_BETWEEN} operations)
+
+
+
+
+ Gets Conditional Formatting object at a particular index
+
+ @param index
+ of the Conditional Formatting object to fetch
+ @return Conditional Formatting object
+
+
+ @return number of Conditional Formatting objects of the sheet
+
+
+ Removes a Conditional Formatting object by index
+ @param index of a Conditional Formatting object to remove
+
+
+ Represents a shape with a predefined geometry in a SpreadsheetML Drawing.
+ Possible shape types are defined in {@link NPOI.SS.UserModel.ShapeTypes}
+
+
+ List of the paragraphs that make up the text in this shape
+
+
+ A default instance of CTShape used for creating new shapes.
+
+
+ Xml bean that stores properties of this shape
+
+
+ Prototype with the default structure of a new auto-shape.
+
+
+ Returns the text from all paragraphs in the shape. Paragraphs are Separated by new lines.
+
+ @return text Contained within this shape or empty string
+
+
+
+
+
+ Returns a string Containing an appropriate prefix for an auto-numbering bullet
+ @param scheme the auto-numbering scheme used by the bullet
+ @param value the value of the bullet
+ @return appropriate prefix for an auto-numbering bullet
+
+
+ Convert an integer to its alpha equivalent e.g. 1 = A, 2 = B, 27 = AA etc
+
+
+ Convert an integer to its roman equivalent e.g. 1 = I, 9 = IX etc
+
+
+ Clear all text from this shape
+
+
+ Set a single paragraph of text on the shape. Note this will replace all existing paragraphs Created on the shape.
+ @param text string representing the paragraph text
+
+
+ Set a single paragraph of text on the shape. Note this will replace all existing paragraphs Created on the shape.
+ @param str rich text string representing the paragraph text
+
+
+ Returns a collection of the XSSFTextParagraphs that are attached to this shape
+
+ @return text paragraphs in this shape
+
+
+ Add a new paragraph run to this shape
+
+ @return Created paragraph run
+
+
+ Add a new paragraph run to this shape, Set to the provided string
+
+ @return Created paragraph run
+
+
+ Add a new paragraph run to this shape, Set to the provided rich text string
+
+ @return Created paragraph run
+
+
+ Returns the type of horizontal overflow for the text.
+
+ @return the type of horizontal overflow
+
+
+ Returns the type of vertical overflow for the text.
+
+ @return the type of vertical overflow
+
+
+ Returns the type of vertical alignment for the text within the shape.
+
+ @return the type of vertical alignment
+
+
+ Gets the vertical orientation of the text
+
+ @return vertical orientation of the text
+
+
+ Returns the distance (in points) between the bottom of the text frame
+ and the bottom of the inscribed rectangle of the shape that Contains the text.
+
+ @return the bottom inset in points
+
+
+ Returns the distance (in points) between the left edge of the text frame
+ and the left edge of the inscribed rectangle of the shape that Contains
+ the text.
+
+ @return the left inset in points
+
+
+ Returns the distance (in points) between the right edge of the
+ text frame and the right edge of the inscribed rectangle of the shape
+ that Contains the text.
+
+ @return the right inset in points
+
+
+ Returns the distance (in points) between the top of the text frame
+ and the top of the inscribed rectangle of the shape that Contains the text.
+
+ @return the top inset in points
+
+
+ @return whether to wrap words within the bounding rectangle
+
+
+
+ Specifies that a shape should be auto-fit to fully contain the text described within it.
+ Auto-fitting is when text within a shape is scaled in order to contain all the text inside
+
+ @param value type of autofit
+ @return type of autofit
+
+
+ Gets the shape type, one of the constants defined in {@link NPOI.SS.UserModel.ShapeTypes}.
+
+ @return the shape type
+ @see NPOI.SS.UserModel.ShapeTypes
+
+
+ org.Openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt to
+ org.Openxmlformats.schemas.Drawingml.x2006.main.CTFont adapter
+
+
+
+ This class : the Table Part (Open Office XML Part 4:
+ chapter 3.5.1)
+
+ This implementation works under the assumption that a table Contains mappings to a subtree of an XML.
+ The root element of this subtree an occur multiple times (one for each row of the table). The child nodes
+ of the root element can be only attributes or element with maxOccurs=1 property set
+
+
+ @author Roberto Manicardi
+
+
+ Checks if this Table element Contains even a single mapping to the map identified by id
+ @param id the XSSFMap ID
+ @return true if the Table element contain mappings
+
+
+
+ Calculates the xpath of the root element for the table. This will be the common part
+ of all the mapping's xpaths
+
+ @return the xpath of the table's root element
+
+
+ @return the name of the Table, if set
+
+
+ @return the display name of the Table, if set
+
+
+ @return the number of mapped table columns (see Open Office XML Part 4: chapter 3.5.1.4)
+
+
+ @return The reference for the cell in the top-left part of the table
+ (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref)
+
+
+
+ @return The reference for the cell in the bottom-right part of the table
+ (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref)
+
+
+
+ @return the total number of rows in the selection. (Note: in this version autofiltering is ignored)
+
+
+
+ Synchronize table headers with cell values in the parent sheet.
+ Headers must be in sync, otherwise Excel will display a
+ "Found unreadable content" message on startup.
+
+
+ Represents a text box in a SpreadsheetML Drawing.
+
+ @author Yegor Kozlov
+
+
+ Represents a paragraph of text within the Containing text body.
+ The paragraph is the highest level text separation mechanism.
+
+
+ Add a new run of text
+
+ @return a new run of text
+
+
+ Insert a line break
+
+ @return text run representing this line break ('\n')
+
+
+ get or set the alignment that is to be applied to the paragraph.
+ Possible values for this include left, right, centered, justified and distributed,
+ If this attribute is omitted, then a value of left is implied.
+ @return alignment that is applied to the paragraph
+
+
+ Determines where vertically on a line of text the actual words are positioned. This deals
+ with vertical placement of the characters with respect to the baselines. For instance
+ having text anchored to the top baseline, anchored to the bottom baseline, centered in
+ between, etc.
+ If this attribute is omitted, then a value of baseline is implied.
+ @return alignment that is applied to the paragraph
+
+
+ @return the font to be used on bullet characters within a given paragraph
+
+
+ @return the character to be used in place of the standard bullet point
+
+
+
+ @return the color of bullet characters within a given paragraph.
+ A null value means to use the text font color.
+
+
+
+
+ @return the indent applied to the first line of text in the paragraph.
+
+
+ Specifies the left margin of the paragraph. This is specified in Addition to the text body
+ inset and applies only to this text paragraph. That is the text body inset and the LeftMargin
+ attributes are Additive with respect to the text position.
+
+ @param value the left margin of the paragraph, -1 to clear the margin and use the default of 0.
+
+
+ Specifies the right margin of the paragraph. This is specified in Addition to the text body
+ inset and applies only to this text paragraph. That is the text body inset and the marR
+ attributes are Additive with respect to the text position.
+
+ @param value the right margin of the paragraph, -1 to clear the margin and use the default of 0.
+
+
+
+ @return the default size for a tab character within this paragraph in points
+
+
+ Add a single tab stop to be used on a line of text when there are one or more tab characters
+ present within the text.
+
+ @param value the position of the tab stop relative to the left margin
+
+
+
+
+
+ Specifies the particular level text properties that this paragraph will follow.
+ The value for this attribute formats the text according to the corresponding level
+ paragraph properties defined in the list of styles associated with the body of text
+ that this paragraph belongs to (therefore in the parent shape).
+
+ Note that the closest properties object to the text is used, therefore if there is
+ a conflict between the text paragraph properties and the list style properties for
+ this level then the text paragraph properties will take precedence.
+
+ Returns the level of text properties that this paragraph will follow.
+
+ @return the text level of this paragraph (0-based). Default is 0.
+
+
+ Returns whether this paragraph has bullets
+
+
+ Set this paragraph as an automatic numbered bullet point
+
+ @param scheme type of auto-numbering
+ @param startAt the number that will start number for a given sequence of automatically
+ numbered bullets (1-based).
+
+
+ Set this paragraph as an automatic numbered bullet point
+
+ @param scheme type of auto-numbering
+
+
+ Returns whether this paragraph has automatic numbered bullets
+
+
+ Returns the starting number if this paragraph has automatic numbered bullets, otherwise returns 0
+
+
+ Returns the auto number scheme if this paragraph has automatic numbered bullets, otherwise returns ListAutoNumber.ARABIC_PLAIN
+
+
+ Represents a run of text within the Containing text body. The run element is the
+ lowest level text separation mechanism within a text body.
+
+
+ @return font size in points or -1 if font size is not Set.
+
+
+
+ @return the spacing between characters within a text Run,
+ If this attribute is omitted then a value of 0 or no adjustment is assumed.
+
+
+ Specifies the typeface, or name of the font that is to be used for this text Run.
+
+ @param typeface the font to apply to this text Run.
+ The value of null unsets the Typeface attribute from the underlying xml.
+
+
+ @return font family or null if not Set
+
+
+ get or set whether a run of text will be formatted as strikethrough text. Default is false.
+
+
+ get or set whether a run of text will be formatted as a superscript text. Default is false.
+ Default base line offset is 30%
+
+
+ Set the baseline for both the superscript and subscript fonts.
+
+ The size is specified using a percentage.
+ Positive values indicate superscript, negative values indicate subscript.
+
+
+ @param baselineOffset
+
+
+ get or set whether a run of text will be formatted as a superscript text. Default is false.
+ Default base line offset is -25%.
+
+
+ @return whether a run of text will be formatted as a superscript text. Default is false.
+
+
+ get or set whether this run of text is formatted as bold text
+
+
+ get or set whether this run of text is formatted as italic text
+
+
+ get or set whether this run of text is formatted as underlined text
+
+
+ Represents a SpreadsheetML VML Drawing.
+
+
+ In Excel 2007 VML Drawings are used to describe properties of cell comments,
+ although the spec says that VML is deprecated:
+
+
+ The VML format is a legacy format originally introduced with Office 2000 and is included and fully defined
+ in this Standard for backwards compatibility reasons. The DrawingML format is a newer and richer format
+ Created with the goal of eventually replacing any uses of VML in the Office Open XML formats. VML should be
+ considered a deprecated format included in Office Open XML for legacy reasons only and new applications that
+ need a file format for Drawings are strongly encouraged to use preferentially DrawingML
+
+
+
+ Warning - Excel is known to Put invalid XML into these files!
+ For example, >br< without being closed or escaped crops up.
+
+
+ See 6.4 VML - SpreadsheetML Drawing in Office Open XML Part 4 - Markup Language Reference.pdf
+
+ @author Yegor Kozlov
+
+
+ regexp to parse shape ids, in VML they have weird form of id="_x0000_s1026"
+
+
+ Create a new SpreadsheetML Drawing
+
+ @see XSSFSheet#CreateDrawingPatriarch()
+
+
+ Construct a SpreadsheetML Drawing from a namespace part
+
+ @param part the namespace part holding the Drawing data,
+ the content type must be application/vnd.Openxmlformats-officedocument.Drawing+xml
+ @param rel the namespace relationship holding this Drawing,
+ the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/drawing
+
+
+ Initialize a new Speadsheet VML Drawing
+
+
+ Find a shape with ClientData of type "NOTE" and the specified row and column
+
+ @return the comment shape or null
+
+
+ High level representation of a SpreadsheetML workbook. This is the first object most users
+ will construct whether they are Reading or writing a workbook. It is also the
+ top level object for creating new sheets/etc.
+
+
+ Width of one character of the default font in pixels. Same for Calibry and Arial.
+
+
+ Excel silently tRuncates long sheet names to 31 chars.
+ This constant is used to ensure uniqueness in the first 31 chars
+
+
+ Extended windows meta file
+
+
+ Windows Meta File
+
+
+ Mac PICT format
+
+
+ JPEG format
+
+
+ PNG format
+
+
+ Device independent bitmap
+
+
+ Images formats supported by XSSF but not by HSSF
+
+
+ The underlying XML bean
+
+
+ this holds the XSSFSheet objects attached to this workbook
+
+
+ this holds the XSSFName objects attached to this workbook
+
+
+ shared string table - a cache of strings in this workbook
+
+
+ A collection of shared objects used for styling content,
+ e.g. fonts, cell styles, colors, etc.
+
+
+ The locator of user-defined functions.
+ By default includes functions from the Excel Analysis Toolpack
+
+
+ TODO
+
+
+ External Links, for referencing names or cells in other workbooks.
+
+
+ A collection of custom XML mappings
+
+
+ Used to keep track of the data formatter so that all
+ CreateDataFormatter calls return the same one for a given
+ book. This ensures that updates from one places is visible
+ someplace else.
+
+
+ The policy to apply in the event of missing or
+ blank cells when fetching from a row.
+ See {@link NPOI.ss.usermodel.Row.MissingCellPolicy}
+
+
+ array of pictures for this workbook
+
+
+ cached instance of XSSFCreationHelper for this workbook
+ @see {@link #getCreationHelper()}
+
+
+ List of all pivot tables in workbook
+
+
+ Create a new SpreadsheetML workbook.
+
+
+ Constructs a XSSFWorkbook object given a OpenXML4J Package object,
+ see http://poi.apache.org/oxml4j/.
+
+ Once you have finished working with the Workbook, you should close the package
+ by calling pkg.close, to avoid leaving file handles open.
+
+ Creating a XSSFWorkbook from a file-backed OPC Package has a lower memory
+ footprint than an InputStream backed one.
+
+ @param pkg the OpenXML4J OPC Package object.
+
+
+ Constructs a XSSFWorkbook object, by buffering the whole stream into memory
+ and then opening an {@link OPCPackage} object for it.
+
+ Using an {@link InputStream} requires more memory than using a File, so
+ if a {@link File} is available then you should instead do something like
+
+ OPCPackage pkg = OPCPackage.open(path);
+ XSSFWorkbook wb = new XSSFWorkbook(pkg);
+ // work with the wb object
+ ......
+ pkg.close(); // gracefully closes the underlying zip file
+
+
+
+
+
+ Create a new CT_Workbook with all values Set to default
+
+
+ Create a new SpreadsheetML namespace and Setup the default minimal content
+
+
+ Return the underlying XML bean
+
+ @return the underlying CT_Workbook bean
+
+
+ Adds a picture to the workbook.
+
+ @param pictureData The bytes of the picture
+ @param format The format of the picture.
+
+ @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} .
+ @see Workbook#PICTURE_TYPE_EMF
+ @see Workbook#PICTURE_TYPE_WMF
+ @see Workbook#PICTURE_TYPE_PICT
+ @see Workbook#PICTURE_TYPE_JPEG
+ @see Workbook#PICTURE_TYPE_PNG
+ @see Workbook#PICTURE_TYPE_DIB
+ @see #getAllPictures()
+
+
+ Adds a picture to the workbook.
+
+ @param is The sream to read image from
+ @param format The format of the picture.
+
+ @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} .
+ @see Workbook#PICTURE_TYPE_EMF
+ @see Workbook#PICTURE_TYPE_WMF
+ @see Workbook#PICTURE_TYPE_PICT
+ @see Workbook#PICTURE_TYPE_JPEG
+ @see Workbook#PICTURE_TYPE_PNG
+ @see Workbook#PICTURE_TYPE_DIB
+ @see #getAllPictures()
+
+
+ Create an XSSFSheet from an existing sheet in the XSSFWorkbook.
+ The Cloned sheet is a deep copy of the original.
+
+ @return XSSFSheet representing the Cloned sheet.
+ @throws ArgumentException if the sheet index in invalid
+ @throws POIXMLException if there were errors when cloning
+
+
+
+ Create a new XSSFCellStyle and add it to the workbook's style table
+
+ the new XSSFCellStyle object
+
+
+
+ Returns the instance of XSSFDataFormat for this workbook.
+
+ the XSSFDataFormat object
+
+
+
+ Create a new Font and add it to the workbook's font table
+
+
+
+
+ Create an XSSFSheet for this workbook, Adds it to the sheets and returns
+ the high level representation. Use this to create new sheets.
+
+ @return XSSFSheet representing the new sheet.
+
+
+ Create a new sheet for this Workbook and return the high level representation.
+ Use this to create new sheets.
+
+
+ Note that Excel allows sheet names up to 31 chars in length but other applications
+ (such as OpenOffice) allow more. Some versions of Excel crash with names longer than 31 chars,
+ others - tRuncate such names to 31 character.
+
+
+ POI's SpreadsheetAPI silently tRuncates the input argument to 31 characters.
+ Example:
+
+
+ Sheet sheet = workbook.CreateSheet("My very long sheet name which is longer than 31 chars"); // will be tRuncated
+ assert 31 == sheet.SheetName.Length;
+ assert "My very long sheet name which i" == sheet.SheetName;
+
+
+
+ Except the 31-character constraint, Excel applies some other rules:
+
+ Sheet name MUST be unique in the workbook and MUST NOT contain the any of the following characters:
+
+
0x0000
+
0x0003
+
colon (:)
+
backslash (\)
+
asterisk (*)
+
question mark (?)
+
forward slash (/)
+
opening square bracket ([)
+
closing square bracket (])
+
+ The string MUST NOT begin or end with the single quote (') character.
+
+
+
+ See {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)}
+ for a safe way to create valid names
+
+ @param sheetname sheetname to set for the sheet.
+ @return Sheet representing the new sheet.
+ @throws IllegalArgumentException if the name is null or invalid
+ or workbook already contains a sheet with this name
+ @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)
+
+
+ Finds a font that matches the one with the supplied attributes
+
+
+ Convenience method to Get the active sheet. The active sheet is is the sheet
+ which is currently displayed when the workbook is viewed in Excel.
+ 'Selected' sheet(s) is a distinct concept.
+
+
+ Gets all pictures from the Workbook.
+
+ @return the list of pictures (a list of {@link XSSFPictureData} objects.)
+ @see #AddPicture(byte[], int)
+
+
+ Get the cell style object at the given index
+
+ @param idx index within the Set of styles
+ @return XSSFCellStyle object at the index
+
+
+ Get the cell style object at the given index
+
+ @param idx index within the set of styles
+ @return XSSFCellStyle object at the index
+
+
+ Get the font at the given index number
+
+ @param idx index number
+ @return XSSFFont at the index
+
+
+ Gets the named range index by his name
+ Note:Excel named ranges are case-insensitive and
+ this method performs a case-insensitive search.
+
+ @param name named range name
+ @return named range index
+
+
+ Get the number of styles the workbook Contains
+
+ @return count of cell styles
+
+
+ Get the number of fonts in the this workbook
+
+ @return number of fonts
+
+
+ Get the number of named ranges in the this workbook
+
+ @return number of named ranges
+
+
+ Get the number of worksheets in the this workbook
+
+ @return number of worksheets
+
+
+ Retrieves the reference for the printarea of the specified sheet, the sheet name is Appended to the reference even if it was not specified.
+ @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
+ @return String Null if no print area has been defined
+
+
+ Get sheet with the given name (case insensitive match)
+
+ @param name of the sheet
+ @return XSSFSheet with the name provided or null if it does not exist
+
+
+
+
+ Returns the index of the sheet by his name (case insensitive match)
+
+ the sheet name
+ index of the sheet (0 based) or -1 if not found
+
+
+ Returns the index of the given sheet
+
+ @param sheet the sheet to look up
+ @return index of the sheet (0 based). -1 if not found
+
+
+ Get the sheet name
+
+ @param sheetIx Number
+ @return Sheet name
+
+
+ Allows foreach loops:
+
+
+
+ Are we a normal workbook (.xlsx), or a
+ macro enabled workbook (.xlsm)?
+
+
+ As {@link #removeName(String)} is not necessarily unique
+ (name + sheet index is unique), this method is more accurate.
+
+ @param name the name to remove.
+
+
+ Delete the printarea for the sheet specified
+
+ @param sheetIndex 0-based sheet index (0 = First Sheet)
+
+
+ Removes sheet at the given index.
+
+ Care must be taken if the Removed sheet is the currently active or only selected sheet in
+ the workbook. There are a few situations when Excel must have a selection and/or active
+ sheet. (For example when printing - see Bug 40414).
+
+ This method Makes sure that if the Removed sheet was active, another sheet will become
+ active in its place. Furthermore, if the Removed sheet was the only selected sheet, another
+ sheet will become selected. The newly active/selected sheet will have the same index, or
+ one less if the Removed sheet was the last in the workbook.
+
+ @param index of the sheet (0-based)
+
+
+ Gracefully remove references to the sheet being deleted
+
+ @param index the 0-based index of the sheet to delete
+
+
+ Retrieves the current policy on what to do when
+ Getting missing or blank cells from a row.
+ The default is to return blank and null cells.
+ {@link MissingCellPolicy}
+
+
+ Validate sheet index
+
+ @param index the index to validate
+ @throws ArgumentException if the index is out of range (index
+ < 0 || index >= NumberOfSheets).
+
+
+ Gets the first tab that is displayed in the list of tabs in excel.
+
+ @return integer that Contains the index to the active sheet in this book view.
+
+
+
+ For the Convenience of Java Programmers maintaining pointers.
+ @see #setPrintArea(int, String)
+ @param sheetIndex Zero-based sheet index (0 = First Sheet)
+ @param startColumn Column to begin printarea
+ @param endColumn Column to end the printarea
+ @param startRow Row to begin the printarea
+ @param endRow Row to end the printarea
+
+
+ Sets the repeating rows and columns for a sheet.
+
+ To Set just repeating columns:
+
+
+ @param sheetIndex 0 based index to sheet.
+ @param startColumn 0 based start of repeating columns.
+ @param endColumn 0 based end of repeating columns.
+ @param startRow 0 based start of repeating rows.
+ @param endRow 0 based end of repeating rows.
+
+
+ Generates a NameRecord to represent a built-in region
+
+ @return a new NameRecord
+ @throws ArgumentException if sheetNumber is invalid
+ @throws POIXMLException if such a name already exists in the workbook
+
+
+ We only Set one sheet as selected for compatibility with HSSF.
+
+
+ Set the sheet name.
+
+ @param sheetIndex sheet number (0 based)
+ @param sheetname the new sheet name
+ @throws ArgumentException if the name is null or invalid
+ or workbook already Contains a sheet with this name
+ @see {@link #CreateSheet(String)}
+ @see {@link NPOI.ss.util.WorkbookUtil#CreateSafeSheetName(String nameProposal)}
+ for a safe way to create valid names
+
+
+ Sets the order of appearance for a given sheet.
+
+ @param sheetname the name of the sheet to reorder
+ @param pos the position that we want to insert the sheet into (0 based)
+
+
+ marshal named ranges from the {@link #namedRanges} collection to the underlying CT_Workbook bean
+
+
+
+ Write the document to the specified stream, and optionally leave the stream open without closing it.
+
+
+
+ Returns SharedStringsTable - the cache of strings for this workbook
+
+ @return the shared string table
+
+
+ Return a object representing a collection of shared objects used for styling content,
+ e.g. fonts, cell styles, colors, etc.
+
+
+ Returns the Theme of current workbook.
+
+
+ Returns an object that handles instantiating concrete
+ classes of the various instances for XSSF.
+
+
+ Determines whether a workbook Contains the provided sheet name.
+ For the purpose of comparison, long names are tRuncated to 31 chars.
+
+ @param name the name to Test (case insensitive match)
+ @param excludeSheetIdx the sheet to exclude from the check or -1 to include all sheets in the Check.
+ @return true if the sheet Contains the name, false otherwise.
+
+
+ Gets a bool value that indicates whether the date systems used in the workbook starts in 1904.
+
+ The default value is false, meaning that the workbook uses the 1900 date system,
+ where 1/1/1900 is the first day in the system..
+
+ @return true if the date systems used in the workbook starts in 1904
+
+
+ Get the document's embedded files.
+
+
+ Check whether a sheet is hidden.
+
+ Note that a sheet could instead be Set to be very hidden, which is different
+ ({@link #isSheetVeryHidden(int)})
+
+ @param sheetIx Number
+ @return true if sheet is hidden
+
+
+ Check whether a sheet is very hidden.
+
+ This is different from the normal hidden status
+ ({@link #isSheetHidden(int)})
+
+ @param sheetIx sheet index to check
+ @return true if sheet is very hidden
+
+
+ Sets the visible state of this sheet.
+
+ Calling setSheetHidden(sheetIndex, true) is equivalent to
+ setSheetHidden(sheetIndex, Workbook.SHEET_STATE_HIDDEN).
+
+ Calling setSheetHidden(sheetIndex, false) is equivalent to
+ setSheetHidden(sheetIndex, Workbook.SHEET_STATE_VISIBLE).
+
+
+ @param sheetIx the 0-based index of the sheet
+ @param hidden whether this sheet is hidden
+ @see #setSheetHidden(int, int)
+
+
+ Hide or unhide a sheet.
+
+
+
0 - visible.
+
1 - hidden.
+
2 - very hidden.
+
+ @param sheetIx the sheet index (0-based)
+ @param state one of the following Workbook constants:
+ Workbook.SHEET_STATE_VISIBLE,
+ Workbook.SHEET_STATE_HIDDEN, or
+ Workbook.SHEET_STATE_VERY_HIDDEN.
+ @throws ArgumentException if the supplied sheet index or state is invalid
+
+
+
+ Hide or unhide a sheet.
+
+ The sheet number
+ 0 for not hidden, 1 for hidden, 2 for very hidden
+
+
+ Fired when a formula is deleted from this workbook,
+ for example when calling cell.SetCellFormula(null)
+
+ @see XSSFCell#setCellFormula(String)
+
+
+ Return the CalculationChain object for this workbook
+
+ The calculation chain object specifies the order in which the cells in a workbook were last calculated
+
+
+ @return the CalculationChain object or null if not defined
+
+
+ * Returns the list of {@link ExternalLinksTable} object for this workbook
+ *
+ *
The external links table specifies details of named ranges etc
+ * that are referenced from other workbooks, along with the last seen
+ * values of what they point to.
+ *
+ *
Note that Excel uses index 0 for the current workbook, so the first
+ * External Links in a formula would be '[1]Foo' which corresponds to
+ * entry 0 in this list.
+
+ * @return the ExternalLinksTable list, which may be empty
+
+
+
+ @return a collection of custom XML mappings defined in this workbook
+
+
+
+ @return the helper class used to query the custom XML mapping defined in this workbook
+
+
+ Adds the External Link Table part and relations required to allow formulas
+ referencing the specified external workbook to be added to this one. Allows
+ formulas such as "[MyOtherWorkbook.xlsx]Sheet3!$A$5" to be added to the
+ file, for workbooks not already linked / referenced.
+
+ @param name The name the workbook will be referenced as in formulas
+ @param workbook The open workbook to fetch the link required information from
+
+
+ Specifies a bool value that indicates whether structure of workbook is locked.
+ A value true indicates the structure of the workbook is locked. Worksheets in the workbook can't be Moved,
+ deleted, hidden, unhidden, or Renamed, and new worksheets can't be inserted.
+ A value of false indicates the structure of the workbook is not locked.
+
+ @return true if structure of workbook is locked
+
+
+ Specifies a bool value that indicates whether the windows that comprise the workbook are locked.
+ A value of true indicates the workbook windows are locked. Windows are the same size and position each time the
+ workbook is opened.
+ A value of false indicates the workbook windows are not locked.
+
+ @return true if windows that comprise the workbook are locked
+
+
+ Specifies a bool value that indicates whether the workbook is locked for revisions.
+
+ @return true if the workbook is locked for revisions.
+
+
+ Locks the structure of workbook.
+
+
+ Unlocks the structure of workbook.
+
+
+ Locks the windows that comprise the workbook.
+
+
+ Unlocks the windows that comprise the workbook.
+
+
+ Locks the workbook for revisions.
+
+
+ Unlocks the workbook for revisions.
+
+
+
+ Returns the locator of user-defined functions.
+
+ The default instance : the built-in functions with the Excel Analysis Tool Pack.
+ To Set / Evaluate custom functions you need to register them as follows:
+
+
+
+
+ @return wrapped instance of UDFFinder that allows seeking functions both by index and name
+
+
+ Register a new toolpack in this workbook.
+
+ @param toopack the toolpack to register
+
+
+ Whether the application shall perform a full recalculation when the workbook is opened.
+
+ Typically you want to force formula recalculation when you modify cell formulas or values
+ of a workbook previously Created by Excel. When Set to true, this flag will tell Excel
+ that it needs to recalculate all formulas in the workbook the next time the file is opened.
+
+
+ Note, that recalculation updates cached formula results and, thus, modifies the workbook.
+ Depending on the version, Excel may prompt you with "Do you want to save the Changes in filename?"
+ on close.
+
+
+ @param value true if the application will perform a full recalculation of
+ workbook values when the workbook is opened
+ @since 3.8
+
+
+ Whether Excel will be asked to recalculate all formulas when the workbook is opened.
+
+ @since 3.8
+
+
+ Add pivotCache to the workbook
+
+
+ This is a seriously sick fix for the fact that some .xlsx
+ files contain raw bits of HTML, without being escaped
+ or properly turned into XML.
+ The result is that they contain things like >br<,
+ which breaks the XML parsing.
+ This very sick InputStream wrapper attempts to spot
+ these go past, and fix them.
+ Only works for UTF-8 and US-ASCII based streams!
+ It should only be used where experience Shows the problem
+ can occur...
+
+
+ Warning - doesn't fix!
+
+
+ Reads into the buffer from the spare bytes
+
+
+ We don't support .xlsb files, sorry
+
+
+ Helper class to extract text from an OOXML Word file
+
+
+ Should we also fetch the hyperlinks, when fetching
+ the text content? Default is to only output the
+ hyperlink label, and not the contents
+
+
+ Base class for XWPF paragraphs
+
+ @author Yury Batrakov (batrakov at gmail.com)
+
+
+
+ Decorator class for XWPFParagraph allowing to add comments
+ found in paragraph to its text
+
+ @author Yury Batrakov (batrakov at gmail.com)
+
+
+
+ A .docx file can have no headers/footers, the same header/footer
+ on each page, odd/even page footers, and optionally also
+ a different header/footer on the first page.
+ This class handles sorting out what there is, and giving you
+ the right headers and footers for the document.
+
+
+ Figures out the policy for the given document,
+ and Creates any header and footer objects
+ as required.
+
+
+ Figures out the policy for the given document,
+ and Creates any header and footer objects
+ as required.
+
+
+ MB 24 May 2010. Created this overloaded buildHdrFtr() method because testing demonstrated
+ that the XWPFFooter or XWPFHeader object returned by calls to the CreateHeader(int, XWPFParagraph[])
+ and CreateFooter(int, XWPFParagraph[]) methods or the GetXXXXXHeader/Footer methods where
+ headers or footers had been Added to a document since it had been Created/opened, returned
+ an object that Contained no XWPFParagraph objects even if the header/footer itself did contain
+ text. The reason was that this line of code; CTHdrFtr ftr = CTHdrFtr.Factory.NewInstance();
+ Created a brand new instance of the CTHDRFtr class which was then populated with data when
+ it should have recovered the CTHdrFtr object encapsulated within the XWPFHeaderFooter object
+ that had previoulsy been instantiated in the CreateHeader(int, XWPFParagraph[]) or
+ CreateFooter(int, XWPFParagraph[]) methods.
+
+
+ Returns the odd page header. This is
+ also the same as the default one...
+
+
+ Returns the odd page footer. This is
+ also the same as the default one...
+
+
+ Get the header that applies to the given
+ (1 based) page.
+ @param pageNumber The one based page number
+
+
+ Get the footer that applies to the given
+ (1 based) page.
+ @param pageNumber The one based page number
+
+
+ Decorator class for XWPFParagraph allowing to add hyperlinks
+ found in paragraph to its text.
+
+ Note - Adds the hyperlink at the end, not in the right place...
+
+ @deprecated Use {@link XWPFHyperlinkRun} instead
+
+
+ @param nextDecorator The next decorator to use
+ @param outputHyperlinkUrls Should we output the links too, or just the link text?
+
+
+ @param prgrph The paragraph of text to work on
+ @param outputHyperlinkUrls Should we output the links too, or just the link text?
+
+
+ Base decorator class for XWPFParagraph
+
+
+ Experimental abstract class that is a base for XWPFSDT and XWPFSDTCell
+
+ WARNING - APIs expected to change rapidly.
+
+ These classes have so far been built only for Read-only Processing.
+
+
+ @return first SDT Title
+
+
+ @return first SDT Tag
+
+
+ @return the content object
+
+
+ @return null
+
+
+ @return document part
+
+
+ @return partType
+
+
+ @return element type
+
+
+
+ 9 Jan 2010
+
+
+ // TODO insert Javadoc here!
+
+ @author epp
+
+
+
+ The different kinds of {@link IBody} that exist
+
+
+ Specifies all types of borders which can be specified for WordProcessingML
+ objects which have a border. Borders can be Separated into two types:
+
+
Line borders: which specify a pattern to be used when Drawing a line around the
+ specified object.
+
+
Art borders: which specify a repeated image to be used
+ when Drawing a border around the specified object. Line borders may be
+ specified on any object which allows a border, however, art borders may only
+ be used as a border at the page level - the borders under the pgBorders
+ element
+
+
+ @author Gisella Bronzetti
+
+
+ Specifies a line border consisting of a single line around the parent
+ object.
+
+
+ specifies an art border consisting of a repeated image of an apple
+
+
+ specifies an art border consisting of a repeated image of a shell pattern
+
+
+ specifies an art border consisting of a repeated image of a baby pacifier
+
+
+ specifies an art border consisting of a repeated image of a baby rattle
+
+
+ specifies an art border consisting of a repeated image of a set of
+ balloons
+
+
+ specifies an art border consisting of a repeated image of a hot air
+ balloon
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background.
+
+
+ specifies an art border consisting of a repeating image of a black dot on
+ a white background.
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background.
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background.
+
+
+ specifies an art border consisting of a repeating image of a white dot on
+ a black background.
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background.
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background.
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background
+
+
+ specifies an art border consisting of a repeating image of a black and
+ white background
+
+
+ specifies an art border consisting of a repeated image of bats
+
+
+ specifies an art border consisting of repeating images of birds
+
+
+ specifies an art border consisting of a repeated image of birds flying
+
+
+ specifies an art border consisting of a repeated image of a cabin
+
+
+ specifies an art border consisting of a repeated image of a piece of cake
+
+
+ specifies an art border consisting of a repeated image of candy corn
+
+
+ specifies an art border consisting of a repeated image of a knot work
+ pattern
+
+
+ specifies an art border consisting of a banner.
+
+ if the border is on the left or right, no border is displayed.
+
+
+
+ specifies an art border consisting of a repeating image of a chain link
+ pattern.
+
+
+ specifies an art border consisting of a repeated image of a champagne
+ bottle
+
+
+ specifies an art border consisting of repeating images of a compass
+
+
+ specifies an art border consisting of a repeating image of a colored
+ pattern.
+
+
+ specifies an art border consisting of a repeated image of a checkerboard
+
+
+ specifies an art border consisting of a repeated image of a christmas
+ tree
+
+
+ specifies an art border consisting of repeating images of lines and
+ circles
+
+
+ specifies an art border consisting of a repeated image of a rectangular
+ pattern
+
+
+ specifies an art border consisting of a repeated image of a wave
+
+
+ specifies an art border consisting of a repeated image of a clock
+
+
+ specifies an art border consisting of repeating images of a compass
+
+
+ specifies an art border consisting of a repeated image of confetti
+
+
+ specifies an art border consisting of a repeated image of confetti
+
+
+ specifies an art border consisting of a repeated image of confetti
+
+
+ specifies an art border consisting of a repeated image of confetti
+ streamers
+
+
+ specifies an art border consisting of a repeated image of confetti
+
+
+ specifies an art border consisting of a repeated image
+
+
+ specifies an art border consisting of a dashed line
+
+
+ specifies an art border consisting of a dotted line
+
+
+ specifies an art border consisting of a repeated image of a maze-like
+ pattern
+
+
+ specifies an art border consisting of a repeated image of a butterfly
+
+
+ specifies an art border consisting of a repeated image of a fish
+
+
+ specifies an art border consisting of repeating images of insects.
+
+
+ specifies an art border consisting of a repeated image of a ladybug
+
+
+ specifies an art border consisting of repeating images of a cross-stitch
+ pattern
+
+
+ specifies an art border consisting of a repeated image of cupid
+
+
+ Specifies the Set of possible restart locations which may be used as to
+ determine the next available line when a break's type attribute has a value
+ of textWrapping.
+
+ @author Gisella Bronzetti
+
+
+ Specifies that the text wrapping break shall advance the text to the next
+ line in the WordProcessingML document, regardless of its position left to
+ right or the presence of any floating objects which intersect with the
+ line,
+
+ This is the Setting for a typical line break in a document.
+
+
+ Specifies that the text wrapping break shall behave as follows:
+
+
If this line is broken into multiple regions (a floating object in
+ the center of the page has text wrapping on both sides:
+
+
If this is the leftmost region of text flow on this line, advance
+ the text to the next position on the line
+
Otherwise, treat this as a text wrapping break of type all.
+
+
+
If this line is not broken into multiple regions, then treat this
+ break as a text wrapping break of type none.
+
+
If the parent paragraph is right to left, then these behaviors are
+ also reversed.
+
+
+
+ Specifies that the text wrapping break shall advance the text to the next
+ line in the WordProcessingML document which spans the full width of the
+ line.
+
+
+ Specifies the possible types of break characters in a WordProcessingML
+ document.
+ The break type determines the next location where text shall be
+ placed After this manual break is applied to the text contents
+
+ @author Gisella Bronzetti
+
+
+ Specifies that the current break shall restart itself on the next page of
+ the document when the document is displayed in page view.
+
+
+ Specifies that the current break shall restart itself on the next column
+ available on the current page when the document is displayed in page
+ view.
+
+ If the current section is not divided into columns, or the column break
+ occurs in the last column on the current page when displayed, then the
+ restart location for text shall be the next page in the document.
+
+
+
+ Specifies that the current break shall restart itself on the next line in
+ the document when the document is displayed in page view.
+ The determine of the next line shall be done subject to the value of the clear
+ attribute on the specified break character.
+
+
+ Extended windows meta file
+
+
+ Windows Meta File
+
+
+ Mac PICT format
+
+
+ JPEG format
+
+
+ PNG format
+
+
+ Device independent bitmap
+
+
+ GIF image format
+
+
+ Tag Image File (.tiff)
+
+
+ Encapsulated Postscript (.eps)
+
+
+ Windows Bitmap (.bmp)
+
+
+ WordPerfect graphics (.wpg)
+
+
+ An IBody represents the different parts of the document which
+ can contain collections of Paragraphs and Tables. It provides a
+ common way to work with these and their contents.
+ Typically, this is something like a XWPFDocument, or one of
+ the parts in it like XWPFHeader, XWPFFooter, XWPFTableCell
+
+
+
+ returns the Part, to which the body belongs, which you need for Adding relationship to other parts
+ Actually it is needed of the class XWPFTableCell. Because you have to know to which part the tableCell
+ belongs.
+ @return the Part, to which the body belongs
+
+
+ Get the PartType of the body, for example
+ DOCUMENT, HEADER, FOOTER, FOOTNOTE,
+ @return the PartType of the body
+
+
+ Returns an Iterator with paragraphs and tables,
+ in the order that they occur in the text.
+
+
+ Returns the paragraph(s) that holds
+ the text of the header or footer.
+
+
+ Return the table(s) that holds the text
+ of the IBodyPart, for complex cases
+ where a paragraph isn't used.
+
+
+ if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer
+ the method will return this paragraph
+ if there is no corresponding {@link XWPFParagraph} the method will return null
+ @param p is instance of CTP and is searching for an XWPFParagraph
+ @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer
+ XWPFParagraph with the correspondig CTP p
+
+
+ if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header
+ the method will return this table
+ if there is no corresponding {@link XWPFTable} the method will return null
+ @param ctTable
+
+
+ Returns the paragraph that of position pos
+
+
+ Returns the table at position pos
+
+
+ inserts a new paragraph at position of the cursor
+ @param cursor
+
+
+ inserts a new Table at the cursor position.
+ @param cursor
+
+
+ inserts a new Table at position pos
+ @param pos
+ @param table
+
+
+ returns the TableCell to which the Table belongs
+ @param cell
+
+
+ Return XWPFDocument
+
+
+ 9 Jan 2010
+ @author Philipp Epp
+
+
+
+
+ Simple interface describing both {@link XWPFParagraph}
+ and {@link XWPFSDT}
+
+
+ Common interface for things that can occur
+ where a run (text with common stylings) can,
+ eg {@link XWPFRun} or {@link XWPFSDT}.
+ More methods to follow shortly!
+
+
+ Experimental interface to offer rudimentary Read-only Processing of
+ of the contentblock of an SDT/ContentControl.
+
+
+
+ WARNING - APIs expected to change rapidly
+
+
+ Interface for anything that can be within an STD:
+ {@link XWPFRun}, {@link XWPFTable}, {@link XWPFParagraph},
+ {@link XWPFSDT} etc
+
+
+ Specifies the logic which shall be used to calculate the line spacing of the
+ parent object when it is displayed in the document.
+
+ @author Gisella Bronzetti
+
+
+ Specifies that the line spacing of the parent object shall be
+ automatically determined by the size of its contents, with no
+ predetermined minimum or maximum size.
+
+
+ Specifies that the height of the line shall be exactly the value
+ specified, regardless of the size of the contents If the contents are too
+ large for the specified height, then they shall be clipped as necessary.
+
+
+ Specifies that the height of the line shall be at least the value
+ specified, but may be expanded to fit its content as needed.
+
+
+ Specifies all types of alignment which are available to be applied to objects in a
+ WordProcessingML document
+
+ @author Yegor Kozlov
+
+
+ * postion of a character in a paragrapho
+ * 1st RunPositon
+ * 2nd TextPosition
+ * 3rd CharacterPosition
+ *
+ *
+
+
+ Specifies all types of vertical alignment which are available to be applied to of all text
+ on each line displayed within a paragraph.
+
+ @author Gisella Bronzetti
+
+
+ Specifies that all text in the parent object shall be
+ aligned to the top of each character when displayed
+
+
+ Specifies that all text in the parent object shall be
+ aligned to the center of each character when displayed.
+
+
+ Specifies that all text in the parent object shall be
+ aligned to the baseline of each character when displayed.
+
+
+ Specifies that all text in the parent object shall be
+ aligned to the bottom of each character when displayed.
+
+
+ Specifies that all text in the parent object shall be
+ aligned automatically when displayed.
+
+
+ saves the begin and end position of a text in a Paragraph
+
+
+
+ The index of the start run
+
+
+
+
+ The index of the start CT_Text
+
+
+
+
+ The index of the start text character
+
+
+
+
+ the index of the end CT_Text
+
+
+
+
+ the index of the end text character
+
+
+
+ Specifies the types of patterns which may be used to create the underline
+ applied beneath the text in a Run.
+
+ @author Gisella Bronzetti
+
+
+ Specifies an underline consisting of a single line beneath all characters
+ in this Run.
+
+
+ Specifies an underline consisting of a single line beneath all non-space
+ characters in the Run. There shall be no underline beneath any space
+ character (breaking or non-breaking).
+
+
+ Specifies an underline consisting of two lines beneath all characters in
+ this run
+
+
+ Specifies an underline consisting of a single thick line beneath all
+ characters in this Run.
+
+
+ Specifies an underline consisting of a series of dot characters beneath
+ all characters in this Run.
+
+
+ Specifies an underline consisting of a series of thick dot characters
+ beneath all characters in this Run.
+
+
+ Specifies an underline consisting of a dashed line beneath all characters
+ in this Run.
+
+
+ Specifies an underline consisting of a series of thick dashes beneath all
+ characters in this Run.
+
+
+ Specifies an underline consisting of long dashed characters beneath all
+ characters in this Run.
+
+
+ Specifies an underline consisting of thick long dashed characters beneath
+ all characters in this Run.
+
+
+ Specifies an underline consisting of a series of dash, dot characters
+ beneath all characters in this Run.
+
+
+ Specifies an underline consisting of a series of thick dash, dot
+ characters beneath all characters in this Run.
+
+
+ Specifies an underline consisting of a series of dash, dot, dot
+ characters beneath all characters in this Run.
+
+
+ Specifies an underline consisting of a series of thick dash, dot, dot
+ characters beneath all characters in this Run.
+
+
+ Specifies an underline consisting of a single wavy line beneath all
+ characters in this Run.
+
+
+ Specifies an underline consisting of a single thick wavy line beneath all
+ characters in this Run.
+
+
+ Specifies an underline consisting of a pair of wavy lines beneath all
+ characters in this Run.
+
+
+ Specifies no underline beneath this Run.
+
+
+ Specifies possible values for the alignment of the contents of this run in
+ relation to the default appearance of the Run's text. This allows the text to
+ be repositioned as subscript or superscript without altering the font size of
+ the run properties.
+
+ @author Gisella Bronzetti
+
+
+ Specifies that the text in the parent run shall be located at the
+ baseline and presented in the same size as surrounding text.
+
+
+ Specifies that this text should be subscript. This Setting shall lower
+ the text in this run below the baseline and change it to a smaller size,
+ if a smaller size is available.
+
+
+ Specifies that this text should be superscript. This Setting shall raise
+ the text in this run above the baseline and change it to a smaller size,
+ if a smaller size is available.
+
+
+ @author Philipp Epp
+
+
+
+
+ Abstract Numbering Definition Type
+
+
+
+
+ Numbering Definition Type
+
+
+
+
+ Single Level Numbering Definition
+
+
+
+
+ Multilevel Numbering Definition
+
+
+
+
+ Hybrid Multilevel Numbering Definition
+
+
+
+
+ Numbering Format
+
+
+
+
+ Decimal Numbers
+
+
+
+
+ Uppercase Roman Numerals
+
+
+
+
+ Lowercase Roman Numerals
+
+
+
+
+ Uppercase Latin Alphabet
+
+
+
+
+ Lowercase Latin Alphabet
+
+
+
+
+ Ordinal
+
+
+
+
+ Cardinal Text
+
+
+
+
+ Ordinal Text
+
+
+
+
+ Hexadecimal Numbering
+
+
+
+
+ Chicago Manual of Style
+
+
+
+
+ Ideographs
+
+
+
+
+ Japanese Counting System
+
+
+
+
+ AIUEO Order Hiragana
+
+
+
+
+ Iroha Ordered Katakana
+
+
+
+
+ Double Byte Arabic Numerals
+
+
+
+
+ Single Byte Arabic Numerals
+
+
+
+
+ Japanese Legal Numbering
+
+
+
+
+ Japanese Digital Ten Thousand Counting System
+
+
+
+
+ Decimal Numbers Enclosed in a Circle
+
+
+
+
+ Double Byte Arabic Numerals Alternate
+
+
+
+
+ Full-Width AIUEO Order Hiragana
+
+
+
+
+ Full-Width Iroha Ordered Katakana
+
+
+
+
+ Initial Zero Arabic Numerals
+
+
+
+
+ Bullet
+
+
+
+
+ Korean Ganada Numbering
+
+
+
+
+ Korean Chosung Numbering
+
+
+
+
+ Decimal Numbers Followed by a Period
+
+
+
+
+ Decimal Numbers Enclosed in Parenthesis
+
+
+
+
+ Decimal Numbers Enclosed in a Circle
+
+
+
+
+ Ideographs Enclosed in a Circle
+
+
+
+
+ Traditional Ideograph Format
+
+
+
+
+ Zodiac Ideograph Format
+
+
+
+
+ Traditional Zodiac Ideograph Format
+
+
+
+
+ Taiwanese Counting System
+
+
+
+
+ Traditional Legal Ideograph Format
+
+
+
+
+ Taiwanese Counting Thousand System
+
+
+
+
+ Taiwanese Digital Counting System
+
+
+
+
+ Chinese Counting System
+
+
+
+
+ Chinese Legal Simplified Format
+
+
+
+
+ Chinese Counting Thousand System
+
+
+
+
+ Korean Digital Counting System
+
+
+
+
+ Korean Counting System
+
+
+
+
+ Korean Legal Numbering
+
+
+
+
+ Korean Digital Counting System Alternate
+
+
+
+
+ Vietnamese Numerals
+
+
+
+
+ Lowercase Russian Alphabet
+
+
+
+
+ Uppercase Russian Alphabet
+
+
+
+
+ No Numbering
+
+
+
+
+ Number With Dashes
+
+
+
+
+ Hebrew Numerals
+
+
+
+
+ Hebrew Alphabet
+
+
+
+
+ Arabic Alphabet
+
+
+
+
+ Arabic Abjad Numerals
+
+
+
+
+ Hindi Vowels
+
+
+
+
+ Hindi Consonants
+
+
+
+
+ Hindi Numbers
+
+
+
+
+ Hindi Counting System
+
+
+
+
+ Thai Letters
+
+
+
+
+ Thai Numerals
+
+
+
+
+ Thai Counting System
+
+
+
+ * Sketch of XWPF comment class
+ *
+ * @author Yury Batrakov (batrakov at gmail.com)
+ *
+
+
+ Default Paragraph style, from which other styles will override
+ TODO Share logic with {@link XWPFParagraph} which also uses CTPPr
+
+
+ Default Character Run style, from which other styles will override
+ TODO Share logic with {@link XWPFRun} which also uses CTRPr
+
+
+
High(ish) level class for working with .docx files.
+
+
This class tries to hide some of the complexity
+ of the underlying file format, but as it's not a
+ mature and stable API yet, certain parts of the
+ XML structure come through. You'll therefore almost
+ certainly need to refer to the OOXML specifications
+ from
+ http://www.ecma-international.org/publications/standards/Ecma-376.htm
+ at some point in your use.
+
+
+ Keeps track on all id-values used in this document and included parts, like headers, footers, etc.
+
+
+ Handles the joy of different headers/footers for different pages
+
+
+ Create a new WordProcessingML package and Setup the default minimal content
+
+
+ Create a new CT_Document with all values Set to default
+
+
+ Returns the low level document base object
+
+
+ returns an Iterator with paragraphs and tables
+ @see NPOI.XWPF.UserModel.IBody#getBodyElements()
+
+
+ @see NPOI.XWPF.UserModel.IBody#getParagraphs()
+
+
+ @see NPOI.XWPF.UserModel.IBody#getTables()
+
+
+ @see NPOI.XWPF.UserModel.IBody#getTableArray(int)
+
+
+
+ @return the list of footers
+
+
+
+ @return the list of headers
+
+
+ Get the document part that's defined as the
+ given relationship of the core document.
+
+
+ Returns the policy on headers and footers, which
+ also provides a way to Get at them.
+
+
+ Returns the styles object used
+
+
+ Get the document's embedded files.
+
+
+ Finds that for example the 2nd entry in the body list is the 1st paragraph
+
+
+ Look up the paragraph at the specified position in the body elemnts list
+ and return this paragraphs position in the paragraphs list
+
+ @param pos
+ The position of the relevant paragraph in the body elements
+ list
+ @return the position of the paragraph in the paragraphs list, if there is
+ a paragraph at the position in the bodyelements list. Else it
+ will return -1
+
+
+
+ Get with the position of a table in the bodyelement array list
+ the position of this table in the table array list
+ @param pos position of the table in the bodyelement array list
+ @return if there is a table at the position in the bodyelement array list,
+ else it will return null.
+
+
+ Add a new paragraph at position of the cursor. The cursor must be on the
+ {@link org.apache.xmlbeans.XmlCursor.TokenType#START} tag of an subelement
+ of the documents body. When this method is done, the cursor passed as
+ parameter points to the {@link org.apache.xmlbeans.XmlCursor.TokenType#END}
+ of the newly inserted paragraph.
+
+ @param cursor
+ @return the {@link XWPFParagraph} object representing the newly inserted
+ CTP object
+
+
+ verifies that cursor is on the right position
+ @param cursor
+
+
+ Get the position of the paragraph, within the list
+ of all the body elements.
+ @param p The paragraph to find
+ @return The location, or -1 if the paragraph couldn't be found
+
+
+ Get the position of the table, within the list of
+ all the body elements.
+ @param t The table to find
+ @return The location, or -1 if the table couldn't be found
+
+
+ Commit and saves the document
+
+
+ Gets the index of the relation we're trying to create
+ @param relation
+ @return i
+
+
+ Appends a new paragraph to this document
+ @return a new paragraph
+
+
+ Creates an empty numbering if one does not already exist and Sets the numbering member
+ @return numbering
+
+
+ Creates an empty styles for the document if one does not already exist
+ @return styles
+
+
+ Creates an empty footnotes element for the document if one does not already exist
+ @return footnotes
+
+
+ remove a BodyElement from bodyElements array list
+ @param pos
+ @return true if removing was successfully, else return false
+
+
+ copies content of a paragraph to a existing paragraph in the list paragraphs at position pos
+ @param paragraph
+ @param pos
+
+
+ @return the LastParagraph of the document
+
+
+ Create an empty table with one row and one column as default.
+ @return a new table
+
+
+ Create an empty table with a number of rows and cols specified
+ @param rows
+ @param cols
+ @return table
+
+
+
+
+
+ Replace content of table in array tables at position pos with a
+ @param pos
+ @param table
+
+
+ Verifies that the documentProtection tag in Settings.xml file
+ specifies that the protection is enforced (w:enforcement="1")
+ and that the kind of protection is ReadOnly (w:edit="readOnly")
+
+ sample snippet from Settings.xml
+
+
+ @return true if documentProtection is enforced with option ReadOnly
+
+
+ Verifies that the documentProtection tag in Settings.xml file
+ specifies that the protection is enforced (w:enforcement="1")
+ and that the kind of protection is forms (w:edit="forms")
+
+ sample snippet from Settings.xml
+
+
+ @return true if documentProtection is enforced with option forms
+
+
+ Verifies that the documentProtection tag in Settings.xml file
+ specifies that the protection is enforced (w:enforcement="1")
+ and that the kind of protection is comments (w:edit="comments")
+
+ sample snippet from Settings.xml
+
+
+ @return true if documentProtection is enforced with option comments
+
+
+ Verifies that the documentProtection tag in Settings.xml file
+ specifies that the protection is enforced (w:enforcement="1")
+ and that the kind of protection is trackedChanges (w:edit="trackedChanges")
+
+ sample snippet from Settings.xml
+
+
+ @return true if documentProtection is enforced with option trackedChanges
+
+
+ Enforces the ReadOnly protection.
+ In the documentProtection tag inside Settings.xml file,
+ it Sets the value of enforcement to "1" (w:enforcement="1")
+ and the value of edit to ReadOnly (w:edit="readOnly")
+
+ sample snippet from Settings.xml
+
+
+
+ Enforce the Filling Forms protection.
+ In the documentProtection tag inside Settings.xml file,
+ it Sets the value of enforcement to "1" (w:enforcement="1")
+ and the value of edit to forms (w:edit="forms")
+
+ sample snippet from Settings.xml
+
+
+
+ Enforce the Comments protection.
+ In the documentProtection tag inside Settings.xml file,
+ it Sets the value of enforcement to "1" (w:enforcement="1")
+ and the value of edit to comments (w:edit="comments")
+
+ sample snippet from Settings.xml
+
+
+
+ Enforce the Tracked Changes protection.
+ In the documentProtection tag inside Settings.xml file,
+ it Sets the value of enforcement to "1" (w:enforcement="1")
+ and the value of edit to trackedChanges (w:edit="trackedChanges")
+
+ sample snippet from Settings.xml
+
+
+
+ Remove protection enforcement.
+ In the documentProtection tag inside Settings.xml file
+ it Sets the value of enforcement to "0" (w:enforcement="0")
+
+
+ Enforces fields update on document open (in Word).
+ In the settings.xml file
+ sets the updateSettings value to true (w:updateSettings w:val="true")
+
+ NOTICES:
+
+
Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?"
+ (if "Update automatic links at open" is enabled)
+
Flag is removed after saving with changes in Word
+
+
+
+ Check if revision tracking is turned on.
+
+ @return true if revision tracking is turned on
+
+
+ inserts an existing XWPFTable to the arrays bodyElements and tables
+ @param pos
+ @param table
+
+
+ Returns all Pictures, which are referenced from the document itself.
+ @return a {@link List} of {@link XWPFPictureData}. The returned {@link List} is unmodifiable. Use #a
+
+
+ @return all Pictures in this package
+
+
+ Get the next free ImageNumber
+ @param format
+ @return the next free ImageNumber
+ @throws InvalidFormatException
+
+
+ returns the PictureData by blipID
+ @param blipID
+ @return XWPFPictureData of a specificID
+
+
+ GetNumbering
+ @return numbering
+
+
+ Get Styles
+ @return styles for this document
+
+
+ Get the paragraph with the CTP class p
+
+ @param p
+ @return the paragraph with the CTP class p
+
+
+ Get a table by its CTTbl-Object
+ @param ctTbl
+ @see NPOI.XWPF.UserModel.IBody#getTable(org.Openxmlformats.schemas.wordProcessingml.x2006.main.CTTbl)
+ @return a table by its CTTbl-Object or null
+
+
+ Returns the paragraph that of position pos
+ @see NPOI.XWPF.UserModel.IBody#getParagraphArray(int)
+
+
+ returns the Part, to which the body belongs, which you need for Adding relationship to other parts
+ Actually it is needed of the class XWPFTableCell. Because you have to know to which part the tableCell
+ belongs.
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ Get the PartType of the body, for example
+ DOCUMENT, HEADER, FOOTER, FOOTNOTE,
+
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+ Get the TableCell which belongs to the TableCell
+ @param cell
+
+
+ @author Yegor Kozlov
+
+
+ Sketch of XWPF footer class
+
+
+ save and Commit footer
+
+
+ Get the PartType of the body
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+
+
+
+ position in table array
+ The table at position pos
+
+
+
+ inserts an existing XWPFTable to the arrays bodyElements and tables
+
+
+
+
+
+ if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header
+ the method will return this table
+ if there is no corresponding {@link XWPFTable} the method will return null
+ @param ctTable
+ @see NPOI.XWPF.UserModel.IBody#getTable(CTTbl ctTable)
+
+
+ if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer
+ the method will return this paragraph
+ if there is no corresponding {@link XWPFParagraph} the method will return null
+ @param p is instance of CTP and is searching for an XWPFParagraph
+ @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer
+ XWPFParagraph with the correspondig CTP p
+ @see NPOI.XWPF.UserModel.IBody#getParagraph(CTP p)
+
+
+
+ Returns the paragraph that holds the text of the header or footer.
+
+
+
+
+
+
+ Get the TableCell which belongs to the TableCell
+
+
+
+
+
+ verifies that cursor is on the right position
+ @param cursor
+
+
+
+ @param cursor
+ @return the inserted table
+ @see NPOI.XWPF.UserModel.IBody#insertNewTbl(XmlCursor cursor)
+
+
+ add a new paragraph at position of the cursor
+ @param cursor
+ @return the inserted paragraph
+ @see NPOI.XWPF.UserModel.IBody#insertNewParagraph(XmlCursor cursor)
+
+
+ add a new table to the end of the footnote
+ @param table
+ @return the Added XWPFTable
+
+
+ add a new paragraph to the end of the footnote
+ @param paragraph
+ @return the Added XWPFParagraph
+
+
+ @see NPOI.XWPF.UserModel.IBody#getXWPFDocument()
+
+
+ returns the Part, to which the body belongs, which you need for Adding relationship to other parts
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ Get the PartType of the body
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+ Looks After the collection of Footnotes for a document
+
+ @author Mike McEuen (mceuen@hp.com)
+
+
+ Construct XWPFFootnotes from a package part
+
+ @param part the package part holding the data of the footnotes,
+ @param rel the package relationship of type "http://schemas.Openxmlformats.org/officeDocument/2006/relationships/footnotes"
+
+
+ Construct XWPFFootnotes from scratch for a new document.
+
+
+ Read document
+
+
+ Sets the ctFootnotes
+ @param footnotes
+
+
+ add an XWPFFootnote to the document
+ @param footnote
+ @throws IOException
+
+
+ add a footnote to the document
+ @param note
+ @throws IOException
+
+
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ Sketch of XWPF header class
+
+
+
+ Save and commit footer
+
+
+
+
+ Read the document
+
+
+
+
+ Get the PartType of the body
+
+
+
+ Parent of XWPF headers and footers
+
+
+ Returns the paragraph(s) that holds
+ the text of the header or footer.
+ Normally there is only the one paragraph, but
+ there could be more in certain cases, or
+ a table.
+
+
+ Return the table(s) that holds the text
+ of the header or footer, for complex cases
+ where a paragraph isn't used.
+ Normally there's just one paragraph, but some
+ complex headers/footers have a table or two
+ in Addition.
+
+
+ Returns the textual content of the header/footer,
+ by flattening out the text of its paragraph(s)
+
+
+ Set a new headerFooter
+
+
+ if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header
+ the method will return this table
+ if there is no corresponding {@link XWPFTable} the method will return null
+ @param ctTable
+
+
+ if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer
+ the method will return this paragraph
+ if there is no corresponding {@link XWPFParagraph} the method will return null
+ @param p is instance of CTP and is searching for an XWPFParagraph
+ @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer
+ XWPFParagraph with the correspondig CTP p
+
+
+ Returns the paragraph that holds
+ the text of the header or footer.
+
+
+ Get a List of all Paragraphs
+ @return a list of {@link XWPFParagraph}
+
+
+ Get all Pictures in this package
+ @return all Pictures in this package
+
+
+ Adds a picture to the document.
+
+ @param pictureData The picture data
+ @param format The format of the picture.
+
+ @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} .
+ @throws InvalidFormatException
+
+
+ Adds a picture to the document.
+
+ @param is The stream to read image from
+ @param format The format of the picture.
+
+ @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} .
+ @throws InvalidFormatException
+ @
+
+
+ returns the PictureData by blipID
+ @param blipID
+ @return XWPFPictureData of a specificID
+ @throws Exception
+
+
+ verifies that cursor is on the right position
+ @param cursor
+
+
+ Returns the table at position pos
+ @see NPOI.XWPF.UserModel.IBody#getTableArray(int)
+
+
+ inserts an existing XWPFTable to the arrays bodyElements and tables
+ @param pos
+ @param table
+
+
+ Get the TableCell which belongs to the TableCell
+ @param cell
+
+
+ returns the Part, to which the body belongs, which you need for Adding relationship to other parts
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ * Sketch of XWPF hyperlink class
+ *
+ * @author Yury Batrakov (batrakov at gmail.com)
+ *
+
+
+ A run of text with a Hyperlink applied to it.
+ Any given Hyperlink may be made up of multiple of these.
+
+
+ Returns the ID of the hyperlink, if one is Set.
+
+
+ If this Hyperlink is an external reference hyperlink,
+ return the object for it.
+
+
+ checks whether specific LatentStyleID is a latentStyle
+
+
+ @author Philipp Epp
+
+
+
+ @author Philipp Epp
+
+
+
+ create a new styles object with an existing document
+
+
+ create a new XWPFNumbering object for use in a new document
+
+
+ read numbering form an existing package
+
+
+ save and Commit numbering
+
+
+ Sets the ctNumbering
+ @param numbering
+
+
+ Checks whether number with numID exists
+ @param numID
+ @return bool true if num exist, false if num not exist
+
+
+ add a new number to the numbering document
+ @param num
+
+
+ Add a new num with an abstractNumID
+ @return return NumId of the Added num
+
+
+ Add a new num with an abstractNumID and a numID
+ @param abstractNumID
+ @param numID
+
+
+ Get Num by NumID
+ @param numID
+ @return abstractNum with NumId if no Num exists with that NumID
+ null will be returned
+
+
+ Get AbstractNum by abstractNumID
+ @param abstractNumID
+ @return abstractNum with abstractNumId if no abstractNum exists with that abstractNumID
+ null will be returned
+
+
+ Compare AbstractNum with abstractNums of this numbering document.
+ If the content of abstractNum Equals with an abstractNum of the List in numbering
+ the Bigint Value of it will be returned.
+ If no equal abstractNum is existing null will be returned
+
+ @param abstractNum
+ @return Bigint
+
+
+ add a new AbstractNum and return its AbstractNumID
+ @param abstractNum
+
+
+
+ Add a new AbstractNum
+
+
+ @author antony liu
+
+
+ remove an existing abstractNum
+ @param abstractNumID
+ @return true if abstractNum with abstractNumID exists in NumberingArray,
+ false if abstractNum with abstractNumID not exists
+
+
+ return the abstractNumID
+ If the AbstractNumID not exists
+ return null
+ @param numID
+ @return abstractNumID
+
+
+
A Paragraph within a Document, Table, Header etc.
+
+
A paragraph has a lot of styling information, but the
+ actual text (possibly along with more styling) is held on
+ the child {@link XWPFRun}s.
+
+
+ For access to the document's hyperlink, comments, tables etc
+
+
+ Identifies (in order) the parts of the paragraph /
+ sub-paragraph that correspond to character text
+ runs, and builds the appropriate runs for these.
+
+
+
+ Return the textual content of the paragraph, including text from pictures
+ and std element in it.
+
+
+ Return styleID of the paragraph if style exist for this paragraph
+ if not, null will be returned
+ @return styleID as String
+
+
+ If style exist for this paragraph
+ NumId of the paragraph will be returned.
+ If style not exist null will be returned
+ @return NumID as Bigint
+
+
+ Returns Ilvl of the numeric style for this paragraph.
+ Returns null if this paragraph does not have numeric style.
+ @return Ilvl as BigInteger
+
+
+ Returns numbering format for this paragraph, eg bullet or
+ lowerLetter.
+ Returns null if this paragraph does not have numeric style.
+
+
+ Returns the text that should be used around the paragraph level numbers.
+
+ @return a string (e.g. "%1.") or null if the value is not found.
+
+
+ Gets the numstartOverride for the paragraph numbering for this paragraph.
+ @return returns the overridden start number or null if there is no override for this paragraph.
+
+
+ SetNumID of Paragraph
+ @param numPos
+
+
+
+ Set NumID and level of Paragraph
+
+
+
+
+
+ Returns the text of the paragraph, but not of any objects in the
+ paragraph
+
+
+ Returns any text from any suitable pictures in the paragraph
+
+
+ Returns the footnote text of the paragraph
+
+ @return the footnote text or empty string if the paragraph does not have footnotes
+
+
+ Returns the paragraph alignment which shall be applied to text in this
+ paragraph.
+
+ If this element is not Set on a given paragraph, its value is determined
+ by the Setting previously Set at any level of the style hierarchy (i.e.
+ that previous Setting remains unChanged). If this Setting is never
+ specified in the style hierarchy, then no alignment is applied to the
+ paragraph.
+
+
+ @return the paragraph alignment of this paragraph.
+
+
+ @return The raw alignment value, {@link #getAlignment()} is suggested
+
+
+ Returns the text vertical alignment which shall be applied to text in
+ this paragraph.
+
+ If the line height (before any Added spacing) is larger than one or more
+ characters on the line, all characters will be aligned to each other as
+ specified by this element.
+
+
+ If this element is omitted on a given paragraph, its value is determined
+ by the Setting previously Set at any level of the style hierarchy (i.e.
+ that previous Setting remains unChanged). If this Setting is never
+ specified in the style hierarchy, then the vertical alignment of all
+ characters on the line shall be automatically determined by the consumer.
+
+
+ @return the vertical alignment of this paragraph.
+
+
+
+ the top border for the paragraph
+
+
+
+
+ Specifies the border which shall be displayed below a Set of
+ paragraphs which have the same Set of paragraph border Settings.
+
+ the bottom border for the paragraph
+
+
+
+ Specifies the border which shall be displayed on the left side of the
+ page around the specified paragraph.
+
+ the left border for the paragraph
+
+
+ Specifies the border which shall be displayed on the right side of the
+ page around the specified paragraph.
+
+ @return ParagraphBorder - the right border for the paragraph
+ @see #setBorderRight(Borders)
+ @see Borders for a list of all possible borders
+
+
+ Specifies the border which shall be displayed between each paragraph in a
+ Set of paragraphs which have the same Set of paragraph border Settings.
+
+ @return ParagraphBorder - the between border for the paragraph
+ @see #setBorderBetween(Borders)
+ @see Borders for a list of all possible borders
+
+
+ Specifies that when rendering this document in a paginated
+ view, the contents of this paragraph are rendered on the start of a new
+ page in the document.
+
+ If this element is omitted on a given paragraph,
+ its value is determined by the Setting previously Set at any level of the
+ style hierarchy (i.e. that previous Setting remains unChanged). If this
+ Setting is never specified in the style hierarchy, then this property
+ shall not be applied. Since the paragraph is specified to start on a new
+ page, it begins page two even though it could have fit on page one.
+
+
+ @return bool - if page break is Set
+
+
+ Specifies the spacing that should be Added After the last line in this
+ paragraph in the document in absolute units.
+
+ @return int - value representing the spacing After the paragraph
+
+
+ Specifies the spacing that should be Added After the last line in this
+ paragraph in the document in absolute units.
+
+ @return bigint - value representing the spacing After the paragraph
+ @see #setSpacingAfterLines(int)
+
+
+ Specifies the spacing that should be Added above the first line in this
+ paragraph in the document in absolute units.
+
+ @return the spacing that should be Added above the first line
+ @see #setSpacingBefore(int)
+
+
+ Specifies the spacing that should be Added before the first line in this paragraph in the
+ document in line units.
+ 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(int)
+
+
+
+ Specifies how the spacing between lines is calculated as stored in the
+ line attribute. If this attribute is omitted, then it shall be assumed to
+ be of a value auto if a line attribute value is present.
+
+
+
+ Specifies the indentation which shall be placed between the left text
+ margin for this paragraph and the left edge of that paragraph's content
+ in a left to right paragraph, and the right text margin and the right
+ edge of that paragraph's text in a right to left paragraph
+
+ If this attribute is omitted, its value shall be assumed to be zero.
+ Negative values are defined such that the text is Moved past the text margin,
+ positive values Move the text inside the text margin.
+
+
+ @return indentation or null if indentation is not Set
+
+
+ Specifies the indentation which shall be placed between the right text
+ margin for this paragraph and the right edge of that paragraph's content
+ in a left to right paragraph, and the right text margin and the right
+ edge of that paragraph's text in a right to left paragraph
+
+ If this attribute is omitted, its value shall be assumed to be zero.
+ Negative values are defined such that the text is Moved past the text margin,
+ positive values Move the text inside the text margin.
+
+
+ @return indentation or null if indentation is not Set
+
+
+ Specifies the indentation which shall be Removed from the first line of
+ the parent paragraph, by moving the indentation on the first line back
+ towards the beginning of the direction of text flow.
+ This indentation is
+ specified relative to the paragraph indentation which is specified for
+ all other lines in the parent paragraph.
+ The firstLine and hanging
+ attributes are mutually exclusive, if both are specified, then the
+ firstLine value is ignored.
+
+ @return indentation or null if indentation is not Set
+
+
+ Specifies the Additional indentation which shall be applied to the first
+ line of the parent paragraph. This Additional indentation is specified
+ relative to the paragraph indentation which is specified for all other
+ lines in the parent paragraph.
+ The firstLine and hanging attributes are
+ mutually exclusive, if both are specified, then the firstLine value is
+ ignored.
+ If the firstLineChars attribute is also specified, then this
+ value is ignored.
+ If this attribute is omitted, then its value shall be
+ assumed to be zero (if needed).
+
+ @return indentation or null if indentation is not Set
+
+
+ This element specifies whether a consumer shall break Latin text which
+ exceeds the text extents of a line by breaking the word across two lines
+ (breaking on the character level) or by moving the word to the following
+ line (breaking on the word level).
+
+ @return bool
+
+
+ @return the style of the paragraph
+
+
+ Get a copy of the currently used CTPBrd, if none is used, return
+ a new instance.
+
+
+ Get a copy of the currently used CTSpacing, if none is used,
+ return a new instance.
+
+
+ Get a copy of the currently used CTPInd, if none is used, return
+ a new instance.
+
+
+ Get a copy of the currently used CTPPr, if none is used, return
+ a new instance.
+
+
+ add a new run at the end of the position of
+ the content of parameter run
+ @param run
+
+
+
+ Replace text inside each run (cross run is not supported yet)
+
+ target text
+ replacement text
+
+
+
+ this methods parse the paragraph and search for the string searched.
+ If it finds the string, it will return true and the position of the String will be saved in the parameter startPos.
+
+
+
+
+
+
+ Appends a new run to this paragraph
+
+ @return a new text run
+
+
+ Appends a new OMath to this paragraph
+
+ @return a new text run
+
+
+ insert a new Run in RunArray
+ @param pos
+ @return the inserted run
+
+
+ Get a Text
+ @param segment
+
+
+ Removes a Run at the position pos in the paragraph
+ @param pos
+ @return true if the run was Removed
+
+
+ returns the type of the BodyElement Paragraph
+ @see NPOI.XWPF.UserModel.IBodyElement#getElementType()
+
+
+ returns the part of the bodyElement
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ returns the partType of the bodyPart which owns the bodyElement
+
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+ Adds a new Run to the Paragraph
+
+ @param r
+
+
+ return the XWPFRun-Element which owns the CTR Run-Element
+
+ @param r
+
+
+ @author Philipp Epp
+
+
+ Link Picture with PictureData
+ @param rel
+
+
+ Return the underlying CTPicture bean that holds all properties for this picture
+
+ @return the underlying CTPicture bean
+
+
+ Get the PictureData of the Picture, if present.
+ Note - not all kinds of picture have data
+
+
+
+ Raw picture data, normally attached to a WordProcessingML Drawing. As a rule, pictures are stored in the /word/media/ part of a WordProcessingML package.
+
+
+ @author Philipp Epp
+
+
+
+ Relationships for each known picture type
+
+
+ Create a new XWPFGraphicData node
+
+
+
+ Construct XWPFPictureData from a package part
+
+ @param part the package part holding the Drawing data,
+ @param rel the package relationship holding this Drawing,
+ the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/image
+
+
+ Gets the picture data as a byte array.
+
+ Note, that this call might be expensive since all the picture data is copied into a temporary byte array.
+ You can grab the picture data directly from the underlying package part as follows:
+
+
+ InputStream is1 = GetPackagePart().InputStream;
+
+
+ @return the Picture data.
+
+
+ Returns the file name of the image, eg image7.jpg . The original filename
+ isn't always available, but if it can be found it's likely to be in the
+ CTDrawing
+
+
+ Suggests a file extension for this image.
+ @return the file extension.
+
+
+ Return an integer constant that specifies type of this picture
+
+ @return an integer constant that specifies type of this picture
+ @see NPOI.XWPF.UserModel.PictureTypeEMF
+ @see NPOI.XWPF.UserModel.PictureTypeWMF
+ @see NPOI.XWPF.UserModel.PictureTypePICT
+ @see NPOI.XWPF.UserModel.PictureTypeJPEG
+ @see NPOI.XWPF.UserModel.PictureTypePNG
+ @see NPOI.XWPF.UserModel.PictureTypeDIB
+
+
+ *PictureData objects store the actual content in the part directly without keeping a
+ copy like all others therefore we need to handle them differently.
+
+
+ @author Yegor Kozlov
+
+
+ A map to lookup POIXMLRelation by its relation type
+
+
+ Supported image formats
+
+
+ Get POIXMLRelation by relation type
+
+ @param rel relation type, for example,
+ http://schemas.openxmlformats.org/officeDocument/2006/relationships/image
+ @return registered POIXMLRelation or null if not found
+
+
+ @see [MS-OI29500] Run Fonts
+
+
+ XWPFrun.object defines a region of text with a common Set of properties
+
+ @author Yegor Kozlov
+ @author Gregg Morris (gregg dot morris at gmail dot com) - added getColor(), setColor()
+
+
+ @param r the CT_R bean which holds the run.attributes
+ @param p the parent paragraph
+
+
+ @deprecated Use {@link XWPFRun#XWPFRun(CTR, IRunBody)}
+
+
+ Get the currently used CT_R object
+ @return CT_R object
+
+
+ Get the currently referenced paragraph/SDT object
+ @return current parent
+
+
+ Get the currently referenced paragraph, or null if a SDT object
+ @deprecated use {@link XWPFRun#getParent()} instead
+
+
+ @return The {@link XWPFDocument} instance, this run.belongs to, or
+ null if parent structure (paragraph > document) is not properly Set.
+
+
+ For isBold, isItalic etc
+
+
+ Whether the bold property shall be applied to all non-complex script
+ characters in the contents of this run.when displayed in a document.
+
+ This formatting property is a toggle property, which specifies that its
+ behavior differs between its use within a style defInition and its use as
+ direct formatting. When used as part of a style defInition, Setting this
+ property shall toggle the current state of that property as specified up
+ to this point in the hierarchy (i.e. applied to not applied, and vice
+ versa). Setting it to false (or an equivalent) shall
+ result in the current Setting remaining unChanged. However, when used as
+ direct formatting, Setting this property to true or false shall Set the
+ absolute state of the resulting property.
+
+
+ If this element is not present, the default value is to leave the
+ formatting applied at previous level in the style hierarchy. If this
+ element is never applied in the style hierarchy, then bold shall not be
+ applied to non-complex script characters.
+
+
+ @param value true if the bold property is applied to
+ this run
+
+
+ Get text color. The returned value is a string in the hex form "RRGGBB".
+
+
+ Set text color.
+ @param rgbStr - the desired color, in the hex form "RRGGBB".
+
+
+ Return the string content of this text run
+
+ @return the text of this text run.or null if not Set
+
+
+ Returns text embedded in pictures
+
+
+
+ Sets the text of this text run
+
+ the literal text which shall be displayed in the document
+
+
+
+ Sets the text of this text run.in the
+
+ the literal text which shall be displayed in the document
+ position in the text array (NB: 0 based)
+
+
+ Whether the italic property should be applied to all non-complex script
+ characters in the contents of this run.when displayed in a document.
+
+ @return true if the italic property is applied
+
+
+ Specifies that the contents of this run.should be displayed along with an
+ underline appearing directly below the character heigh
+
+ @return the Underline pattern Applyed to this run
+ @see UnderlinePatterns
+
+
+
+ insert text at start index in the run
+
+ insert text
+ start index of the insertion in the run text
+
+
+ Specifies that the contents of this run.should be displayed along with an
+ underline appearing directly below the character heigh
+ If this element is not present, the default value is to leave the
+ formatting applied at previous level in the style hierarchy. If this
+ element is never applied in the style hierarchy, then an underline shall
+ not be applied to the contents of this run.
+
+ @param value -
+ underline type
+ @see UnderlinePatterns : all possible patterns that could be applied
+
+
+ Specifies that the contents of this run.shall be displayed with a single
+ horizontal line through the center of the line.
+
+ @return true if the strike property is applied
+
+
+
+ Specifies that the contents of this run shall be displayed with a double
+ horizontal line through the center of the line.
+
+ @return true if the double strike property is applied
+
+
+ Specifies the alignment which shall be applied to the contents of this
+ run.in relation to the default appearance of the run.s text.
+ This allows the text to be repositioned as subscript or superscript without
+ altering the font size of the run.properties.
+
+ @return VerticalAlign
+ @see VerticalAlign all possible value that could be Applyed to this run
+
+
+ Specifies the fonts which shall be used to display the text contents of
+ this run. Specifies a font which shall be used to format all characters
+ in the ASCII range (0 - 127) within the parent run
+
+ @return a string representing the font family
+
+
+ Gets the font family for the specified font char range.
+ If fcr is null, the font char range "ascii" is used
+
+ @param fcr the font char range, defaults to "ansi"
+ @return a string representing the font famil
+
+
+ Specifies the fonts which shall be used to display the text contents of
+ this run. The default handling for fcr == null is to overwrite the
+ ascii font char range with the given font family and also set all not
+ specified font ranges
+
+ @param fontFamily
+ @param fcr FontCharRange or null for default handling
+
+
+ Specifies the font size which shall be applied to all non complex script
+ characters in the contents of this run.when displayed.
+
+ @return value representing the font size
+
+
+ This element specifies the amount by which text shall be raised or
+ lowered for this run.in relation to the default baseline of the
+ surrounding non-positioned text. This allows the text to be repositioned
+ without altering the font size of the contents.
+
+ @return a big integer representing the amount of text shall be "moved"
+
+
+ This element specifies the amount by which text shall be raised or
+ lowered for this run.in relation to the default baseline of the
+ surrounding non-positioned text. This allows the text to be repositioned
+ without altering the font size of the contents.
+
+ If the val attribute is positive, then the parent run.shall be raised
+ above the baseline of the surrounding text by the specified number of
+ half-points. If the val attribute is negative, then the parent run.shall
+ be lowered below the baseline of the surrounding text by the specified
+ number of half-points.
+ *
+ If this element is not present, the default value is to leave the
+ formatting applied at previous level in the style hierarchy. If this
+ element is never applied in the style hierarchy, then the text shall not
+ be raised or lowered relative to the default baseline location for the
+ contents of this run.
+
+
+
+
+
+ Specifies that a break shall be placed at the current location in the run
+ content.
+ 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()
+
+
+ Specifies that a break shall be placed at the current location in the run
+ content.
+ 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.
+
+ The behavior of this break character (the
+ location where text shall be restarted After this break) shall be
+ determined by its type values.
+
+ @see BreakType
+
+
+ Specifies that a break shall be placed at the current location in the run
+ content. 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.
+
+ The behavior of this break character (the
+ location where text shall be restarted After this break) shall be
+ determined by its type (in this case is BreakType.TEXT_WRAPPING as default) and clear attribute values.
+
+ @see BreakClear
+
+
+ Specifies that a tab shall be placed at the current location in
+ the run content.
+
+
+ Specifies that a carriage return shall be placed at the
+ current location in the run.content.
+ A carriage return is used to end the current line of text in
+ WordProcess.
+ The behavior of a carriage return in run.content shall be
+ identical to a break character with null type and clear attributes, which
+ shall end the current line and find the next available line on which to
+ continue.
+ The carriage return character forced the following text to be
+ restarted on the next available line in the document.
+
+
+ Adds a picture to the run. This method handles
+ attaching the picture data to the overall file.
+
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_EMF
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_WMF
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_PICT
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_JPEG
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_PNG
+ @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_DIB
+
+ @param pictureData The raw picture data
+ @param pictureType The type of the picture, eg {@link Document#PICTURE_TYPE_JPEG}
+ @param width width in EMUs. To convert to / from points use {@link org.apache.poi.util.Units}
+ @param height height in EMUs. To convert to / from points use {@link org.apache.poi.util.Units}
+ @throws NPOI.Openxml4j.exceptions.InvalidFormatException
+ @throws IOException
+
+
+ Returns the embedded pictures of the run. These
+ are pictures which reference an external,
+ embedded picture image such as a .png or .jpg
+
+
+ Add the xml:spaces="preserve" attribute if the string has leading or trailing white spaces
+
+ @param xs the string to check
+
+
+ Returns the string version of the text, with tabs and
+ carriage returns in place of their xml equivalents.
+
+
+ Experimental class to offer rudimentary Read-only Processing of
+ of StructuredDocumentTags/ContentControl
+
+
+
+ WARNING - APIs expected to change rapidly
+
+
+
+ Experimental class to offer rudimentary Read-only Processing of
+ of StructuredDocumentTags/ContentControl that can appear
+ in a table row as if a table cell.
+
+ These can contain one or more cells or other SDTs within them.
+
+ WARNING - APIs expected to change rapidly
+
+
+ Experimental class to offer rudimentary Read-only Processing of
+ of the contentblock of an SDT/ContentControl.
+
+
+
+ WARNING - APIs expected to change rapidly
+
+
+
+ Experimental class to offer rudimentary Read-only Processing of
+ of the XWPFSDTCellContent.
+
+ WARNING - APIs expected to change rapidly
+
+
+ In the zoom tag inside Settings.xml file
+ it Sets the value of zoom
+ @return percentage as an integer of zoom level
+
+
+
+ Set zoom. In the zoom tag inside settings.xml file it sets the value of zoom
+
+
+
+ sample snippet from Settings.xml
+
+ <w:zoom w:percent="50" />
+
+
+
+ Verifies the documentProtection tag inside Settings.xml file
+ if the protection is enforced (w:enforcement="1")
+ and if the kind of protection Equals to passed (STDocProtect.Enum editValue)
+
+
+ sample snippet from Settings.xml
+
+
+ @return true if documentProtection is enforced with option ReadOnly
+
+
+ Enforces the protection with the option specified by passed editValue.
+
+ In the documentProtection tag inside Settings.xml file
+ it Sets the value of enforcement to "1" (w:enforcement="1")
+ and the value of edit to the passed editValue (w:edit="[passed editValue]")
+
+ sample snippet from Settings.xml
+
+
+
+ Removes protection enforcement.
+ In the documentProtection tag inside Settings.xml file
+ it Sets the value of enforcement to "0" (w:enforcement="0")
+
+
+ Enforces fields update on document open (in Word).
+ In the settings.xml file
+ sets the updateSettings value to true (w:updateSettings w:val="true")
+
+ NOTICES:
+
+
Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?"
+ (if "Update automatic links at open" is enabled)
+
Flag is removed after saving with changes in Word
+
+
+
+ get or set revision tracking
+
+
+ @author Philipp Epp
+
+
+
+ constructor
+ @param style
+
+
+ constructor
+ @param style
+ @param styles
+
+
+ Get StyleID of the style
+ @return styleID StyleID of the style
+
+
+ Get Type of the Style
+ @return ctType
+
+
+ Set style
+ @param style
+
+
+ Get ctStyle
+ @return ctStyle
+
+
+ Get styles
+ @return styles the styles to which this style belongs
+
+
+ Get StyleID of the linked Style
+
+
+ Get StyleID of the next style
+
+
+ Compares the names of the Styles
+ @param compStyle
+
+
+ Holds details of built-in, default and user styles, which
+ apply to tables / paragraphs / lists etc.
+ Text within one of those with custom stylings has the style
+ information stored in the {@link XWPFRun}
+
+
+ Construct XWPFStyles from a package part
+
+ @param part the package part holding the data of the styles,
+ @param rel the package relationship of type "http://schemas.Openxmlformats.org/officeDocument/2006/relationships/styles"
+
+
+ Construct XWPFStyles from scratch for a new document.
+
+
+ Read document
+
+
+ Sets the ctStyles
+ @param styles
+
+
+ Checks whether style with styleID exist
+ @param styleID styleID of the Style in the style-Document
+ @return true if style exist, false if style not exist
+
+
+ add a style to the document
+ @param style
+ @throws IOException
+
+
+ get style by a styleID
+ @param styleID styleID of the searched style
+ @return style
+
+
+ Get the styles which are related to the parameter style and their relatives
+ this method can be used to copy all styles from one document to another document
+ @param style
+ @return a list of all styles which were used by this method
+
+
+ Get the styles which are related to parameter style
+ @param style
+ @return all Styles of the parameterList
+
+
+ Sets the default spelling language on ctStyles DocDefaults parameter
+ @param strSpellingLanguage
+
+
+ Sets the default East Asia spelling language on ctStyles DocDefaults parameter
+ @param strEastAsia
+
+
+ Sets the default font on ctStyles DocDefaults parameter
+ TODO Replace this with specific Setters for each type, possibly
+ on XWPFDefaultRunStyle
+
+
+ Get the style with the same name
+ if this style is not existing, return null
+
+
+ Get the default style which applies text runs in the document
+
+
+ Get the default paragraph style which applies to the document
+
+
+ Get the definition of all the Latent Styles
+
+
+
Sketch of XWPFTable class. Only table's text is being hold.
+
Specifies the contents of a table present in the document. A table is a set
+ of paragraphs (and other block-level content) arranged in rows and columns.
+
+
+ @return ctTbl object
+
+
+
+ add a new column for each row in this table
+
+
+ create a new XWPFTableRow object with as many cells as the number of columns defined in that moment
+
+ @return tableRow
+
+
+ @param pos - index of the row
+ @return the row at the position specified or null if no rows is defined or if the position is greather than the max size of rows array
+
+
+ @return width value
+
+
+ @return number of rows in table
+
+
+ Get the StyleID of the table
+ @return style-ID of the table
+
+
+ add a new Row to the table
+
+ @param row the row which should be Added
+
+
+ add a new Row to the table
+ at position pos
+ @param row the row which should be Added
+
+
+ inserts a new tablerow
+ @param pos
+ @return the inserted row
+
+
+ Remove a row at position pos from the table
+ @param pos position the Row in the Table
+
+
+ returns the type of the BodyElement Table
+ @see NPOI.XWPF.UserModel.IBodyElement#getElementType()
+
+
+ returns the part of the bodyElement
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ returns the partType of the bodyPart which owns the bodyElement
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+ returns the XWPFRow which belongs to the CTRow row
+ if this row is not existing in the table null will be returned
+
+
+ Represents a Cell within a {@link XWPFTable}. The
+ Cell is the thing that holds the actual content (paragraphs etc)
+
+
+ If a table cell does not include at least one block-level element, then this document shall be considered corrupt
+
+
+ returns an Iterator with paragraphs and tables
+ @see NPOI.XWPF.UserModel.IBody#getBodyElements()
+
+
+ returns a list of paragraphs
+
+
+ Add a Paragraph to this Table Cell
+ @return The paragraph which was Added
+
+
+ add a Paragraph to this TableCell
+ @param p the paragaph which has to be Added
+
+
+ Removes a paragraph of this tablecell
+ @param pos
+
+
+ if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this table
+ the method will return this paragraph
+ if there is no corresponding {@link XWPFParagraph} the method will return null
+ @param p is instance of CTP and is searching for an XWPFParagraph
+ @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table
+ XWPFParagraph with the correspondig CTP p
+
+
+
+ Add bottom border to cell
+
+ Border Style
+ Border Width
+ Border Spacing Measurement
+ Border Color
+
+
+
+ Add top border to cell
+
+ Border Style
+ Border Width
+ Border Spacing Measurement
+ Border Color
+
+
+
+ Add left border to cell
+
+ Border Style
+ Border Width
+ Border Spacing Measurement
+ Border Color
+
+
+
+ Add right border to cell
+
+ Border Style
+ Border Width
+
+ Border Color
+
+
+
+ Creates border with parameters
+
+ Border Style
+ Border Width
+ Border Spacing Measurement
+ Border Color
+ CT_Border object
+
+
+ Set cell color. This sets some associated values; for finer control
+ you may want to access these elements individually.
+ @param rgbStr - the desired cell color, in the hex form "RRGGBB".
+
+
+ Get cell color. Note that this method only returns the "fill" value.
+ @return RGB string of cell color
+
+
+ Set the vertical alignment of the cell.
+ @param vAlign - the desired alignment enum value
+
+
+ Get the vertical alignment of the cell.
+ @return the cell alignment enum value
+
+
+ add a new paragraph at position of the cursor
+ @param cursor
+ @return the inserted paragraph
+
+
+ verifies that cursor is on the right position
+
+
+ @see NPOI.XWPF.UserModel.IBody#getParagraphArray(int)
+
+
+ Get the to which the TableCell belongs
+
+ @see NPOI.XWPF.UserModel.IBody#getPart()
+
+
+ @see NPOI.XWPF.UserModel.IBody#getPartType()
+
+
+ Get a table by its CTTbl-Object
+ @see NPOI.XWPF.UserModel.IBody#getTable(org.Openxmlformats.schemas.wordProcessingml.x2006.main.CTTbl)
+
+
+ @see NPOI.XWPF.UserModel.IBody#getTableArray(int)
+
+
+ @see NPOI.XWPF.UserModel.IBody#getTables()
+
+
+ inserts an existing XWPFTable to the arrays bodyElements and tables
+ @see NPOI.XWPF.UserModel.IBody#insertTable(int, NPOI.XWPF.UserModel.XWPFTable)
+
+
+ extracts all text recursively through embedded tables and embedded SDTs
+
+
+ Get the TableCell which belongs to the TableCell
+
+
+ A row within an {@link XWPFTable}. Rows mostly just have
+ sizings and stylings, the interesting content lives inside
+ the child {@link XWPFTableCell}s
+
+
+ create a new XWPFTableCell and add it to the tableCell-list of this tableRow
+ @return the newly Created XWPFTableCell
+
+
+ Adds a new TableCell at the end of this tableRow
+
+
+ This element specifies the height of the current table row within the
+ current table. This height shall be used to determine the resulting
+ height of the table row, which may be absolute or relative (depending on
+ its attribute values). If omitted, then the table row shall automatically
+ resize its height to the height required by its contents (the equivalent
+ of an hRule value of auto).
+
+ @return height
+
+
+ create and return a list of all XWPFTableCell
+ who belongs to this row
+ @return a list of {@link XWPFTableCell}
+
+
+ create and return a list of all XWPFTableCell
+ who belongs to this row
+ @return a list of {@link XWPFTableCell}
+
+
+ returns the XWPFTableCell which belongs to the CTTC cell
+ if there is no XWPFTableCell which belongs to the parameter CTTc cell null will be returned
+
+
+ Return true if the "can't split row" value is true. The logic for this
+ attribute is a little unusual: a TRUE value means DON'T allow rows to
+ split, FALSE means allow rows to split.
+ @return true if rows can't be split, false otherwise.
+
+
+ Return true if a table's header row should be repeated at the top of a
+ table split across pages.
+ @return true if table's header row should be repeated at the top of each
+ page of table, false otherwise.
+
+
+
+ Create Accent
+
+
+
+
+
+ Create n-ary Operator Object
+
+
+
+
+
+ Subscript Object
+
+
+
+
+
+ Fraction Object
+
+
+
+
+
+ Accent
+ This element specifies the accent function, consisting of a base
+ and a combining diacritical mark. If accPr is
+ omitted, the default accent is U+0302 (COMBINING CIRCUMFLEX ACCENT).
+
+
+
+
+ Single char or UTF, like: ̃
+
+
+
+
+ This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base
+ argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all
+ subelements are omitted, this element specifies the presence of an empty argument.
+
+
+
+
+ Fraction Object
+ This element specifies the fraction object, consisting of a numerator and denominator separated by a fraction
+ bar.The fraction bar can be horizontal or diagonal, depending on the fraction properties.The fraction object is
+ also used to represent the stack function, which places one element above another, with no fraction bar.
+
+
+
+
+ This element specifies the properties of the fraction object f. Properties of the Fraction object include the type
+ or style of the fraction.The fraction bar can be horizontal or diagonal, depending on the fraction properties.The
+ fraction object is also used to represent the stack function, which places one element above another, with no
+ fraction bar.
+
+
+
+
+ This element specifies the numerator of the Fraction object f
+
+
+
+
+ This element specifies the denominator of a fraction
+
+
+
+
+ n-ary Operator Object
+ This element specifies an n-ary object, consisting of an n-ary object, a base (or operand), and optional upper and
+ lower limits
+
+
+
+
+ This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base
+ argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all
+ subelements are omitted, this element specifies the presence of an empty argument.
+
+
+
+
+ This element specifies the subscript of the Pre-Sub-Superscript object sPre
+
+
+
+
+ This element specifies the superscript of the superscript object sSup.
+
+
+
+
+ Get Nary symbol
+
+
+
+
+ Sets ∑ char
+
+
+
+
+ Sets ⋃ char
+
+
+
+
+ Sets ∫ char
+
+
+
+
+ Sets ⋀ char
+
+
+
+ For isBold, isItalic etc
+
+
+
+ Specifies the fonts which shall be used to display the text contents of
+ this run.The default handling for fcr == null is to overwrite the
+ ascii font char range with the given font family and also set all not
+ specified font ranges
+
+ fontFamily
+ FontCharRange or null for default handling
+
+
+
+ Gets the font family for the specified font char range.
+ If fcr is null, the font char range "ascii" is used
+ Please use "Cambria Math"(set as default) font otherwise MS Word
+ don't open file, LibreOffice Writer open it normaly.
+ I think this is MS Word bug, because this is not standart.
+
+ the font char range, defaults to "ansi"
+ a string representing the font famil
+
+
+
+ Sets the text of this text run
+
+ the literal text which shall be displayed in the document
+
+
+
+ Sets the text of this text run.in the
+
+ the literal text which shall be displayed in the document
+ position in the text array (NB: 0 based)
+
+
+
+ Add the xml:spaces="preserve" attribute if the string has leading or trailing white spaces
+
+ the string to check
+
+
+
+ Subscript Object
+ his element specifies the subscript object sSub, which consists of a base e and a reduced-size scr placed below
+ and to the right, as in Xn
+
+
+
+
+ This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base
+ argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all
+ subelements are omitted, this element specifies the presence of an empty argument.
+
+
+
+
+ This element specifies the subscript of the Pre-Sub-Superscript object sPre
+
+
+
+
diff --git a/MES_Manage/Bin/NPOI.OpenXml4Net.dll b/MES_Manage/Bin/NPOI.OpenXml4Net.dll
new file mode 100644
index 0000000..1d74481
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OpenXml4Net.dll differ
diff --git a/MES_Manage/Bin/NPOI.OpenXml4Net.pdb b/MES_Manage/Bin/NPOI.OpenXml4Net.pdb
new file mode 100644
index 0000000..68aadc1
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OpenXml4Net.pdb differ
diff --git a/MES_Manage/Bin/NPOI.OpenXml4Net.xml b/MES_Manage/Bin/NPOI.OpenXml4Net.xml
new file mode 100644
index 0000000..1f6eb0b
--- /dev/null
+++ b/MES_Manage/Bin/NPOI.OpenXml4Net.xml
@@ -0,0 +1,3019 @@
+
+
+
+ NPOI.OpenXml4Net
+
+
+
+ Specifies the location where the X.509 certificate that is used in signing is stored.
+
+ @author Julien Chable
+
+
+ The certificate is embedded in its own PackagePart.
+
+
+ The certificate is embedded in the SignaturePart that is created for the signature being added.
+
+
+ The certificate in not embedded in the package.
+
+
+ Storage class for configuration storage parameters.
+ TODO xml syntax checking is no longer done with DOM4j parser -> remove the schema or do it ?
+
+ @author CDubettier, Julen Chable
+ @version 1.0
+
+
+ Open Packaging Convention content types (see Annex F : Standard Namespaces
+ and Content Types).
+
+ @author CDubettier define some constants, Julien Chable
+
+
+ Core Properties part.
+
+
+ Digital Signature Certificate part.
+
+
+ Digital Signature Origin part.
+
+
+ Digital Signature XML Signature part.
+
+
+ Relationships part.
+
+
+ Custom XML part.
+
+
+ Plain old xml. Note - OOXML uses application/xml, and not text/xml!
+
+
+ TIFF image format.
+
+ @see
+ http://partners.adobe.com/public/developer/tiff/index.html#spec
+
+
+ Pict image format.
+
+ @see
+ http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-2.html
+
+
+ XML file.
+
+
+ Specifies the encryption option for parts in a Package.
+
+ @author Julien Chable
+ @version 0.1
+
+
+ No encryption.
+
+
+
+ Type in Type/Subtype.
+
+
+ Subtype
+
+
+ Parameters
+
+
+ Media type compiled pattern for parameters.
+
+
+ Media type compiled pattern, with parameters.
+
+
+ Pattern to match on just the parameters part, to work
+ around the Java Regexp group capture behaviour
+
+
+ Constructor. Check the input with the RFC 2616 grammar.
+
+ @param contentType
+ The content type to store.
+ @throws InvalidFormatException
+ If the specified content type is not valid with RFC 2616.
+
+
+ Get the subtype.
+
+ @return The subtype of this content type.
+
+
+ Get the type.
+
+ @return The type of this content type.
+
+
+ Does this content type have any parameters associated with it?
+
+
+ Return the parameter keys
+
+
+ Gets the value associated to the specified key.
+
+ @param key
+ The key of the key/value pair.
+ @return The value associated to the specified key.
+
+
+ @deprecated Use {@link #getParameter(String)} instead
+
+
+ Manage package content types ([Content_Types].xml part).
+
+ @author Julien Chable
+ @version 1.0
+
+
+ Content type part name.
+
+
+ Content type namespace
+
+
+ Reference to the package using this content type manager.
+
+
+
+ Override content type tree.
+
+
+ Constructor. Parses the content of the specified input stream.
+
+ @param in
+ If different of null then the content types part is
+ retrieve and parse.
+ @throws InvalidFormatException
+ If the content types part content is not valid.
+
+
+ Build association extention-> content type (will be stored in
+ [Content_Types].xml) for example ContentType="image/png" Extension="png"
+
+ [M2.8]: When adding a new part to a package, the package implementer
+ shall ensure that a content type for that part is specified in the
+ Content Types stream; the package implementer shall perform the steps
+ described in §9.1.2.3:
+
+ 1. Get the extension from the part name by taking the substring to the
+ right of the rightmost occurrence of the dot character (.) from the
+ rightmost segment.
+
+ 2. If a part name has no extension, a corresponding Override element
+ shall be added to the Content Types stream.
+
+ 3. Compare the resulting extension with the values specified for the
+ Extension attributes of the Default elements in the Content Types stream.
+ The comparison shall be case-insensitive ASCII.
+
+ 4. If there is a Default element with a matching Extension attribute,
+ then the content type of the new part shall be compared with the value of
+ the ContentType attribute. The comparison might be case-sensitive and
+ include every character regardless of the role it plays in the
+ content-type grammar of RFC 2616, or it might follow the grammar of RFC
+ 2616.
+
+ a. If the content types match, no further action is required.
+
+ b. If the content types do not match, a new Override element shall be
+ added to the Content Types stream. .
+
+ 5. If there is no Default element with a matching Extension attribute, a
+ new Default element or Override element shall be added to the Content
+ Types stream.
+
+
+
+ Add an override content type for a specific part.
+
+ @param partName
+ Name of the part.
+ @param contentType
+ Content type of the part.
+
+
+ Add a content type associated with the specified extension.
+
+ @param extension
+ The part name extension to bind to a content type.
+ @param contentType
+ The content type associated with the specified extension.
+
+
+
+ Delete a content type based on the specified part name. If the specified
+ part name is register with an override content type, then this content
+ type is remove, else the content type is remove in the default content
+ type list if it exists and if no part is associated with it yet.
+
+ Check rule M2.4: The package implementer shall require that the Content
+ Types stream contain one of the following for every part in the package:
+ One matching Default element One matching Override element Both a
+ matching Default element and a matching Override element, in which case
+ the Override element takes precedence.
+
+ @param partName
+ The part URI associated with the override content type to
+ delete.
+ @exception InvalidOperationException
+ Throws if
+
+
+ Check if the specified content type is already register.
+
+ @param contentType
+ The content type to check.
+ @return true if the specified content type is already
+ register, then false.
+
+
+ Get the content type for the specified part, if any.
+
+ Rule [M2.9]: To get the content type of a part, the package implementer
+ shall perform the steps described in §9.1.2.4:
+
+ 1. Compare the part name with the values specified for the PartName
+ attribute of the Override elements. The comparison shall be
+ case-insensitive ASCII.
+
+ 2. If there is an Override element with a matching PartName attribute,
+ return the value of its ContentType attribute. No further action is
+ required.
+
+ 3. If there is no Override element with a matching PartName attribute,
+ then a. Get the extension from the part name by taking the substring to
+ the right of the rightmost occurrence of the dot character (.) from the
+ rightmost segment. b. Check the Default elements of the Content Types
+ stream, comparing the extension with the value of the Extension
+ attribute. The comparison shall be case-insensitive ASCII.
+
+ 4. If there is a Default element with a matching Extension attribute,
+ return the value of its ContentType attribute. No further action is
+ required.
+
+ 5. If neither Override nor Default elements with matching attributes are
+ found for the specified part name, the implementation shall not map this
+ part name to a part.
+
+ @param partName
+ The URI part to check.
+ @return The content type associated with the URI (in case of an override
+ content type) or the extension (in case of default content type),
+ else null.
+
+ @exception OpenXml4NetRuntimeException
+ Throws if the content type manager is not able to find the
+ content from an existing part.
+
+
+ Clear all content types.
+
+
+ Clear all override content types.
+
+
+
+ Parse the content types part.
+
+ @throws InvalidFormatException
+ Throws if the content type doesn't exist or the XML format is
+ invalid.
+
+
+ Save the contents type part.
+
+ @param outStream
+ The output stream use to save the XML content of the content
+ types part.
+ @return true if the operation success, else false.
+
+
+ Use to Append specific type XML elements, use by the save() method.
+
+ @param root
+ XML parent element use to Append this override type element.
+ @param entry
+ The values to Append.
+ @see #save(java.io.OutputStream)
+
+
+ Use to Append default types XML elements, use by the save() metid.
+
+ @param root
+ XML parent element use to Append this default type element.
+ @param entry
+ The values to Append.
+ @see #save(java.io.OutputStream)
+
+
+ Specific implementation of the save method. Call by the save() method,
+ call before exiting.
+
+ @param out
+ The output stream use to write the content type XML.
+
+
+ Provide useful method to manage file.
+
+ @author Julien Chable
+ @version 0.1
+
+
+ Get the directory part of the specified file path.
+
+ @param f
+ File to process.
+ @return The directory path from the specified
+
+
+ Copy a file.
+
+ @param in
+ The source file.
+ @param out
+ The target location.
+ @throws IOException
+ If an I/O error occur.
+
+
+ Get file name from the specified File object.
+
+
+ Default marshaller that specified that the part is responsible to marshall its content.
+
+ @author Julien Chable
+ @version 1.0
+ @see PartMarshaller
+
+
+ Save part in the output stream by using the save() method of the part.
+
+ @throws OpenXml4NetException
+ If any error occur.
+
+
+ Package properties marshaller.
+
+ @author CDubet, Julien Chable
+
+
+ Marshall package core properties to an XML document. Always return
+ true.
+
+
+ Add category property element if needed.
+
+
+ Add content status property element if needed.
+
+
+ Add content type property element if needed.
+
+
+ Add created property element if needed.
+
+
+ Add creator property element if needed.
+
+
+ Add description property element if needed.
+
+
+ Add identifier property element if needed.
+
+
+ Add keywords property element if needed.
+
+
+ Add language property element if needed.
+
+
+ Add 'last modified by' property if needed.
+
+
+ Add 'last printed' property if needed.
+
+
+
+ Add modified property element if needed.
+
+
+ Add revision property if needed.
+
+
+ Add subject property if needed.
+
+
+ Add title property if needed.
+
+
+ Package core properties marshaller specialized for zipped package.
+
+ @author Julien Chable
+
+
+ Zip part marshaller. This marshaller is use to save any part in a zip stream.
+
+ @author Julien Chable
+
+
+ Save the specified part.
+
+ @throws OpenXml4NetException
+ Throws if an internal exception is thrown.
+
+
+ Save relationships into the part.
+
+ @param rels
+ The relationships collection to marshall.
+ @param relPartName
+ Part name of the relationship part to marshall.
+ @param zos
+ Zip output stream in which to save the XML content of the
+ relationships serialization.
+
+
+ Storage for the part data.
+
+
+ Constructor.
+
+ @param pack
+ The owner package.
+ @param partName
+ The part name.
+ @param contentType
+ The content type.
+ @throws InvalidFormatException
+ If the specified URI is not OPC compliant.
+
+
+ Constructor.
+
+ @param pack
+ The owner package.
+ @param partName
+ The part name.
+ @param contentType
+ The content type.
+ @param loadRelationships
+ Specify if the relationships will be loaded.
+ @throws InvalidFormatException
+ If the specified URI is not OPC compliant.
+
+
+ Close this stream and flush the content.
+ @see #flush()
+
+
+ Flush this output stream. This method is called by the close() method.
+ Warning : don't call this method for output consistency.
+ @see #close()
+
+
+ Represents the core properties part of a package.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ Constructor.
+
+ @param pack
+ Container package.
+ @param partName
+ Name of this part.
+ @throws InvalidFormatException
+ Throws if the content is invalid.
+
+
+ A categorization of the content of this package.
+
+ [Example: Example values for this property might include: Resume, Letter,
+ Financial Forecast, Proposal, Technical Presentation, and so on. This
+ value might be used by an application's user interface to facilitate
+ navigation of a large Set of documents. end example]
+
+
+ The status of the content.
+
+ [Example: Values might include "Draft", "Reviewed", and "Final". end
+ example]
+
+
+ The type of content represented, generally defined by a specific use and
+ intended audience.
+
+ [Example: Values might include "Whitepaper", "Security Bulletin", and
+ "Exam". end example] [Note: This property is distinct from MIME content
+ types as defined in RFC 2616. end note]
+
+
+ Date of creation of the resource.
+
+
+ An entity primarily responsible for making the content of the resource.
+
+
+ An explanation of the content of the resource.
+
+ [Example: Values might include an abstract, table of contents, reference
+ to a graphical representation of content, and a free-text account of the
+ content. end example]
+
+
+ An unambiguous reference to the resource within a given context.
+
+
+ A delimited Set of keywords to support searching and indexing. This is
+ typically a list of terms that are not available elsewhere in the
+ properties.
+
+
+ The language of the intellectual content of the resource.
+
+ [Note: IETF RFC 3066 provides guidance on encoding to represent
+ languages. end note]
+
+
+ The user who performed the last modification. The identification is
+ environment-specific.
+
+ [Example: A name, email address, or employee ID. end example] It is
+ recommended that this value be as concise as possible.
+
+
+ The date and time of the last printing.
+
+
+ Date on which the resource was changed.
+
+
+ The revision number.
+
+ [Example: This value might indicate the number of saves or revisions,
+ provided the application updates it after each revision. end example]
+
+
+ The topic of the content of the resource.
+
+
+ The name given to the resource.
+
+
+ The version number. This value is Set by the user or by the application.
+
+
+ Get the category property.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCategoryProperty()
+
+
+ Get content status.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getContentStatusProperty()
+
+
+ Get content type.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getContentTypeProperty()
+
+
+ Get created date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCreatedProperty()
+
+
+ Get created date formated into a String.
+
+ @return A string representation of the created date.
+
+
+ Get creator.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCreatorProperty()
+
+
+ Get description.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getDescriptionProperty()
+
+
+ Get identifier.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getIdentifierProperty()
+
+
+ Get keywords.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getKeywordsProperty()
+
+
+ Get the language.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLanguageProperty()
+
+
+ Get the author of last modifications.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLastModifiedByProperty()
+
+
+ Get last printed date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLastPrintedProperty()
+
+
+ Get last printed date formated into a String.
+
+ @return A string representation of the last printed date.
+
+
+ Get modified date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getModifiedProperty()
+
+
+ Get modified date formated into a String.
+
+ @return A string representation of the modified date.
+
+
+ Get revision.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getRevisionProperty()
+
+
+ Get subject.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getSubjectProperty()
+
+
+ Get title.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getTitleProperty()
+
+
+ Get version.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getVersionProperty()
+
+
+ Set the category.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCategoryProperty(java.lang.String)
+
+
+ Set the content status.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setContentStatusProperty(java.lang.String)
+
+
+ Set the content type.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setContentTypeProperty(java.lang.String)
+
+
+ Set the created date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set the created date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set the creator.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatorProperty(java.lang.String)
+
+
+ Set the description.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setDescriptionProperty(java.lang.String)
+
+
+ Set identifier.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setIdentifierProperty(java.lang.String)
+
+
+ Set keywords.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setKeywordsProperty(java.lang.String)
+
+
+ Set language.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLanguageProperty(java.lang.String)
+
+
+ Set last modifications author.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastModifiedByProperty(java.lang.String)
+
+
+ Set last printed date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastPrintedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set last printed date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastPrintedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set last modification date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setModifiedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set last modification date.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setModifiedProperty(org.apache.poi.OpenXml4Net.util.Nullable)
+
+
+ Set revision.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setRevisionProperty(java.lang.String)
+
+
+ Set subject.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setSubjectProperty(java.lang.String)
+
+
+ Set title.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setTitleProperty(java.lang.String)
+
+
+ Set version.
+
+ @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setVersionProperty(java.lang.String)
+
+
+ Convert a strig value into a String
+
+
+
+
+ Object implemented this interface are considered as part marshaller. A part
+ marshaller is responsible to marshall a part in order to be save in a
+ package.
+
+ @author Julien Chable
+ @version 0.1
+
+
+ Save the content of the package in the stream
+
+ @param part
+ Part to marshall.
+ @param out
+ The output stream into which the part will be marshall.
+ @return false if any marshall error occurs, else true
+ @throws OpenXml4NetException
+ Throws only if any other exceptions are thrown by inner
+ methods.
+
+
+ Object implemented this interface are considered as part unmarshaller. A part
+ unmarshaller is responsible to unmarshall a part in order to load it from a
+ package.
+
+ @author Julien Chable
+ @version 0.1
+
+
+ Save the content of the package in the stream
+
+ @param in
+ The input stream from which the part will be unmarshall.
+ @return The part freshly unmarshall from the input stream.
+ @throws OpenXml4NetException
+ Throws only if any other exceptions are thrown by inner
+ methods.
+
+
+ Package properties unmarshaller.
+
+ @author Julien Chable
+ @version 1.0
+
+
+
+ Context needed for the unmarshall process of a part. This class is immutable.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ Constructor.
+
+ @param targetPackage
+ Container.
+ @param partName
+ Name of the part to unmarshall.
+
+
+ @return the container
+
+
+ @return the partName
+
+
+ @return the zipEntry
+
+
+ Zip implementation of the ContentTypeManager.
+
+ @author Julien Chable
+ @version 1.0
+ @see ContentTypeManager
+
+
+ Delegate constructor to the super constructor.
+
+ @param in
+ The input stream to parse to fill internal content type
+ collections.
+ @throws InvalidFormatException
+ If the content types part content is not valid.
+
+
+ Forward slash use to convert part name between OPC and zip item naming
+ conventions.
+
+
+ Buffer to read data from file. Use big buffer to improve performaces. the
+ InputStream class is reading only 8192 bytes per read call (default value
+ set by sun)
+
+
+ Prevent this class to be instancied.
+
+
+ Retrieve the zip entry of the core properties part.
+
+ @throws OpenXml4NetException
+ Throws if internal error occurs.
+
+
+ Retrieve the Zip entry of the content types part.
+
+
+ Convert a zip name into an OPC name by adding a leading forward slash to
+ the specified item name.
+
+ @param zipItemName
+ Zip item name to convert.
+ @return An OPC compliant name.
+
+
+ Convert an OPC item name into a zip item name by removing any leading
+ forward slash if it exist.
+
+ @param opcItemName
+ The OPC item name to convert.
+ @return A zip item name without any leading slashes.
+
+
+ Convert an OPC item name into a zip URI by removing any leading forward
+ slash if it exist.
+
+ @param opcItemName
+ The OPC item name to convert.
+ @return A zip URI without any leading slashes.
+
+
+ Opens the specified file as a zip, or returns null if no such file exists
+
+ @param file
+ The file to open.
+ @return The zip archive freshly open.
+
+
+ Retrieve and open a zip file with the specified path.
+
+ @param path
+ The file path.
+ @return The zip archive freshly open.
+
+
+ Represents a container that can store multiple data objects.
+
+ @author Julien Chable, CDubet
+ @version 0.1
+
+
+ Logger.
+
+
+ Default package access.
+
+
+ Package access.
+
+
+ Package parts collection.
+
+
+ Package relationships.
+
+
+ Part marshallers by content type.
+
+
+ Default part marshaller.
+
+
+ Part unmarshallers by content type.
+
+
+ Core package properties.
+
+
+ Manage parts content types of this package.
+
+
+ Flag if a modification is done to the document.
+
+
+ File path of this package.
+
+
+ Output stream for writing this package.
+
+
+ Constructor.
+
+ @param access
+ Package access.
+
+
+ Initialize the package instance.
+
+
+ Open a package with read/write permission.
+
+ @param path
+ The document path.
+ @return A Package object, else null.
+ @throws InvalidFormatException
+ If the specified file doesn't exist, and a parsing error
+ occur.
+
+
+ Open a package with read/write permission.
+
+ @param file
+ The file to open.
+ @return A Package object, else null.
+ @throws InvalidFormatException
+ If the specified file doesn't exist, and a parsing error
+ occur.
+
+
+ Open a package.
+
+ @param path
+ The document path.
+ @param access
+ PackageBase access.
+ @return A PackageBase object, else null.
+ @throws InvalidFormatException
+ If the specified file doesn't exist, and a parsing error
+ occur.
+
+
+ Open a package.
+
+ @param file
+ The file to open.
+ @param access
+ PackageBase access.
+ @return A PackageBase object, else null.
+ @throws InvalidFormatException
+ If the specified file doesn't exist, and a parsing error
+ occur.
+
+
+ Open a package.
+
+ Note - uses quite a bit more memory than {@link #open(String)}, which
+ doesn't need to hold the whole zip file in memory, and can take advantage
+ of native methods
+
+ @param in
+ The InputStream to read the package from
+ @return A PackageBase object
+
+
+ Opens a package if it exists, else it Creates one.
+
+ @param file
+ The file to open or to Create.
+ @return A newly Created package if the specified file does not exist,
+ else the package extract from the file.
+ @throws InvalidFormatException
+ Throws if the specified file exist and is not valid.
+
+
+ Creates a new package.
+
+ @param file
+ Path of the document.
+ @return A newly Created PackageBase ready to use.
+
+
+ Configure the package.
+
+ @param pkg
+
+
+ Flush the package : save all.
+
+ @see #close()
+
+
+ Close the package and save its content.
+
+ @throws IOException
+ If an IO exception occur during the saving process.
+
+
+ Close the package WITHOUT saving its content. Reinitialize this package
+ and cancel all changes done to it.
+
+
+ Add a thumbnail to the package. This method is provided to make easier
+ the addition of a thumbnail in a package. You can do the same work by
+ using the traditionnal relationship and part mechanism.
+
+ @param path
+ The full path to the image file.
+
+
+ Throws an exception if the package access mode is in read only mode
+ (PackageAccess.Read).
+
+ @throws InvalidOperationException
+ Throws if a writing operation is done on a read only package.
+ @see org.apache.poi.OpenXml4Net.opc.PackageAccess
+
+
+ Throws an exception if the package access mode is in write only mode
+ (PackageAccess.Write). This method is call when other methods need write
+ right.
+
+ @throws InvalidOperationException
+ Throws if a read operation is done on a write only package.
+ @see org.apache.poi.OpenXml4Net.opc.PackageAccess
+
+
+ Retrieves or Creates if none exists, core package property part.
+
+ @return The PackageProperties part of this package.
+
+
+ Retrieve a part identified by its name.
+
+ @param PartName
+ Part name of the part to retrieve.
+ @return The part with the specified name, else null.
+
+
+ Retrieve parts by content type.
+
+ @param contentType
+ The content type criteria.
+ @return All part associated to the specified content type.
+
+
+ Retrieve parts by relationship type.
+
+ @param relationshipType
+ Relationship type.
+ @return All parts which are the target of a relationship with the
+ specified type, if the method can't retrieve relationships from
+ the package, then return null.
+
+
+ Retrieve parts by name
+
+ @param namePattern
+ The pattern for matching the names
+ @return All parts associated to the specified content type, sorted
+ in alphanumerically by the part-name
+
+
+ Get the target part from the specified relationship.
+
+ @param partRel
+ The part relationship uses to retrieve the part.
+
+
+ Load the parts of the archive if it has not been done yet. The
+ relationships of each part are not loaded.
+ Note - Rule M4.1 states that there may only ever be one Core
+ Properties Part, but Office produced files will sometimes
+ have multiple! As Office ignores all but the first, we relax
+ Compliance with Rule M4.1, and ignore all others silently too.
+ @return All this package's parts.
+
+
+ Create and Add a part, with the specified name and content type, to the
+ package.
+
+ @param PartName
+ Part name.
+ @param contentType
+ Part content type.
+ @return The newly Created part.
+ @throws InvalidFormatException
+ If rule M1.12 is not verified : Packages shall not contain
+ equivalent part names and package implementers shall neither
+ Create nor recognize packages with equivalent part names.
+ @see #CreatePartImpl(PackagePartName, String, bool)
+
+
+ Create and Add a part, with the specified name and content type, to the
+ package. For general purpose, prefer the overload version of this method
+ without the 'loadRelationships' parameter.
+
+ @param PartName
+ Part name.
+ @param contentType
+ Part content type.
+ @param loadRelationships
+ Specify if the existing relationship part, if any, logically
+ associated to the newly Created part will be loaded.
+ @return The newly Created part.
+ @throws InvalidFormatException
+ If rule M1.12 is not verified : Packages shall not contain
+ equivalent part names and package implementers shall neither
+ Create nor recognize packages with equivalent part names.
+ @see {@link#CreatePartImpl(URI, String)}
+
+
+ Add a part to the package.
+
+ @param PartName
+ Part name of the part to Create.
+ @param contentType
+ type associated with the file
+ @param content
+ the contents to Add. In order to have faster operation in
+ document merge, the data are stored in memory not on a hard
+ disk
+
+ @return The new part.
+ @see #CreatePart(PackagePartName, String)
+
+
+ Add the specified part to the package. If a part already exists in the
+ package with the same name as the one specified, then we replace the old
+ part by the specified part.
+
+ @param part
+ The part to Add (or replace).
+ @return The part Added to the package, the same as the one specified.
+ @throws InvalidFormatException
+ If rule M1.12 is not verified : Packages shall not contain
+ equivalent part names and package implementers shall neither
+ Create nor recognize packages with equivalent part names.
+
+
+ Remove the specified part in this package. If this part is relationship
+ part, then delete all relationships in the source part.
+
+ @param part
+ The part to Remove. If null, skip the action.
+ @see #RemovePart(PackagePartName)
+
+
+ Remove a part in this package. If this part is relationship part, then
+ delete all relationships in the source part.
+
+ @param PartName
+ The part name of the part to Remove.
+
+
+ Remove a part from this package as well as its relationship part, if one
+ exists, and all parts listed in the relationship part. Be aware that this
+ do not delete relationships which target the specified part.
+
+ @param PartName
+ The name of the part to delete.
+ @throws InvalidFormatException
+ Throws if the associated relationship part of the specified
+ part is not valid.
+
+
+ Delete the part with the specified name and its associated relationships
+ part if one exists. Prefer the use of this method to delete a part in the
+ package, compare to the Remove() methods that don't Remove associated
+ relationships part.
+
+ @param PartName
+ Name of the part to delete
+
+
+ Delete the part with the specified name and all part listed in its
+ associated relationships part if one exists. This process is recursively
+ apply to all parts in the relationships part of the specified part.
+ Prefer the use of this method to delete a part in the package, compare to
+ the Remove() methods that don't Remove associated relationships part.
+
+ @param PartName
+ Name of the part to delete
+
+
+ Check if a part already exists in this package from its name.
+
+ @param PartName
+ Part name to check.
+ @return true if the part is logically Added to this package, else
+ false.
+
+
+ Add a relationship to the package (except relationships part).
+
+ Check rule M4.1 : The format designer shall specify and the format
+ producer shall Create at most one core properties relationship for a
+ package. A format consumer shall consider more than one core properties
+ relationship for a package to be an error. If present, the relationship
+ shall target the Core Properties part.
+
+ Check rule M1.25: The Relationships part shall not have relationships to
+ any other part. Package implementers shall enforce this requirement upon
+ the attempt to Create such a relationship and shall treat any such
+ relationship as invalid.
+
+ @param targetPartName
+ Target part name.
+ @param targetMode
+ Target mode, either Internal or External.
+ @param relationshipType
+ Relationship type.
+ @param relID
+ ID of the relationship.
+ @see PackageRelationshipTypes
+
+
+ Add a package relationship.
+
+ @param targetPartName
+ Target part name.
+ @param targetMode
+ Target mode, either Internal or External.
+ @param relationshipType
+ Relationship type.
+ @see PackageRelationshipTypes
+
+
+ Adds an external relationship to a part (except relationships part).
+
+ The targets of external relationships are not subject to the same
+ validity checks that internal ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target
+ External target of the relationship
+ @param relationshipType
+ Type of relationship.
+ @return The newly Created and Added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddExternalRelationship(java.lang.String,
+ java.lang.String)
+
+
+ Adds an external relationship to a part (except relationships part).
+
+ The targets of external relationships are not subject to the same
+ validity checks that internal ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target
+ External target of the relationship
+ @param relationshipType
+ Type of relationship.
+ @param id
+ Relationship unique id.
+ @return The newly Created and Added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddExternalRelationship(java.lang.String,
+ java.lang.String)
+
+
+ Delete a relationship from this package.
+
+ @param id
+ Id of the relationship to delete.
+
+
+ Retrieves all package relationships.
+
+ @return All package relationships of this package.
+ @throws OpenXml4NetException
+ @see #GetRelationshipsHelper(String)
+
+
+ Retrieves all relationships with the specified type.
+
+ @param relationshipType
+ The filter specifying the relationship type.
+ @return All relationships with the specified relationship type.
+
+
+ Retrieves all relationships with specified id (normally just ine because
+ a relationship id is supposed to be unique).
+
+ @param id
+ Id of the wanted relationship.
+
+
+ Clear package relationships.
+
+
+ Ensure that the relationships collection is not null.
+
+
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#GetRelationship(java.lang.String)
+
+
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#hasRelationships()
+
+
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#isRelationshipExists(org.apache.poi.OpenXml4Net.opc.PackageRelationship)
+
+
+ Add a marshaller.
+
+ @param contentType
+ The content type to bind to the specified marshaller.
+ @param marshaller
+ The marshaller to register with the specified content type.
+
+
+ Add an unmarshaller.
+
+ @param contentType
+ The content type to bind to the specified unmarshaller.
+ @param unmarshaller
+ The unmarshaller to register with the specified content type.
+
+
+ Remove a marshaller by its content type.
+
+ @param contentType
+ The content type associated with the marshaller to Remove.
+
+
+ Remove an unmarshaller by its content type.
+
+ @param contentType
+ The content type associated with the unmarshaller to Remove.
+
+
+ Get the package access mode.
+
+ @return the packageAccess The current package access.
+
+
+ Validates the package compliance with the OPC specifications.
+
+ @return true if the package is valid else false
+
+
+ Save the document in the specified file.
+
+ @param targetFile
+ Destination file.
+ @throws IOException
+ Throws if an IO exception occur.
+ @see #save(OutputStream)
+
+
+ Save the document in the specified output stream.
+
+ @param outputStream
+ The stream to save the package.
+ @see #saveImpl(OutputStream)
+
+
+ Core method to Create a package part. This method must be implemented by
+ the subclass.
+
+ @param PartName
+ URI of the part to Create.
+ @param contentType
+ Content type of the part to Create.
+ @return The newly Created package part.
+
+
+ Core method to delete a package part. This method must be implemented by
+ the subclass.
+
+ @param PartName
+ The URI of the part to delete.
+
+
+ Flush the package but not save.
+
+
+ Close the package and cause a save of the package.
+
+
+
+ Close the package without saving the document. Discard all changes made
+ to this package.
+
+
+ Save the package into the specified output stream.
+
+ @param outputStream
+ The output stream use to save this package.
+
+
+ Get the package part mapped to the specified URI.
+
+ @param PartName
+ The URI of the part to retrieve.
+ @return The package part located by the specified URI, else null.
+
+
+ Get all parts link to the package.
+
+ @return A list of the part owned by the package.
+
+
+ Replace a content type in this package.
+
+
+ A typical scneario to call this method is to rename a template file to the main format, e.g.
+ ".dotx" to ".docx"
+ ".dotm" to ".docm"
+ ".xltx" to ".xlsx"
+ ".xltm" to ".xlsm"
+ ".potx" to ".pptx"
+ ".potm" to ".pptm"
+
+ For example, a code converting a .xlsm macro workbook to .xlsx would look as follows:
+
+
+
+ @param oldContentType the content type to be replaced
+ @param newContentType the replacement
+ @return whether replacement was succesfull
+ @since POI-3.8
+
+
+ Specifies package access.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ Read only. Write not authorized.
+
+
+ Write only. Read not authorized.
+
+
+ Read and Write mode.
+
+
+ Open Packaging Convention namespaces URI.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ Content Types.
+
+
+ Core Properties.
+
+
+ Digital Signatures.
+
+
+ Relationships.
+
+
+ Markup Compatibility.
+
+
+ Provides a base class for parts stored in a Package.
+
+ @author Julien Chable
+ @version 0.9
+
+
+ This part's container.
+
+
+ The part name. (required by the specification [M1.1])
+
+
+ The type of content of this part. (required by the specification [M1.2])
+
+
+ Flag to know if this part is a relationship.
+
+
+ Flag to know if this part has been logically deleted.
+
+
+ This part's relationships.
+
+
+ Constructor.
+
+ @param pack
+ Parent package.
+ @param partName
+ The part name, relative to the parent Package root.
+ @param contentType
+ The content type.
+ @throws InvalidFormatException
+ If the specified URI is not valid.
+
+
+ Constructor.
+
+ @param pack
+ Parent package.
+ @param partName
+ The part name, relative to the parent Package root.
+ @param contentType
+ The content type.
+ @param loadRelationships
+ Specify if the relationships will be loaded
+ @throws InvalidFormatException
+ If the specified URI is not valid.
+
+
+ Constructor.
+
+ @param pack
+ Parent package.
+ @param partName
+ The part name, relative to the parent Package root.
+ @param contentType
+ The Multipurpose Internet Mail Extensions (MIME) content type
+ of the part's data stream.
+
+
+ Adds an external relationship to a part (except relationships part).
+
+ The targets of external relationships are not subject to the same
+ validity checks that internal ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target
+ External target of the relationship
+ @param relationshipType
+ Type of relationship.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String,
+ java.lang.String)
+
+
+ Adds an external relationship to a part (except relationships part).
+
+ The targets of external relationships are not subject to the same
+ validity checks that internal ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target
+ External target of the relationship
+ @param relationshipType
+ Type of relationship.
+ @param id
+ Relationship unique id.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String,
+ java.lang.String)
+
+
+ Add a relationship to a part (except relationships part).
+
+ @param targetPartName
+ Name of the target part. This one must be relative to the
+ source root directory of the part.
+ @param targetMode
+ Mode [Internal|External].
+ @param relationshipType
+ Type of relationship.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName,
+ org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String)
+
+
+ Add a relationship to a part (except relationships part).
+
+ Check rule M1.25: The Relationships part shall not have relationships to
+ any other part. Package implementers shall enforce this requirement upon
+ the attempt to create such a relationship and shall treat any such
+ relationship as invalid.
+
+ @param targetPartName
+ Name of the target part. This one must be relative to the
+ source root directory of the part.
+ @param targetMode
+ Mode [Internal|External].
+ @param relationshipType
+ Type of relationship.
+ @param id
+ Relationship unique id.
+ @return The newly created and added relationship
+
+ @throws InvalidFormatException
+ If the URI point to a relationship part URI.
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName,
+ org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String, java.lang.String)
+
+
+ Add a relationship to a part (except relationships part).
+
+ @param targetURI
+ URI the target part. Must be relative to the source root
+ directory of the part.
+ @param targetMode
+ Mode [Internal|External].
+ @param relationshipType
+ Type of relationship.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName,
+ org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String)
+
+
+ Add a relationship to a part (except relationships part).
+
+ Check rule M1.25: The Relationships part shall not have relationships to
+ any other part. Package implementers shall enforce this requirement upon
+ the attempt to create such a relationship and shall treat any such
+ relationship as invalid.
+
+ @param targetURI
+ URI of the target part. Must be relative to the source root
+ directory of the part.
+ @param targetMode
+ Mode [Internal|External].
+ @param relationshipType
+ Type of relationship.
+ @param id
+ Relationship unique id.
+ @return The newly created and added relationship
+
+ @throws InvalidFormatException
+ If the URI point to a relationship part URI.
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName,
+ org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String, java.lang.String)
+
+
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#clearRelationships()
+
+
+ Delete the relationship specified by its id.
+
+ @param id
+ The ID identified the part to delete.
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#removeRelationship(java.lang.String)
+
+
+ Retrieve all the relationships attached to this part.
+
+ @return This part's relationships.
+ @throws OpenXml4NetException
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationships()
+
+
+ Retrieves a package relationship from its id.
+
+ @param id
+ ID of the package relationship to retrieve.
+ @return The package relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationship(java.lang.String)
+
+
+ Retrieve all relationships attached to this part which have the specified
+ type.
+
+ @param relationshipType
+ Relationship type filter.
+ @return All relationships from this part that have the specified type.
+ @throws InvalidFormatException
+ If an error occurs while parsing the part.
+ @throws InvalidOperationException
+ If the package is open in write only mode.
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationshipsByType(java.lang.String)
+
+
+ Implementation of the getRelationships method().
+
+ @param filter
+ Relationship type filter. If null then the filter is
+ disabled and return all the relationships.
+ @return All relationships from this part that have the specified type.
+ @throws InvalidFormatException
+ Throws if an error occurs during parsing the relationships
+ part.
+ @throws InvalidOperationException
+ Throws if the package is open en write only mode.
+ @see #getRelationshipsByType(String)
+
+
+ Knows if the part have any relationships.
+
+ @return true if the part have at least one relationship else
+ false.
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#hasRelationships()
+
+
+ Checks if the specified relationship is part of this package part.
+
+ @param rel
+ The relationship to check.
+ @return true if the specified relationship exists in this part,
+ else returns false
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#isRelationshipExists(org.apache.poi.OpenXml4Net.opc.PackageRelationship)
+
+
+ Get the PackagePart that is the target of a relationship.
+
+ @param rel A relationship from this part to another one
+ @return The target part of the relationship
+
+
+ Get the input stream of this part to read its content.
+
+ @return The input stream of the content of this part, else
+ null.
+
+
+ Get the output stream of this part. If the part is originally embedded in
+ Zip package, it'll be transform intot a MemoryPackagePart in
+ order to write inside (the standard Java API doesn't allow to write in
+ the file)
+
+ @see org.apache.poi.openxml4j.opc.internal.MemoryPackagePart
+
+
+ Throws an exception if this package part is a relationship part.
+
+ @throws InvalidOperationException
+ If this part is a relationship part.
+
+
+ Ensure the package relationships collection instance is built.
+
+ @throws InvalidFormatException
+ Throws if
+
+
+ @return the uri
+
+
+ @return the contentType
+
+
+ @return The Content Type, including parameters, of the part
+
+
+ @return true if this part is a relationship
+
+
+ @return true if this part has been logically deleted
+
+
+ @return The length of the part in bytes, or -1 if not known
+
+
+ Compare based on the package part name, using a natural sort order
+
+
+ Abtract method that get the input stream of this part.
+
+ @exception IOException
+ Throws if an IO Exception occur in the implementation
+ method.
+
+
+ Abstract method that get the output stream of this part.
+
+
+ Save the content of this part and the associated relationships part (if
+ this part own at least one relationship) into the specified output
+ stream.
+
+ @param zos
+ Output stream to save this part.
+ @throws OpenXml4NetException
+ If any exception occur.
+
+
+ Load the content of this part.
+
+ @param ios
+ The input stream of the content to load.
+ @return true if the content has been successfully loaded, else
+ false.
+ @throws InvalidFormatException
+ Throws if the content format is invalid.
+
+
+ Close this part : flush this part, close the input stream and output
+ stream. After this method call, the part must be available for packaging.
+
+
+ Flush the content of this part. If the input stream and/or output stream
+ as in a waiting state to read or write, the must to empty their
+ respective buffer.
+
+
+ Allows sub-classes to clean up before new data is added.
+
+
+ A package part collection.
+
+ @author Julien Chable
+ @version 0.1
+
+
+ Arraylist use to store this collection part names as string for rule
+ M1.11 optimized checking.
+
+
+ Check rule [M1.11]: a package implementer shall neither create nor
+ recognize a part with a part name derived from another part name by
+ Appending segments to it.
+
+ @exception InvalidOperationException
+ Throws if you try to add a part with a name derived from
+ another part name.
+
+
+ An immutable Open Packaging Convention compliant part name.
+
+ @author Julien Chable
+
+ @see http://www.ietf.org/rfc/rfc3986.txt
+
+
+ Part name stored as an URI.
+
+
+ Reserved characters for sub delimitations.
+
+
+
+ Authorized reserved characters for pChar.
+
+
+ Flag to know if this part name is from a relationship part name.
+
+
+ Constructor. Makes a ValidPartName object from a java.net.URI
+
+ @param uri
+ The URI to validate and to transform into ValidPartName.
+ @param checkConformance
+ Flag to specify if the contructor have to validate the OPC
+ conformance. Must be always true except for
+ special URI like '/' which is needed for internal use by
+ OpenXml4Net but is not valid.
+ @throws InvalidFormatException
+ Throw if the specified part name is not conform to Open
+ Packaging Convention specifications.
+ @see java.net.URI
+
+
+ Constructor. Makes a ValidPartName object from a String part name.
+
+ @param partName
+ Part name to valid and to create.
+ @param checkConformance
+ Flag to specify if the contructor have to validate the OPC
+ conformance. Must be always true except for
+ special URI like '/' which is needed for internal use by
+ OpenXml4Net but is not valid.
+ @throws InvalidFormatException
+ Throw if the specified part name is not conform to Open
+ Packaging Convention specifications.
+
+
+ Check if the specified part name is a relationship part name.
+
+ @param partUri
+ The URI to check.
+ @return true if this part name respect the relationship
+ part naming convention else false.
+
+
+ Know if this part name is a relationship part name.
+
+ @return true if this part name respect the relationship
+ part naming convention else false.
+
+
+ Throws an exception (of any kind) if the specified part name does not
+ follow the Open Packaging Convention specifications naming rules.
+
+ @param partUri
+ The part name to check.
+ @throws Exception
+ Throws if the part name is invalid.
+
+
+ Throws an exception if the specified URI is empty. [M1.1]
+
+ @param partURI
+ Part URI to check.
+ @throws InvalidFormatException
+ If the specified URI is empty.
+
+
+ Throws an exception if the part name has empty segments. [M1.3]
+
+ Throws an exception if a segment any characters other than pchar
+ characters. [M1.6]
+
+ Throws an exception if a segment contain percent-encoded forward slash
+ ('/'), or backward slash ('\') characters. [M1.7]
+
+ Throws an exception if a segment contain percent-encoded unreserved
+ characters. [M1.8]
+
+ Throws an exception if the specified part name's segments end with a dot
+ ('.') character. [M1.9]
+
+ Throws an exception if a segment doesn't include at least one non-dot
+ character. [M1.10]
+
+ @param partUri
+ The part name to check.
+ @throws InvalidFormatException
+ if the specified URI contain an empty segments or if one the
+ segments contained in the part name, ends with a dot ('.')
+ character.
+
+
+ Throws an exception if a segment any characters other than pchar
+ characters. [M1.6]
+
+ Throws an exception if a segment contain percent-encoded forward slash
+ ('/'), or backward slash ('\') characters. [M1.7]
+
+ Throws an exception if a segment contain percent-encoded unreserved
+ characters. [M1.8]
+
+ @param segment
+ The segment to check
+
+
+ Throws an exception if the specified part name doesn't start with a
+ forward slash character '/'. [M1.4]
+
+ @param partUri
+ The part name to check.
+ @throws InvalidFormatException
+ If the specified part name doesn't start with a forward slash
+ character '/'.
+
+
+ Throws an exception if the specified part name ends with a forwar slash
+ character '/'. [M1.5]
+
+ @param partUri
+ The part name to check.
+ @throws InvalidFormatException
+ If the specified part name ends with a forwar slash character
+ '/'.
+
+
+ Throws an exception if the specified URI is absolute.
+
+ @param partUri
+ The URI to check.
+ @throws InvalidFormatException
+ Throws if the specified URI is absolute.
+
+
+ Compare two part name following the rule M1.12 :
+
+ Part name equivalence is determined by comparing part names as
+ case-insensitive ASCII strings. Packages shall not contain equivalent
+ part names and package implementers shall neither create nor recognize
+ packages with equivalent part names. [M1.12]
+
+
+ Retrieves the extension of the part name if any. If there is no extension
+ returns an empty String. Example : '/document/content.xml' => 'xml'
+
+ @return The extension of the part name.
+
+
+ Get this part name.
+
+ @return The name of this part name.
+
+
+ Part name equivalence is determined by comparing part names as
+ case-insensitive ASCII strings. Packages shall not contain equivalent
+ part names and package implementers shall neither create nor recognize
+ packages with equivalent part names. [M1.12]
+
+
+ Part name property getter.
+
+ @return This part name URI.
+
+
+
+
+ Represents the core properties of an OPC package.
+
+ @author Julien Chable
+ @version 1.0
+ @see org.apache.poi.OpenXml4Net.opc.OPCPackage
+
+
+ Set the category of the content of this package.
+
+
+ Set the category of the content of this package.
+
+
+ Set the status of the content.
+
+
+ Get the status of the content.
+
+
+ Get the type of content represented, generally defined by a specific use
+ and intended audience.
+
+
+ Set the type of content represented, generally defined by a specific use
+ and intended audience.
+
+
+ Get the date of creation of the resource.
+
+
+ Set the date of creation of the resource.
+
+
+ Set the date of creation of the resource.
+
+
+ Get the entity primarily responsible for making the content of the
+ resource.
+
+
+ Set the entity primarily responsible for making the content of the
+ resource.
+
+
+ Get the explanation of the content of the resource.
+
+
+ Set the explanation of the content of the resource.
+
+
+ Get an unambiguous reference to the resource within a given context.
+
+
+ Set an unambiguous reference to the resource within a given context.
+
+
+ Get a delimited Set of keywords to support searching and indexing. This
+ is typically a list of terms that are not available elsewhere in the
+ properties
+
+
+ Set a delimited Set of keywords to support searching and indexing. This
+ is typically a list of terms that are not available elsewhere in the
+ properties
+
+
+ Get the language of the intellectual content of the resource.
+
+
+ Set the language of the intellectual content of the resource.
+
+
+ Get the user who performed the last modification.
+
+
+ Set the user who performed the last modification.
+
+
+ Get the date and time of the last printing.
+
+
+ Set the date and time of the last printing.
+
+
+ Set the date and time of the last printing.
+
+
+ Get the date on which the resource was changed.
+
+
+ Set the date on which the resource was changed.
+
+
+ Set the date on which the resource was changed.
+
+
+ Get the revision number.
+
+
+ Set the revision number.
+
+
+ Get the topic of the content of the resource.
+
+
+ Set the topic of the content of the resource.
+
+
+ Get the name given to the resource.
+
+
+ Set the name given to the resource.
+
+
+ Get the version number.
+
+
+ Set the version number.
+
+
+ A part relationship.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ L'ID de la relation.
+
+
+ Reference to the package.
+
+
+ Type de relation.
+
+
+ Partie source de cette relation.
+
+
+ Le mode de ciblage [Internal|External]
+
+
+ URI de la partie cible.
+
+
+ Constructor.
+
+ @param pkg
+ @param sourcePart
+ @param targetUri
+ @param targetMode
+ @param relationshipType
+ @param id
+
+
+ @return the container
+
+
+ @return the id
+
+
+ @return the relationshipType
+
+
+ @return the source
+
+
+
+ @return URL of the source part of this relationship
+
+
+ public URI getSourceUri(){ }
+
+ @return the targetMode
+
+
+ @return the targetUri
+
+
+ Represents a collection of PackageRelationship elements that are owned by a
+ given PackagePart or the Package.
+
+ @author Julien Chable, CDubettier
+ @version 0.1
+
+
+ Package relationships ordered by ID.
+
+
+ Package relationships ordered by type.
+
+
+ This relationshipPart.
+
+
+ Source part.
+
+
+ This part name.
+
+
+ Reference to the package.
+
+
+ The ID number of the next rID# to generate, or -1
+ if that is still to be determined.
+
+
+ Constructor.
+
+
+ Copy constructor.
+
+ This collection will contain only elements from the specified collection
+ for which the type is compatible with the specified relationship type
+ filter.
+
+ @param coll
+ Collection to import.
+ @param filter
+ Relationship type filter.
+
+
+ Constructor.
+
+
+ Constructor.
+
+ @throws InvalidFormatException
+ Throws if the format of the content part is invalid.
+
+ @throws InvalidOperationException
+ Throws if the specified part is a relationship part.
+
+
+ Constructor. Parse the existing package relationship part if one exists.
+
+ @param container
+ The parent package.
+ @param part
+ The part that own this relationships collection. If null
+ then this part is considered as the package root.
+ @throws InvalidFormatException
+ If an error occurs during the parsing of the relatinships
+ part fo the specified part.
+
+
+ Get the relationship part name of the specified part.
+
+ @param part
+ The part .
+ @return The relationship part name of the specified part. Be careful,
+ only the correct name is returned, this method does not check if
+ the part really exist in a package !
+ @throws InvalidOperationException
+ Throws if the specified part is a relationship part.
+
+
+ Add the specified relationship to the collection.
+
+ @param relPart
+ The relationship to add.
+
+
+ Add a relationship to the collection.
+
+ @param targetUri
+ Target URI.
+ @param targetMode
+ The target mode : INTERNAL or EXTERNAL
+ @param relationshipType
+ Relationship type.
+ @param id
+ Relationship ID.
+ @return The newly created relationship.
+ @see PackageAccess
+
+
+ Remove a relationship by its ID.
+
+ @param id
+ The relationship ID to Remove.
+
+
+ Remove a relationship by its reference.
+
+ @param rel
+ The relationship to delete.
+
+
+ Retrieves a relationship by its index in the collection.
+
+ @param index
+ Must be a value between [0-relationships_count-1]
+
+
+ Retrieves a package relationship based on its id.
+
+ @param id
+ ID of the package relationship to retrieve.
+ @return The package relationship identified by the specified id.
+
+
+ Get the numbe rof relationships in the collection.
+
+
+ Parse the relationship part and add all relationship in this collection.
+
+ @param relPart
+ The package part to parse.
+ @throws InvalidFormatException
+ Throws if the relationship part is invalid.
+
+
+ Retrieves all relations with the specified type.
+
+ @param typeFilter
+ Relationship type filter. If null then all
+ relationships are returned.
+ @return All relationships of the type specified by the filter.
+
+
+ Get this collection's iterator.
+
+
+ Get an iterator of a collection with all relationship with the specified
+ type.
+
+ @param typeFilter
+ Type filter.
+ @return An iterator to a collection containing all relationships with the
+ specified type contain in this collection.
+
+
+ Clear all relationships.
+
+
+ Relationship types.
+
+ @author Julien Chable
+ @version 0.2
+
+
+ Core properties relationship type.
+
+
+ The standard specifies a source relations ship for the Core File Properties part as follows:
+ http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties.
+
+
+ Office uses the following source relationship for the Core File Properties part:
+ http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties.
+
+ See 2.1.33 Part 1 Section 15.2.11.1, Core File Properties Part in [MS-OE376].pdf
+
+
+ Core properties relationship type as defiend in ECMA 376.
+
+
+ Digital signature relationship type.
+
+
+ Digital signature certificate relationship type.
+
+
+ Digital signature origin relationship type.
+
+
+ Thumbnail relationship type.
+
+
+ Extended properties relationship type.
+
+
+ Extended properties relationship type for strict ooxml.
+
+
+ Custom properties relationship type.
+
+
+ Core document relationship type.
+
+
+ Core document relationship type for strict ooxml.
+
+
+ Custom XML relationship type.
+
+
+ Image type.
+
+
+ Hyperlink type.
+
+
+ Style type.
+
+
+ External Link to another Document
+
+
+ Visio 2010 VSDX equivalent of package {@link #CORE_DOCUMENT}
+
+
+ Helper for part and pack Uri.
+
+ @author Julien Chable, CDubet, Kim Ung
+ @version 0.1
+
+
+ Package root Uri.
+
+
+ Extension name of a relationship part.
+
+
+ Segment name of a relationship part.
+
+
+ Segment name of the package properties folder.
+
+
+ Core package properties art name.
+
+
+ Forward slash Uri separator.
+
+
+ Forward slash Uri separator.
+
+
+ Package relationships part Uri
+
+
+ Package relationships part name.
+
+
+ Core properties part Uri.
+
+
+ Core properties partname.
+
+
+ Root package Uri.
+
+
+ Root package part name.
+
+
+ Gets the Uri for the package root.
+
+ @return Uri of the package root.
+
+
+ Know if the specified Uri is a relationship part name.
+
+ @param partUri
+ Uri to check.
+ @return true if the Uri false.
+
+
+ Get file name from the specified Uri.
+
+
+ Get the file name without the trailing extension.
+
+
+ Get the directory path from the specified Uri.
+
+
+ Combine two URIs.
+
+ @param prefix the prefix Uri
+ @param suffix the suffix Uri
+
+ @return the Combined Uri
+
+
+ Combine a string Uri with a prefix and a suffix.
+
+
+ Fully relativize the source part Uri against the target part Uri.
+
+ @param sourceURI
+ The source part Uri.
+ @param targetURI
+ The target part Uri.
+ @return A fully relativize part name Uri ('word/media/image1.gif',
+ '/word/document.xml' => 'media/image1.gif') else
+ null.
+
+
+ Fully relativize the source part URI against the target part URI.
+
+ @param sourceURI
+ The source part URI.
+ @param targetURI
+ The target part URI.
+ @return A fully relativize part name URI ('word/media/image1.gif',
+ '/word/document.xml' => 'media/image1.gif') else
+ null.
+
+
+ Resolve a source uri against a target.
+
+ @param sourcePartUri
+ The source Uri.
+ @param targetUri
+ The target Uri.
+ @return The resolved Uri.
+
+
+ Get Uri from a string path.
+
+
+ Get the source part Uri from a specified relationships part.
+
+ @param relationshipPartUri
+ The relationship part use to retrieve the source part.
+ @return The source part Uri from the specified relationships part.
+
+
+ Create an OPC compliant part name by throwing an exception if the Uri is
+ not valid.
+
+ @param partUri
+ The part name Uri to validate.
+ @return A valid part name object, else null.
+ @throws InvalidFormatException
+ Throws if the specified Uri is not OPC compliant.
+
+
+ Create an OPC compliant part name.
+
+ @param partName
+ The part name to validate.
+ @return The correspondant part name if valid, else null.
+ @throws InvalidFormatException
+ Throws if the specified part name is not OPC compliant.
+ @see #CreatePartName(Uri)
+
+
+ Create an OPC compliant part name by resolving it using a base part.
+
+ @param partName
+ The part name to validate.
+ @param relativePart
+ The relative base part.
+ @return The correspondant part name if valid, else null.
+ @throws InvalidFormatException
+ Throws if the specified part name is not OPC compliant.
+ @see #CreatePartName(Uri)
+
+
+ Create an OPC compliant part name by resolving it using a base part.
+
+ @param partName
+ The part name Uri to validate.
+ @param relativePart
+ The relative base part.
+ @return The correspondant part name if valid, else null.
+ @throws InvalidFormatException
+ Throws if the specified part name is not OPC compliant.
+ @see #CreatePartName(Uri)
+
+
+ Validate a part Uri by returning a bool.
+ ([M1.1],[M1.3],[M1.4],[M1.5],[M1.6])
+
+ (OPC Specifications 8.1.1 Part names) :
+
+ Part Name Syntax
+
+ The part name grammar is defined as follows:
+
+ part_name = 1*( "/" segment )
+
+ segment = 1*( pchar )
+
+
+ (pchar is defined in RFC 3986)
+
+ @param partUri
+ The Uri to validate.
+ @return true if the Uri is valid to the OPC Specifications, else
+ false
+
+ @see #CreatePartName(Uri)
+
+
+ Decode a Uri by converting all percent encoded character into a String
+ character.
+
+ @param uri
+ The Uri to decode.
+ @return The specified Uri in a String with converted percent encoded
+ characters.
+
+
+
+
+ Build a part name where the relationship should be stored ((ex
+ /word/document.xml -> /word/_rels/document.xml.rels)
+
+ @param partName
+ Source part Uri
+ @return the full path (as Uri) of the relation file
+ @throws InvalidOperationException
+ Throws if the specified Uri is a relationshp part.
+
+
+ Add a relationship to a part (except relationships part).
+
+ @param targetPartName
+ Name of the target part. This one must be relative to the
+ source root directory of the part.
+ @param targetMode
+ Mode [Internal|External].
+ @param relationshipType
+ Type of relationship.
+ @return The newly created and added relationship
+
+
+ * Add a relationship to a part (except relationships part).
+
+ * Check rule M1.25: The Relationships part shall not have relationships to
+ * any other part. Package implementers shall enforce this requirement upon
+ * the attempt to create such a relationship and shall treat any such
+ * relationship as invalid.
+ *
+ * @param targetPartName
+ * Name of the target part. This one must be relative to the
+ * source root directory of the part.
+ * @param targetMode
+ * Mode [Internal|External].
+ * @param relationshipType
+ * Type of relationship.
+ * @param id
+ * Relationship unique id.
+ * @return The newly created and added relationship
+ *
+ * @throws InvalidFormatException
+ * If the URI point to a relationship part URI.
+
+
+ Adds an external relationship to a part
+ (except relationships part).
+
+ The targets of external relationships are not
+ subject to the same validity checks that internal
+ ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target External target of the relationship
+ @param relationshipType Type of relationship.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String)
+
+
+ Adds an external relationship to a part
+ (except relationships part).
+
+ The targets of external relationships are not
+ subject to the same validity checks that internal
+ ones are, as the contents is potentially
+ any file, URL or similar.
+
+ @param target External target of the relationship
+ @param relationshipType Type of relationship.
+ @param id Relationship unique id.
+ @return The newly created and added relationship
+ @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String)
+
+
+ Delete all the relationships attached to this.
+
+
+ Delete the relationship specified by its id.
+
+ @param id
+ The ID identified the part to delete.
+
+
+ Retrieve all the relationships attached to this.
+
+ @return This part's relationships.
+ @throws OpenXml4NetException
+
+
+ Retrieves a package relationship from its id.
+
+ @param id
+ ID of the package relationship to retrieve.
+ @return The package relationship
+
+
+ Retrieve all relationships attached to this part which have the specified
+ type.
+
+ @param relationshipType
+ Relationship type filter.
+ @return All relationships from this part that have the specified type.
+ @throws InvalidFormatException
+ If an error occurs while parsing the part.
+ @throws InvalidOperationException
+ If the package is open in write only mode.
+
+
+ Knows if the part have any relationships.
+
+ @return true if the part have at least one relationship else
+ false.
+
+
+ Checks if the specified relationship is part of this package part.
+
+ @param rel
+ The relationship to check.
+ @return true if the specified relationship exists in this part,
+ else returns false
+
+
+ Turning the DOM4j object in the specified output stream.
+
+ @param xmlContent
+ The XML document.
+ @param outStream
+ The Stream in which the XML document will be written.
+ @return true if the xml is successfully written in the stream,
+ else false.
+
+
+ Copy the input stream into the output stream.
+
+ @param inStream
+ The source stream.
+ @param outStream
+ The destination stream.
+ @return true if the operation succeed, else return false.
+
+
+ Specifies whether the target of a PackageRelationship is inside or outside a
+ Package.
+
+ @author Julien Chable
+ @version 1.0
+
+
+ The relationship references a resource that is external to the package.
+
+
+ The relationship references a part that is inside the package.
+
+
+ Physical zip package.
+
+ @author Julien Chable
+
+
+ Zip archive, as either a file on disk,
+ or a stream
+
+
+ Constructor. Creates a new ZipPackage.
+
+
+ Constructor. Operation not supported.
+
+ @param in
+ Zip input stream to load.
+ @param access
+ @throws ArgumentException
+ If the specified input stream not an instance of
+ ZipInputStream.
+
+
+ Constructor. Opens a Zip based Open XML document.
+
+ @param path
+ The path of the file to open or create.
+ @param access
+ The package access mode.
+ @throws InvalidFormatException
+ If the content type part parsing encounters an error.
+
+
+ Constructor. Opens a Zip based Open XML document.
+
+ @param file
+ The file to open or create.
+ @param access
+ The package access mode.
+ @throws InvalidFormatException
+ If the content type part parsing encounters an error.
+
+
+ Retrieves the parts from this package. We assume that the package has not
+ been yet inspect to retrieve all the parts, this method will open the
+ archive and look for all parts contain inside it. If the package part
+ list is not empty, it will be emptied.
+
+ @return All parts contain in this package.
+ @throws InvalidFormatException
+ Throws if the package is not valid.
+
+
+ Builds a PackagePartName for the given ZipEntry,
+ or null if it's the content types / invalid part
+
+
+ Create a new MemoryPackagePart from the specified URI and content type
+
+
+ aram partName The part URI.
+
+ @param contentType
+ The part content type.
+ @return The newly created zip package part, else null.
+
+
+ Delete a part from the package
+
+ @throws ArgumentException
+ Throws if the part URI is nulll or invalid.
+
+
+ Flush the package. Do nothing.
+
+
+ Close and save the package.
+
+ @see #close()
+
+
+ Create a unique identifier to be use as a temp file name.
+
+ @return A unique identifier use to be use as a temp file name.
+
+
+ Close the package without saving the document. Discard all the changes
+ made to this package.
+
+
+ Implement the getPart() method to retrieve a part from its URI in the
+ current package
+
+
+ @see #getPart(PackageRelationship)
+
+
+ Save this package into the specified stream
+
+
+ @param outputStream
+ The stream use to save this package.
+
+ @see #save(OutputStream)
+
+
+ Get the zip archive
+
+ @return The zip archive.
+
+
+ Zip implementation of a PackagePart.
+
+ @author Julien Chable
+ @version 1.0
+ @see PackagePart
+
+
+ The zip entry corresponding to this part.
+
+
+ Constructor.
+
+ @param container
+ The container package.
+ @param partName
+ Part name.
+ @param contentType
+ Content type.
+ @throws InvalidFormatException
+ Throws if the content of this part invalid.
+
+
+ Constructor.
+
+ @param container
+ The container package.
+ @param zipEntry
+ The zip entry corresponding to this part.
+ @param partName
+ The part name.
+ @param contentType
+ Content type.
+ @throws InvalidFormatException
+ Throws if the content of this part is invalid.
+
+
+ Get the zip entry of this part.
+
+ @return The zip entry in the zip structure coresponding to this part.
+
+
+ Implementation of the getInputStream() which return the inputStream of
+ this part zip entry.
+
+ @return Input stream of this part zip entry.
+
+
+ An Interface to make getting the different bits
+ of a Zip File easy.
+ Allows you to get at the ZipEntries, without
+ needing to worry about ZipFile vs ZipInputStream
+ being annoyingly very different.
+
+
+ Returns an Enumeration of all the Entries
+
+
+ Returns an InputStream of the decompressed
+ data that makes up the entry
+
+
+ Indicates we are done with reading, and
+ resources may be freed
+
+
+ A ZipEntrySource wrapper around a ZipFile.
+ Should be as low in terms of memory as a
+ normal ZipFile implementation is.
+
+
+ Provides a way to get at all the ZipEntries
+ from a ZipInputStream, as many times as required.
+ Allows a ZipInputStream to be treated much like
+ a ZipFile, for a price in terms of memory.
+ Be sure to call {@link #close()} as soon as you're
+ done, to free up that memory!
+
+
+ Reads all the entries from the ZipInputStream
+ into memory, and closes the source stream.
+ We'll then eat lots of memory, but be able to
+ work with the entries at-will.
+
+
+ Why oh why oh why are Iterator and Enumeration
+ still not compatible?
+
+
+ So we can close the real zip entry and still
+ effectively work with it.
+ Holds the (decompressed!) data in memory, so
+ close this as soon as you can!
+
+
+
diff --git a/MES_Manage/Bin/NPOI.OpenXmlFormats.dll b/MES_Manage/Bin/NPOI.OpenXmlFormats.dll
new file mode 100644
index 0000000..5944558
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OpenXmlFormats.dll differ
diff --git a/MES_Manage/Bin/NPOI.OpenXmlFormats.pdb b/MES_Manage/Bin/NPOI.OpenXmlFormats.pdb
new file mode 100644
index 0000000..d40c9be
Binary files /dev/null and b/MES_Manage/Bin/NPOI.OpenXmlFormats.pdb differ
diff --git a/MES_Manage/Bin/NPOI.dll b/MES_Manage/Bin/NPOI.dll
new file mode 100644
index 0000000..e5145dd
Binary files /dev/null and b/MES_Manage/Bin/NPOI.dll differ
diff --git a/MES_Manage/Bin/NPOI.pdb b/MES_Manage/Bin/NPOI.pdb
new file mode 100644
index 0000000..95392f7
Binary files /dev/null and b/MES_Manage/Bin/NPOI.pdb differ
diff --git a/MES_Manage/Bin/NPOI.xml b/MES_Manage/Bin/NPOI.xml
new file mode 100644
index 0000000..ea8085d
--- /dev/null
+++ b/MES_Manage/Bin/NPOI.xml
@@ -0,0 +1,43613 @@
+
+
+
+ NPOI
+
+
+
+ Common abstract class for {@link EscherOptRecord} and
+ {@link EscherTertiaryOptRecord}
+
+ @author Sergey Vladimirov (vlsergey {at} gmail {dot} com)
+ @author Glen Stampoultzis
+
+
+ Add a property to this record.
+
+
+ The list of properties stored by this record.
+
+
+ The list of properties stored by this record.
+
+
+ Records should be sorted by property number before being stored.
+
+
+ * Set an escher property. If a property with given propId already
+ exists it is replaced.
+ *
+ * @param value the property to set.
+
+
+ Retrieve the string representation of this record.
+
+
+ The following enum specifies values that indicate special procedural properties that
+ are used to modify the color components of another color. These values are combined with
+ those of the {@link SysIndexSource} enum or with a user-specified color.
+ The first six values are mutually exclusive.
+
+
+ An OfficeArtCOLORREF structure entry which also handles color extension opid data
+
+
+ @return {@link SysIndexSource} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null
+
+
+ Return the {@link SysIndexProcedure} - for invert flag use {@link #getSysIndexInvert()}
+ @return {@link SysIndexProcedure} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null
+
+
+ @return 0 for no invert flag, 1 for {@link SysIndexProcedure#INVERT_AFTER} and
+ 2 for {@link SysIndexProcedure#INVERT_HIGHBIT_AFTER}
+
+
+ @return index of the scheme color or -1 if {@link #hasSchemeIndexFlag()} is {@code false}
+
+ @see NPOI.HSLF.Record.ColorSchemeAtom#getColor(int)
+
+
+ @return index of current palette (color) or -1 if {@link #hasPaletteIndexFlag()} is {@code false}
+
+
+ "The OfficeArtTertiaryFOPT record specifies a table of OfficeArtRGFOPTE properties, as defined in section 2.3.1."
+ -- [MS-ODRAW] -- v20110608; Office Drawing Binary File Format
+
+ @author Sergey Vladimirov (vlsergey {at} gmail {dot} com)
+
+
+
+ Generates escher records when provided the byte array containing those records.
+ @author Glen Stampoultzis
+ @author Nick Burch (nick at torchbox . com)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Generates an escher record including the any children contained under that record.
+ An exception is thrown if the record could not be generated.
+
+ The byte array containing the records
+ The starting offset into the byte array
+ The generated escher record
+
+
+
+ Converts from a list of classes into a map that Contains the record id as the key and
+ the Constructor in the value part of the map. It does this by using reflection to look up
+ the RECORD_ID field then using reflection again to find a reference to the constructor.
+
+ The records to convert
+ The map containing the id/constructor pairs.
+
+
+
+ Escher array properties are the most wierd construction ever invented
+ with all sorts of special cases. I'm hopeful I've got them all.
+ @author Glen Stampoultzis (glens at superlinksoftware.com)
+
+
+
+ The size of the header that goes at the
+ start of the array, before the data
+
+
+ Normally, the size recorded in the simple data (for the complex
+ data) includes the size of the header.
+ There are a few cases when it doesn't though...
+
+
+ When Reading a property from data stream remeber if the complex part is empty and Set this flag.
+
+
+
+ Gets the element.
+
+ The index.
+
+
+
+
+ Sets the element.
+
+ The index.
+ The element.
+
+
+
+ Retrieves the string representation for this property.
+
+
+
+
+
+ We have this method because the way in which arrays in escher works
+ is screwed for seemly arbitary reasons. While most properties are
+ fairly consistent and have a predictable array size, escher arrays
+ have special cases.
+
+ The data array containing the escher array information
+ The offset into the array to start Reading from.
+ the number of bytes used by this complex property.
+
+
+
+ Serializes the simple part of this property. ie the first 6 bytes.
+ Needs special code to handle the case when the size doesn't
+ include the size of the header block
+
+
+
+
+
+
+
+ Sometimes the element size is stored as a negative number. We
+ negate it and shift it to Get the real value.
+
+ The size of elements.
+
+
+
+
+ @author Glen Stampoultzis
+ @version $Id: EscherBitmapBlip.java 569827 2007-08-26 15:26:29Z yegor $
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ Serializes the record to an existing byte array.
+
+ the offset within the byte array
+ the data array to Serialize to
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Gets or sets the UID.
+
+ The UID.
+
+
+
+ Gets or sets the marker.
+
+ The marker.
+
+
+
+ Toes the string.
+
+
+
+
+
+ @author Glen Stampoultzis
+ @version $Id: EscherBlipRecord.java 569827 2007-08-26 15:26:29Z yegor $
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ Serializes the record to an existing byte array.
+
+ the offset within the byte array
+ the data array to Serialize to
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ The short name for this record
+
+
+
+
+
+ Gets or sets the picture data.
+
+ The picture data.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Represents a bool property. The actual utility of this property is in doubt because many
+ of the properties marked as bool seem to actually contain special values. In other words
+ they're not true bools.
+ @author Glen Stampoultzis
+
+
+
+
+ Create an instance of an escher bool property.
+
+ The property number (or id)
+ The 32 bit value of this bool property
+
+
+
+ Whether this bool property is true
+
+ true if this instance is true; otherwise, false.
+
+
+
+ Whether this bool property is false
+
+ true if this instance is false; otherwise, false.
+
+
+
+ The BSE record is related closely to the EscherBlipRecord and stores
+ extra information about the blip. A blip record is actually stored inside
+ the BSE record even though the BSE record isn't actually a container record.
+ @author Glen Stampoultzis
+ @see EscherBlipRecord
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array.
+
+ The offset into
+ data to start writing the record data to
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ The short name for this record
+
+
+
+
+
+ Gets or sets the expected blip type under windows (failure to match this blip type will result in
+ Excel converting to this format).
+
+ The blip type win32.
+
+
+
+ Gets or sets the expected blip type under MacOS (failure to match this blip type will result in
+ Excel converting to this format).
+
+ The blip type mac OS.
+
+
+
+ Gets or sets 16 byte MD4 checksum.
+
+ The UID.
+
+
+
+ Gets or sets the tag. (Unused)
+
+ The tag.
+
+
+
+ Gets or sets Blip size in stream..
+
+ The size.
+
+
+
+ Gets or sets the reference count of this blip.
+
+ The ref.
+
+
+
+ Gets or sets the offset in the delay stream..
+
+ The offset.
+
+
+
+ Defines the way this blip is used.
+
+ The usage.
+
+
+
+ Gets or sets the blip name.
+
+ The name.
+
+
+
+ Gets or sets the unused2.
+
+ The unused2.
+
+
+
+ Gets or sets the unused3.
+
+ The unused3.
+
+
+
+ Gets or sets the blip record.
+
+ The blip record.
+
+
+
+ Gets or sets any remaining data in this record.
+
+ The remaining data.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Retrieve the string representation given a blip id.
+
+ The b.
+
+
+
+
+ The escher child achor record is used to specify the position of a shape under an
+ existing group. The first level of shape records use a EscherClientAnchor record instead.
+ @author Glen Stampoultzis
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array.
+
+ The offset into data to start writing the record data to.
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ The record id for the EscherChildAnchorRecord.
+
+
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets or sets offset within the parent coordinate space for the top left point.
+
+ The DX1.
+
+
+
+ Gets or sets the offset within the parent coordinate space for the top left point.
+
+ The dy1.
+
+
+
+ Gets or sets the offset within the parent coordinate space for the bottom right point.
+
+ The DX2.
+
+
+
+ Gets or sets the offset within the parent coordinate space for the bottom right point.
+
+ The dy2.
+
+
+
+ The escher client anchor specifies which rows and cells the shape is bound to as well as
+ the offsets within those cells. Each cell is 1024 units wide by 256 units long regardless
+ of the actual size of the cell. The EscherClientAnchorRecord only applies to the top-most
+ shapes. Shapes contained in groups are bound using the EscherChildAnchorRecords.
+ @author Glen Stampoultzis
+
+
+
+ bit[0] - fMove (1 bit): A bit that specifies whether the shape will be kept intact when the cells are moved.
+ bit[1] - fSize (1 bit): A bit that specifies whether the shape will be kept intact when the cells are resized. If fMove is 1, the value MUST be 1.
+ bit[2-4] - reserved, MUST be 0 and MUST be ignored
+ bit[5-15]- Undefined and MUST be ignored.
+
+ it can take values: 0, 2, 3
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array.
+
+ The offset into data to start writing the record data to.
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ The record id for this record.
+
+
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets or sets the flag.
+
+ 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
+
+
+
+ Gets or sets The column number for the top-left position. 0 based.
+
+ The col1.
+
+
+
+ Gets or sets The x offset within the top-left cell. Range is from 0 to 1023.
+
+ The DX1.
+
+
+
+ Gets or sets The row number for the top-left corner of the shape.
+
+ The row1.
+
+
+
+ Gets or sets The y offset within the top-left corner of the current shape.
+
+ The dy1.
+
+
+
+ Gets or sets The column of the bottom right corner of this shape.
+
+ The col2.
+
+
+
+ Gets or sets The x offset withing the cell for the bottom-right corner of this shape.
+
+ The DX2.
+
+
+
+ Gets or sets The row number for the bottom-right corner of the current shape.
+
+ The row2.
+
+
+
+ Gets or sets The y offset withing the cell for the bottom-right corner of this shape.
+
+ The dy2.
+
+
+
+ Gets or sets the remaining data.
+
+ The remaining data.
+
+
+
+ The EscherClientDataRecord is used to store client specific data about the position of a
+ shape within a container.
+ @author Glen Stampoultzis
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+ This method Serializes this escher record into a byte array.
+
+ @param offset The offset into data to start writing the record data to.
+ @param data The byte array to Serialize to.
+ @param listener A listener to retrieve start and end callbacks. Use a NullEscherSerailizationListener to ignore these events.
+ @return The number of bytes written.
+ @see NullEscherSerializationListener
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ @return Number of bytes
+
+
+ Returns the identifier of this record.
+
+
+ The short name for this record
+
+
+ Returns the string representation of this record.
+
+
+ Any data recording this record.
+
+
+
+ A complex property differs from a simple property in that the data can not fit inside a 32 bit
+ integer. See the specification for more detailed information regarding exactly what is
+ stored here.
+ @author Glen Stampoultzis
+
+
+
+
+ Create a complex property using the property id and a byte array containing the complex
+ data value.
+
+ The id consists of the property number, a flag indicating whether this is a blip id and a flag
+ indicating that this is a complex property.
+ The value of this property.
+
+
+
+ Create a complex property using the property number, a flag to indicate whether this is a
+ blip reference and the complex property data.
+
+ The property number.
+ Whether this is a blip id. Should be false.
+ The value of this complex property.
+
+
+
+ Serializes the simple part of this property. ie the first 6 bytes.
+
+
+
+
+
+
+
+ Serializes the complex part of this property
+
+ The data array to Serialize to
+ The offset within data to start serializing to.
+ The number of bytes Serialized.
+
+
+
+ Gets the complex data.
+
+ The complex data.
+
+
+
+ Determine whether this property is equal to another property.
+
+ The object to compare to.
+ True if the objects are equal.
+
+
+
+ Caclulates the number of bytes required to Serialize this property.
+
+ Number of bytes
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Escher container records store other escher records as children.
+ The container records themselves never store any information beyond
+ the standard header used by all escher records. This one record is
+ used to represent many different types of records.
+ @author Glen Stampoultzis
+
+
+
+ in case if document contains any charts we have such document structure:
+ BOF
+ ...
+ DrawingRecord
+ ...
+ ObjRecord|TxtObjRecord
+ ...
+ EOF
+ ...
+ BOF(Chart begin)
+ ...
+ DrawingRecord
+ ...
+ ObjRecord|TxtObjRecord
+ ...
+ EOF
+ So, when we call EscherAggregate.createAggregate() we have not all needed data.
+ When we got warning "WARNING: " + bytesRemaining + " bytes remaining but no space left"
+ we should save value of bytesRemaining
+ and add it to container size when we serialize it
+
+
+
+ The contract of this method is to deSerialize an escher record including
+ it's children.
+
+ The byte array containing the Serialized escher
+ records.
+ The offset into the byte array.
+ A factory for creating new escher records
+ The number of bytes written.
+
+
+
+ Serializes to an existing byte array without serialization listener.
+ This is done by delegating to Serialize(int, byte[], EscherSerializationListener).
+
+ the offset within the data byte array.
+ the data array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Subclasses should effeciently return the number of bytes required to
+ Serialize the record.
+
+ number of bytes
+
+
+
+ Do any of our (top level) children have the
+ given recordId?
+
+ The record id.
+
+ true if [has child of type] [the specified record id]; otherwise, false.
+
+
+
+
+ Returns a list of all the child (escher) records
+ of the container.
+
+
+
+
+
+ Returns all of our children which are also
+ EscherContainers (may be 0, 1, or vary rarely
+ 2 or 3)
+
+ The child containers.
+
+
+
+ Subclasses should return the short name for this escher record.
+
+
+
+
+
+ The display methods allows escher variables to print the record names
+ according to their hierarchy.
+
+ The current indent level.
+
+
+
+ Adds the child record.
+
+ The record.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the child by id.
+
+ The record id.
+
+
+
+
+ Recursively find records with the specified record ID
+
+
+ list to store found records
+
+
+
+ This record defines the drawing groups used for a particular sheet.
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array.
+
+ The offset into data to start writing the record data to.
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Return the current record id.
+
+ The 16 bit record id.
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets or sets the shape id max.
+
+ The shape id max.
+
+
+
+ Gets the Number of id clusters + 1
+
+ The num id clusters.
+
+
+
+ Gets or sets the num shapes saved.
+
+ The num shapes saved.
+
+
+
+ Gets or sets the drawings saved.
+
+ The drawings saved.
+
+
+
+ Gets or sets the max drawing group id.
+
+ The max drawing group id.
+
+
+
+ Gets or sets the file id clusters.
+
+ The file id clusters.
+
+
+
+ Adds the cluster.
+
+ The dg id.
+ The num shaped used.
+
+
+
+ Adds the cluster.
+
+ id of the drawing group (stored in the record options)
+ initial value of the numShapedUsed field
+ if set to true if true then sort clusters by drawing group id.(
+ In Excel the clusters are sorted but in PPT they are not).
+
+
+
+ This record simply holds the number of shapes in the drawing group and the
+ last shape id used for this drawing group.
+ @author Glen Stampoultzis
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array.
+
+ The offset into data to start writing the record data to.
+ The byte array to Serialize to.
+ The number of bytes written.
+ a listener for begin and end serialization events.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Return the current record id.
+
+ The 16 bit record id.
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets or sets The number of shapes in this drawing group.
+
+ The num shapes.
+
+
+
+ Gets or sets The last shape id used in this drawing group.
+
+ The last MSOSPID.
+
+
+
+ Gets the drawing group id for this record. This is encoded in the
+ instance part of the option record.
+
+ The drawing group id.
+
+
+
+ Increments the shape count.
+
+
+
+
+ Used to dump the contents of escher records to a PrintStream.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Decodes the escher stream from a byte array and dumps the results to
+ a print stream.
+
+ The data array containing the escher records.
+ The starting offset within the data array.
+ The number of bytes to Read.
+
+
+
+ This version of dump is a translation from the open office escher dump routine.
+
+ The number of bytes to Read
+ An input stream to Read from.
+
+
+
+ Returns a property name given a property id. This is used only by the
+ old escher dump routine.
+
+ The property number for the name
+ A descriptive name.
+
+
+
+ Returns the blip description given a blip id.
+
+ blip id
+ A description.
+
+
+
+ Straight conversion from OO. Converts a type of float.
+
+ The N32.
+
+
+
+
+ Dumps out a hex value by Reading from a input stream.
+
+ How many bytes this hex value consists of.
+ The stream to Read the hex value from.
+
+
+
+ Dumps the specified record size.
+
+ Size of the record.
+ The data.
+
+
+
+ @author Daniel Noll
+
+
+
+ BLIP signatures as defined in the escher spec
+
+
+ The primary UID is only saved to disk if (blip_instance ^ blip_signature == 1)
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into
+ May be null since this is not a container record.
+
+ The number of bytes Read from the byte array.
+
+
+
+
+ Serializes the record to an existing byte array.
+
+ the offset within the byte array
+ the data array to Serialize to
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Decompresses the provided data, returning the inflated result.
+
+ the deflated picture data.
+ the inflated picture data.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Gets or sets the UID.
+
+ The UID.
+
+
+
+ Gets or sets the primary UID.
+
+ The primary UID.
+
+
+
+ Gets or sets the size of the uncompressed.
+
+ The size of the uncompressed.
+
+
+
+ Gets or sets the bounds.
+
+ The bounds.
+
+
+
+ Gets or sets the size EMU.
+
+ The size EMU.
+
+
+
+ Gets or sets the size of the compressed.
+
+ The size of the compressed.
+
+
+
+ Gets or sets a value indicating whether this instance is compressed.
+
+
+ true if this instance is compressed; otherwise, false.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Return the blip signature
+
+ the blip signature
+
+
+
+ The opt record is used to store property values for a shape. It is the key to determining
+ the attributes of a shape. Properties can be of two types: simple or complex. Simple types
+ are fixed Length. Complex properties are variable Length.
+ @author Glen Stampoultzis
+
+
+
+
+ Automatically recalculate the correct option
+
+
+
+
+
+ The short name for this record
+
+
+
+
+
+ @author Daniel Noll
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into
+ May be null since this is not a container record.
+
+ The number of bytes Read from the byte array.
+
+
+
+
+ Serializes the record to an existing byte array.
+
+ the offset within the byte array
+ the data array to Serialize to
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Decompresses the provided data, returning the inflated result.
+
+ the deflated picture data.
+ the inflated picture data.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Gets or sets the UID.
+
+ The UID.
+
+
+
+ Gets or sets the size of the uncompressed.
+
+ The size of the uncompressed.
+
+
+
+ Gets or sets the bounds.
+
+ The bounds.
+
+
+
+ Gets or sets the size EMU.
+
+ The size EMU.
+
+
+
+ Gets or sets the size of the compressed.
+
+ The size of the compressed.
+
+
+
+ Gets a value indicating whether this instance is compressed.
+
+
+ true if this instance is compressed; otherwise, false.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Provides a list of all known escher properties including the description and
+ type.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Inits the props.
+
+
+
+
+ Adds the prop.
+
+ The s.
+ The data.
+
+
+
+ Gets the data.
+
+ Name of the prop.
+ The type.
+
+
+
+
+ Gets the data.
+
+ Name of the prop.
+
+
+
+
+ Gets the name of the property.
+
+ The property id.
+
+
+
+
+ Gets the type of the property.
+
+ The property id.
+
+
+
+
+ This is the abstract base class for all escher properties.
+ @see EscherOptRecord
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The id is distinct from the actual property number. The id includes the property number the blip id
+ flag and an indicator whether the property is complex or not.
+
+
+
+ Initializes a new instance of the class.The three parameters are combined to form a property
+ id.
+
+ The property number.
+ if set to true [is complex].
+ if set to true [is blip id].
+
+
+
+ Gets the id.
+
+ The id.
+
+
+
+ Gets the property number.
+
+ The property number.
+
+
+
+ Gets a value indicating whether this instance is complex.
+
+
+ true if this instance is complex; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is blip id.
+
+
+ true if this instance is blip id; otherwise, false.
+
+
+
+
+ Gets the name.
+
+ The name.
+
+
+
+ Most properties are just 6 bytes in Length. Override this if we're
+ dealing with complex properties.
+
+ The size of the property.
+
+
+
+ Escher properties consist of a simple fixed Length part and a complex variable Length part.
+ The fixed Length part is Serialized first.
+
+ The data.
+ The pos.
+
+
+
+
+ Escher properties consist of a simple fixed Length part and a complex variable Length part.
+ The fixed Length part is Serialized first.
+
+ The data.
+ The pos.
+
+
+
+
+ Generates a property given a reference into the byte array storing that property.
+ @author Glen Stampoultzis
+
+
+
+
+ Create new properties from a byte array.
+
+ The byte array containing the property
+ The starting offset into the byte array
+ The new properties
+
+
+
+
+ This class stores the type and description of an escher property.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The description of the escher property.
+
+
+
+ Initializes a new instance of the class.
+
+ The description of the escher property.
+ The type of the property.
+
+
+
+ Gets the description.
+
+ The description.
+
+
+
+ Gets the type.
+
+ The type.
+
+
+
+ The base abstract record from which all escher records are defined. Subclasses will need
+ to define methods for serialization/deserialization and for determining the record size.
+ @author Glen Stampoultzis
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Delegates to FillFields(byte[], int, EscherRecordFactory)
+
+ The data.
+ The f.
+
+
+
+
+ The contract of this method is to deSerialize an escher record including
+ it's children.
+
+ The byte array containing the Serialized escher
+ records.
+ The offset into the byte array.
+ A factory for creating new escher records.
+ The number of bytes written.
+
+
+
+ Reads the 8 byte header information and populates the
+ options
+ and
+ recordId
+ records.
+
+ the byte array to Read from
+ the offset to start Reading from
+ the number of bytes remaining in this record. This
+
+
+
+ Read the options field from header and return instance part of it.
+
+ the byte array to read from
+ the offset to start reading from
+ value of instance part of options field
+
+
+
+ Determine whether this is a container record by inspecting the option
+ field.
+
+
+ true if this instance is container record; otherwise, false.
+
+
+
+
+ Gets or sets the options field for this record. All records have one
+
+ The options.
+
+
+
+ Serializes to a new byte array. This is done by delegating to
+ Serialize(int, byte[]);
+
+ the Serialized record.
+
+
+
+ Serializes to an existing byte array without serialization listener.
+ This is done by delegating to Serialize(int, byte[], EscherSerializationListener).
+
+ the offset within the data byte array.
+ the data array to Serialize to.
+ The number of bytes written.
+
+
+
+ Serializes the record to an existing byte array.
+
+ the offset within the byte array.
+ the offset within the byte array
+ a listener for begin and end serialization events. This.
+ is useful because the serialization is
+ hierarchical/recursive and sometimes you need to be able
+ break into that.
+
+
+
+
+
+ Subclasses should effeciently return the number of bytes required to
+ Serialize the record.
+
+ number of bytes
+
+
+
+ Return the current record id.
+
+ The 16 bit record id.
+
+
+
+ Gets or sets the child records.
+
+ Returns the children of this record. By default this will
+ be an empty list. EscherCotainerRecord is the only record that may contain children.
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ Returns the indexed child record.
+
+ The index.
+
+
+
+
+ The display methods allows escher variables to print the record names
+ according to their hierarchy.
+
+ The current indent level.
+
+
+
+ Gets the name of the record.
+
+ The name of the record.
+
+
+
+ This class Reads the standard escher header.
+
+
+
+
+ Reads the header.
+
+ The data.
+ The off set.
+
+
+
+
+ Gets the options.
+
+ The options.
+
+
+
+ Gets the record id.
+
+ The record id.
+
+
+
+ Gets the remaining bytes.
+
+ The remaining bytes.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Get or set the instance part of the option record.
+
+
+
+
+ Get or set the version part of the option record.
+
+
+
+ @param tab - each children must be a right of his parent
+ @return xml representation of this record
+
+
+
+ The escher record factory interface allows for the creation of escher
+ records from a pointer into a data array.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Create a new escher record from the data provided. Does not attempt
+ to Fill the contents of the record however.
+
+ The data.
+ The off set.
+
+
+
+
+ A color property.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The property number.
+ Color of the RGB.
+
+
+
+ Gets the color of the RGB.
+
+ The color of the RGB.
+
+
+
+ Gets the red.
+
+ The red.
+
+
+
+ Gets the green.
+
+ The green.
+
+
+
+ Gets the blue.
+
+ The blue.
+
+
+ Interface for listening to escher serialization events.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Fired before a given escher record is Serialized.
+
+ @param offset The position in the data array at which the record will be Serialized.
+ @param recordId The id of the record about to be Serialized.
+
+
+ Fired after a record has been Serialized.
+
+ @param offset The position of the end of the Serialized record + 1
+ @param recordId The id of the record about to be Serialized
+ @param size The number of bytes written for this record. If it is a container
+ record then this will include the size of any included records.
+
+
+
+ Defines the constants for the various possible shape paths.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The property number.
+ The shape path.
+
+
+
+ A simple property is of fixed Length and as a property number in Addition
+ to a 32-bit value. Properties that can't be stored in only 32-bits are
+ stored as EscherComplexProperty objects.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ The id is distinct from the actual property number. The id includes the property number the blip id
+ flag and an indicator whether the property is complex or not.
+
+ The id.
+ The property value.
+
+
+
+ Constructs a new escher property. The three parameters are combined to form a property
+ id.
+
+ The property number.
+ if set to true [is complex].
+ if set to true [is blip id].
+ The property value.
+
+
+
+ Serialize the simple part of the escher record.
+
+ The data.
+ The off set.
+ the number of bytes Serialized.
+
+
+
+ Escher properties consist of a simple fixed Length part and a complex variable Length part.
+ The fixed Length part is Serialized first.
+
+
+
+
+
+
+
+ Return the 32 bit value of this property.
+
+ The property value.
+
+
+
+ Returns true if one escher property is equal to another.
+
+ The o.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ The spgr record defines information about a shape group. Groups in escher
+ are simply another form of shape that you can't physically see.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array
+
+ The offset into data
+ to start writing the record data to.
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Return the current record id.
+
+ The 16 bit identifier of this shape group record.
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets or sets the starting top-left coordinate of child records.
+
+ The rect x1.
+
+
+
+ Gets or sets the starting bottom-right coordinate of child records.
+
+ The rect x2.
+
+
+
+ Gets or sets the starting top-left coordinate of child records.
+
+ The rect y1.
+
+
+
+ Gets or sets the starting bottom-right coordinate of child records.
+
+ The rect y2.
+
+
+
+ A list of the most recently used colours for the drawings contained in
+ this document.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ This method Serializes this escher record into a byte array
+
+ The offset into data
+ to start writing the record data to.
+ The byte array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ number of bytes
+
+
+
+ Return the current record id.
+
+ the 16 bit identifer for this record.
+
+
+
+ Gets the short name for this record
+
+ The name of the record.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+ @return a string representation of this record.
+
+
+
+ Gets or sets the color1.
+
+ The color1.
+
+
+
+ Gets or sets the color2.
+
+ The color2.
+
+
+
+ Gets or sets the color3.
+
+ The color3.
+
+
+
+ Gets or sets the color4.
+
+ The color4.
+
+
+
+ ToGether the the EscherOptRecord this record defines some of the basic
+ properties of a shape.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ The contract of this method is to deSerialize an escher record including
+ it's children.
+
+ The byte array containing the Serialized escher
+ records.
+ The offset into the byte array.
+ A factory for creating new escher records
+ The number of bytes written.
+
+
+
+ Serializes to an existing byte array without serialization listener.
+ This is done by delegating to Serialize(int, byte[], EscherSerializationListener).
+
+ the offset within the data byte array.
+ the data array to Serialize to.
+ a listener for begin and end serialization events.
+ The number of bytes written.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ @return the 16 bit identifier for this record.
+
+
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Converts the shape flags into a more descriptive name.
+
+ The flags.
+
+
+
+
+ Gets or sets A number that identifies this shape
+
+ The shape id.
+
+
+
+ The flags that apply to this shape.
+
+ The flags.
+
+
+
+ Get or set shape type. Must be one of MSOSPT values (see [MS-ODRAW] for details).
+
+
+
+
+ Holds data from the parent application. Most commonly used to store
+ text in the format of the parent application, rather than in
+ Escher format. We don't attempt to understand the contents, since
+ they will be in the parent's format, not Escher format.
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Nick Burch (nick at torchbox dot com)
+
+
+
+ The data for this record not including the the 8 byte header
+
+
+ This method deserializes the record from a byte array.
+
+ @param data The byte array containing the escher record information
+ @param offset The starting offset into data.
+ @param recordFactory May be null since this is not a container record.
+ @return The number of bytes Read from the byte array.
+
+
+
+ Writes this record and any contained records to the supplied byte
+
+
+
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Returns any extra data associated with this record. In practice excel
+ does not seem to put anything here, but with PowerPoint this will
+ contain the bytes that make up a TextHeaderAtom followed by a
+ TextBytesAtom/TextCharsAtom
+
+ The data.
+
+
+
+ Sets the extra data (in the parent application's format) to be
+ contained by the record. Used when the parent application changes
+ the contents.
+
+ The b.
+ The start.
+ The length.
+
+
+
+ Sets the data.
+
+ The b.
+
+
+
+ Returns the number of bytes that are required to serialize this record.
+
+ Number of bytes
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ This record is used whenever a escher record is encountered that
+ we do not explicitly support.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+ The data for this record not including the the 8 byte header
+
+
+
+ This method deSerializes the record from a byte array.
+
+ The byte array containing the escher record information
+ The starting offset into data
+ May be null since this is not a container record.
+ The number of bytes Read from the byte array.
+
+
+
+ Writes this record and any contained records to the supplied byte
+ array.
+
+
+
+ a listener for begin and end serialization events.
+ the number of bytes written.
+
+
+
+ Gets the data.
+
+ The data.
+
+
+
+ Returns the number of bytes that are required to Serialize this record.
+
+ Number of bytes
+
+
+
+ Returns the children of this record. By default this will
+ be an empty list. EscherCotainerRecord is the only record
+ that may contain children.
+
+
+
+
+
+ The short name for this record
+
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Adds the child record.
+
+ The child record.
+
+
+ A version of {@link POIDocument} which allows access to the
+ HPSF Properties, but no other document contents.
+ Normally used when you want to read or alter the Document Properties,
+ without affecting the rest of the file
+
+
+ Write out, with any properties changes, but nothing else
+
+
+ Checks to see if the specified length seems valid,
+ given the amount of data available still to read,
+ and the requirement that the string be NULL-terminated
+
+
+ The Character Encoding is not supported.
+
+ @author Asmus Freytag
+ @since JDK1.1
+
+
+ Constructs an UnsupportedEncodingException without a detail message.
+
+
+ Constructs an UnsupportedEncodingException with a detail message.
+ @param s Describes the reason for the exception.
+
+
+
+ Defines constants of general use.
+ @author Rainer Klute klute@rainer-klute.de
+ @since 2004-06-20
+
+
+
+
+ Allow accessing the Initial value.
+
+
+
+ Codepage 037, a special case
+
+
+ Codepage for SJIS
+
+
+ Codepage for GBK, aka MS936
+
+
+ Codepage for MS949
+
+
+ Codepage for UTF-16
+
+
+ Codepage for UTF-16 big-endian
+
+
+ Codepage for Windows 1250
+
+
+ Codepage for Windows 1251
+
+
+ Codepage for Windows 1252
+
+
+ Codepage for Windows 1253
+
+
+ Codepage for Windows 1254
+
+
+ Codepage for Windows 1255
+
+
+ Codepage for Windows 1256
+
+
+ Codepage for Windows 1257
+
+
+ Codepage for Windows 1258
+
+
+ Codepage for Johab
+
+
+ Codepage for Macintosh Roman (Java: MacRoman)
+
+
+ Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or
+ cp943)
+
+
+ Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5,
+ MS950, or cp937)
+
+
+ Codepage for Macintosh Korean (Java: unknown - use EUC_KR or
+ cp949)
+
+
+ Codepage for Macintosh Arabic (Java: MacArabic)
+
+
+ Codepage for Macintosh Hebrew (Java: MacHebrew)
+
+
+ Codepage for Macintosh Greek (Java: MacGreek)
+
+
+ Codepage for Macintosh Cyrillic (Java: MacCyrillic)
+
+
+ Codepage for Macintosh Chinese Simplified (Java: unknown - use
+ EUC_CN, ISO2022_CN_GB, MS936 or cp935)
+
+
+ Codepage for Macintosh Romanian (Java: MacRomania)
+
+
+ Codepage for Macintosh Ukrainian (Java: MacUkraine)
+
+
+ Codepage for Macintosh Thai (Java: MacThai)
+
+
+ Codepage for Macintosh Central Europe (Latin-2)
+ (Java: MacCentralEurope)
+
+
+ Codepage for Macintosh Iceland (Java: MacIceland)
+
+
+ Codepage for Macintosh Turkish (Java: MacTurkish)
+
+
+ Codepage for Macintosh Croatian (Java: MacCroatian)
+
+
+ Codepage for US-ASCII
+
+
+ Codepage for KOI8-R
+
+
+ Codepage for ISO-8859-1
+
+
+ Codepage for ISO-8859-2
+
+
+ Codepage for ISO-8859-3
+
+
+ Codepage for ISO-8859-4
+
+
+ Codepage for ISO-8859-5
+
+
+ Codepage for ISO-8859-6
+
+
+ Codepage for ISO-8859-7
+
+
+ Codepage for ISO-8859-8
+
+
+ Codepage for ISO-8859-9
+
+
+ Codepage for ISO-2022-JP
+
+
+ Another codepage for ISO-2022-JP
+
+
+ Yet another codepage for ISO-2022-JP
+
+
+ Codepage for ISO-2022-KR
+
+
+ Codepage for EUC-JP
+
+
+ Codepage for EUC-KR
+
+
+ Codepage for GB2312
+
+
+ Codepage for GB18030
+
+
+ Another codepage for US-ASCII
+
+
+ Codepage for UTF-8
+
+
+ Codepage for Unicode
+
+
+
+ Maintains the instances of {@link CustomProperty} that belong To a
+ {@link DocumentSummaryInformation}. The class maintains the names of the
+ custom properties in a dictionary. It implements the {@link Map} interface
+ and by this provides a simplified view on custom properties: A property's
+ name is the key that maps To a typed value. This implementation hides
+ property IDs from the developer and regards the property names as keys To
+ typed values.
+ While this class provides a simple API To custom properties, it ignores
+ the fact that not names, but IDs are the real keys To properties. Under the
+ hood this class maintains a 1:1 relationship between IDs and names. Therefore
+ you should not use this class To process property Sets with several IDs
+ mapping To the same name or with properties without a name: the result will
+ contain only a subSet of the original properties. If you really need To deal
+ such property Sets, use HPSF's low-level access methods.
+ An application can call the {@link #isPure} method To check whether a
+ property Set parsed by {@link CustomProperties} is still pure (i.e.
+ unmodified) or whether one or more properties have been dropped.
+ This class is not thRead-safe; concurrent access To instances of this
+ class must be syncronized.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2006-02-09
+
+
+
+ Maps property IDs To property names.
+
+
+ Maps property names To property IDs.
+
+
+ Tells whether this object is pure or not.
+
+
+
+ Puts a {@link CustomProperty} into this map. It is assumed that the
+ {@link CustomProperty} alReady has a valid ID. Otherwise use
+ {@link #Put(CustomProperty)}.
+
+ The name.
+ The custom property.
+
+
+
+ Returns a set of all the names of our
+ custom properties. Equivalent to
+ {@link #nameSet()}
+
+
+ Returns a set of all the names of our
+ custom properties
+
+
+ Returns a set of all the IDs of our
+ custom properties
+
+
+
+ Puts a {@link CustomProperty} that has not yet a valid ID into this
+ map. The method will allocate a suitable ID for the custom property:
+
+
If there is alReady a property with the same name, take the ID
+ of that property.
+
Otherwise Find the highest ID and use its value plus one.
+
+
+ The custom property.
+ If the was alReady a property with the same name, the
+
+
+
+ Removes a custom property.
+
+ The name of the custom property To Remove
+ The Removed property or
+ null
+ if the specified property was not found.
+
+
+
+ Adds a named string property.
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Adds a named long property
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Adds a named double property.
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Adds a named integer property.
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Adds a named bool property.
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Adds a named date property.
+
+ The property's name.
+ The property's value.
+ the property that was stored under the specified name before, or
+ null
+ if there was no such property before.
+
+
+
+ Gets the with the specified name.
+
+ the value or
+ null
+ if a value with the specified
+ name is not found in the custom properties.
+
+
+ Checks against both String Name and Long ID
+
+
+ Checks against both the property, and its values.
+
+
+
+ Gets the dictionary which Contains IDs and names of the named custom
+ properties.
+
+ The dictionary.
+
+
+
+ Gets or sets the codepage.
+
+ The codepage.
+
+
+
+ Tells whether this {@link CustomProperties} instance is pure or one or
+ more properties of the underlying low-level property Set has been
+ dropped.
+
+ true if this instance is pure; otherwise, false.
+
+
+
+ This class represents custum properties in the document summary
+ information stream. The difference To normal properties is that custom
+ properties have an optional name. If the name is not null it
+ will be maintained in the section's dictionary.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2006-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ the property To copy
+
+
+
+ Initializes a new instance of the class.
+
+ This property's attributes are copied To the new custom
+ property.
+ The new custom property's name.
+
+
+
+ Gets or sets the property's name.
+
+ the property's name.
+
+
+
+ Compares two custom properties for equality. The method returns
+ true if all attributes of the two custom properties are
+ equal.
+
+ The custom property To Compare with.
+ true
+ if both custom properties are equal, else
+ false
+
+
+
+
+
+ @see Object#GetHashCode()
+
+
+
+ Convenience class representing a DocumentSummary Information stream in a
+ Microsoft Office document.
+ @author Rainer Klute
+ klute@rainer-klute.de
+ @author Drew Varner (Drew.Varner cloSeto sc.edu)
+ @author robert_flaherty@hyperion.com
+ @since 2002-02-09
+
+
+
+ The document name a document summary information stream
+ usually has in a POIFS filesystem.
+
+
+
+ Initializes a new instance of the class.
+
+ A property Set which should be Created from a
+ document summary information stream.
+
+
+
+ Gets or sets the category.
+
+ The category value
+
+
+
+ Removes the category.
+
+
+
+
+ Gets or sets the presentation format (or null).
+
+ The presentation format value
+
+
+
+ Removes the presentation format.
+
+
+
+
+ Gets or sets the byte count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a byte count.
+
+ The byteCount value
+
+
+
+ Removes the byte count.
+
+
+
+
+ Gets or sets the line count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a line count.
+
+ The line count value.
+
+
+
+ Removes the line count.
+
+
+
+
+ Gets or sets the par count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a par count.
+
+ The par count value
+
+
+
+ Removes the par count.
+
+
+
+
+ Gets or sets the slide count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a slide count.
+
+ The slide count value
+
+
+
+ Removes the slide count.
+
+
+
+
+ Gets or sets the note count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a note count
+
+ The note count value
+
+
+
+ Removes the note count.
+
+
+
+
+ Gets or sets the hidden count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a hidden
+ count.
+
+ The hidden count value.
+
+
+
+ Removes the hidden count.
+
+
+
+
+ Returns the mmclip count or 0 if the {@link
+ DocumentSummaryInformation} does not contain a mmclip
+ count.
+
+ The mmclip count value.
+
+
+
+ Removes the MMClip count.
+
+
+
+
+ Gets or sets a value indicating whether this is scale.
+
+ true if cropping is desired; otherwise, false.
+
+
+
+ Removes the scale.
+
+
+
+
+ Gets or sets the heading pair (or null)
+
+ The heading pair value.
+
+
+
+ Removes the heading pair.
+
+
+
+
+ Gets or sets the doc parts.
+
+ The doc parts value
+
+
+
+ Removes the doc parts.
+
+
+
+
+ Gets or sets the manager (or null).
+
+ The manager value
+
+
+
+ Removes the manager.
+
+
+
+
+ Gets or sets the company (or null).
+
+ The company value
+
+
+
+ Removes the company.
+
+
+
+
+ Gets or sets a value indicating whether [links dirty].
+
+ true if the custom links are dirty.; otherwise, false.
+
+
+
+ Removes the links dirty.
+
+
+
+
+ Gets or sets the custom properties.
+
+ The custom properties.
+
+
+
+ Creates section 2 if it is not alReady present.
+
+
+
+
+ Removes the custom properties.
+
+
+
+
+ Extracts all of the HPSF properties, both
+ build in and custom, returning them in
+ textual form.
+
+
+
+
+ Gets the document summary information text.
+
+ The document summary information text.
+
+
+
+ Gets the summary information text.
+
+ The summary information text.
+
+
+
+ Gets the properties text.
+
+ The ps.
+
+
+
+
+ Return the text of all the properties defined in
+ the document.
+
+ All the text from the document.
+
+
+
+ Returns another text extractor, which is able to
+ output the textual content of the document
+ metadata / properties, such as author and title.
+
+ The metadata text extractor.
+
+
+
+ This exception is the superclass of all other checked exceptions thrown
+ in this package. It supports a nested "reason" throwable, i.e. an exception
+ that caused this one To be thrown.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+
+
+
+ Initializes a new instance of the class.
+
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ Returns the {@link Exception} that caused this exception To
+ be thrown or null if there was no such {@link
+ Exception}.
+
+ The reason.
+
+
+
+ This exception is the superclass of all other unchecked
+ exceptions thrown in this package. It supports a nested "reason"
+ throwable, i.e. an exception that caused this one To be thrown.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+
+
+
+ Initializes a new instance of the class.
+
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ This exception is thrown when there is an illegal value Set in a
+ {@link PropertySet}. For example, a {@link Variant#VT_BOOL} must
+ have a value of -1 (true) or 0 (false).
+ Any other value would trigger this exception. It supports a nested
+ "reason" throwable, i.e. an exception that caused this one To be
+ thrown.
+ @author Drew Varner(Drew.Varner atDomain sc.edu)
+ @since 2002-05-26
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ This exception is thrown if HPSF encounters a variant type that is illegal
+ in the current context.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2004-06-21
+
+
+
+
+ Initializes a new instance of the class.
+
+ The unsupported variant type
+ The value
+ A message string
+
+
+
+ Initializes a new instance of the class.
+
+ The unsupported variant type
+ The value.
+
+
+
+ This exception is thrown if an {@link java.io.InputStream} does
+ not support the {@link java.io.InputStream#mark} operation.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string.
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason.
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ This exception is thrown if one of the {@link PropertySet}'s
+ convenience methods does not Find a required {@link Section}.
+ The constructors of this class are analogous To those of its
+ superclass and documented there.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2006-02-08
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason.
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ Adds writing capability To the {@link Property} class.
+ Please be aware that this class' functionality will be merged into the
+ {@link Property} class at a later time, so the API will Change.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-08-03
+
+
+
+
+ Creates an empty property. It must be Filled using the Set method To
+ be usable.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The property To copy.
+
+
+
+ Writes the property To an output stream.
+
+ The output stream To Write To.
+ The codepage To use for writing non-wide strings
+ the number of bytes written To the stream
+
+
+
+ Adds writing support To the {@link PropertySet} class.
+ Please be aware that this class' functionality will be merged into the
+ {@link PropertySet} class at a later time, so the API will Change.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-02-19
+
+
+
+
+ Initializes a new instance of the class.
+ Its primary task is To initialize the immutable field with their proper
+ values. It also Sets fields that might Change To reasonable defaults.
+
+
+
+
+ Initializes a new instance of the class.
+ All nested elements, i.e.Sections and Property instances, will be their
+ mutable counterparts in the new MutablePropertySet.
+
+ The property Set To copy
+
+
+ The Length of the property Set stream header.
+
+
+
+ Gets or sets the "byteOrder" property.
+
+ the byteOrder value To Set
+
+
+
+ Gets or sets the "format" property.
+
+ the format value To Set
+
+
+
+ Gets or sets the "osVersion" property
+
+ the osVersion value To Set.
+
+
+
+ Gets or sets the property Set stream's low-level "class ID"
+
+ The property Set stream's low-level "class ID" field.
+
+
+
+ Removes all sections from this property Set.
+
+
+
+
+ Adds a section To this property Set.
+
+ section The {@link Section} To Add. It will be Appended
+ after any sections that are alReady present in the property Set
+ and thus become the last section.
+
+
+
+ Writes the property Set To an output stream.
+
+ the output stream To Write the section To
+
+
+
+ Returns the contents of this property set stream as an input stream.
+ The latter can be used for example to write the property set into a POIFS
+ document. The input stream represents a snapshot of the property set.
+ If the latter is modified while the input stream is still being
+ read, the modifications will not be reflected in the input stream but in
+ the {@link MutablePropertySet} only.
+
+ the contents of this property set stream
+
+
+
+ Writes a property Set To a document in a POI filesystem directory
+
+ The directory in the POI filesystem To Write the document To.
+ The document's name. If there is alReady a document with the
+ same name in the directory the latter will be overwritten.
+
+
+
+ Adds writing capability To the {@link Section} class.
+ Please be aware that this class' functionality will be merged into the
+ {@link Section} class at a later time, so the API will Change.
+ @since 2002-02-20
+
+
+
+ If the "dirty" flag is true, the section's size must be
+ (re-)calculated before the section is written.
+
+
+ List To assemble the properties. Unfortunately a wrong
+ decision has been taken when specifying the "properties" field
+ as an Property[]. It should have been a {@link java.util.List}.
+
+
+ Contains the bytes making out the section. This byte array is
+ established when the section's size is calculated and can be reused
+ later. It is valid only if the "dirty" flag is false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Constructs a MutableSection by doing a deep copy of an
+ existing Section. All nested Property
+ instances, will be their mutable counterparts in the new
+ MutableSection.
+
+ The section Set To copy
+
+
+
+ Sets the section's format ID.
+
+ The section's format ID
+
+
+
+ Sets the section's format ID.
+
+ The section's format ID as a byte array. It components
+ are in big-endian format.
+
+
+
+ Sets this section's properties. Any former values are overwritten.
+
+ This section's new properties.
+
+
+
+ Sets the string value of the property with the specified ID.
+
+ The property's ID
+ The property's value. It will be written as a Unicode
+ string.
+
+
+
+ Sets the int value of the property with the specified ID.
+
+ The property's ID
+ The property's value.
+
+
+
+ Sets the long value of the property with the specified ID.
+
+ The property's ID
+ The property's value.
+
+
+
+ Sets the bool value of the property with the specified ID.
+
+ The property's ID
+ The property's value.
+
+
+
+ Sets the value and the variant type of the property with the
+ specified ID. If a property with this ID is not yet present in
+ the section, it will be Added. An alReady present property with
+ the specified ID will be overwritten. A default mapping will be
+ used To choose the property's type.
+
+ The property's ID.
+ The property's variant type.
+ The property's value.
+
+
+
+ Sets the property.
+
+ The property To be Set.
+
+
+
+ Removes the property.
+
+ The ID of the property To be Removed
+
+
+
+ Sets the value of the bool property with the specified
+ ID.
+
+ The property's ID
+ The property's value
+
+
+
+ Returns the section's size in bytes.
+
+ The section's size in bytes.
+
+
+
+ Calculates the section's size. It is the sum of the Lengths of the
+ section's header (8), the properties list (16 times the number of
+ properties) and the properties themselves.
+
+ the section's Length in bytes.
+
+
+
+ Writes this section into an output stream.
+ Internally this is done by writing into three byte array output
+ streams: one for the properties, one for the property list and one for
+ the section as such. The two former are Appended To the latter when they
+ have received all their data.
+
+ The stream To Write into.
+ The number of bytes written, i.e. the section's size.
+
+
+
+ Writes the section's dictionary
+
+ The output stream To Write To.
+ The dictionary.
+ The codepage to be used to Write the dictionary items.
+ The number of bytes written
+
+ see MSDN KB: http://msdn.microsoft.com/en-us/library/aa380065(VS.85).aspx
+
+
+
+
+ OverWrites the base class' method To cope with a redundancy:
+ the property count is maintained in a separate member variable, but
+ shouldn't.
+
+ The number of properties in this section.
+
+
+
+ Returns this section's properties.
+
+ This section's properties.
+
+
+
+ Ensures the properties.
+
+
+
+
+ Gets a property.
+
+ The ID of the property To Get
+ The property or null if there is no such property
+
+
+
+ Sets the section's dictionary. All keys in the dictionary must be
+ {@link java.lang.long} instances, all values must be
+ {@link java.lang.String}s. This method overWrites the properties with IDs
+ 0 and 1 since they are reserved for the dictionary and the dictionary's
+ codepage. Setting these properties explicitly might have surprising
+ effects. An application should never do this but always use this
+ method.
+
+
+ the dictionary
+
+
+
+
+ Sets the property.
+
+ The property ID.
+ The property's value. The value's class must be one of those
+ supported by HPSF.
+
+
+
+ Removes all properties from the section including 0 (dictionary) and
+ 1 (codepage).
+
+
+
+
+ Gets the section's codepage, if any.
+
+ The section's codepage if one is defined, else -1.
+
+
+
+ This exception is thrown if a {@link MutablePropertySet} is To be written
+ but does not have a formatID Set (see {@link
+ MutableSection#SetFormatID(ClassID)} or
+ {@link org.apache.poi.hpsf.MutableSection#SetFormatID(byte[])}.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-09-03
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ This exception is thrown if a format error in a property Set stream Is
+ detected or when the input data do not constitute a property Set stream.
+ The constructors of this class are analogous To those of its superclass
+ and are documented there.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ This exception is thrown if one of the {@link PropertySet}'s
+ convenience methods that require a single {@link Section} is called
+ and the {@link PropertySet} does not contain exactly one {@link
+ Section}.
+ The constructors of this class are analogous To those of its
+ superclass and documented there.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+
+
+
+ Initializes a new instance of the class.
+
+ This exception's underlying reason
+
+
+
+ Initializes a new instance of the class.
+
+ The exception's message string
+ This exception's underlying reason
+
+
+
+ A property in a {@link Section} of a {@link PropertySet}.
+ The property's ID gives the property a meaning
+ in the context of its {@link Section}. Each {@link Section} spans
+ its own name space of property IDs.
+ The property's type determines how its
+ value is interpreted. For example, if the type Is
+ {@link Variant#VT_LPSTR} (byte string), the value consists of a
+ DWord telling how many bytes the string Contains. The bytes follow
+ immediately, including any null bytes that terminate the
+ string. The type {@link Variant#VT_I4} denotes a four-byte integer
+ value, {@link Variant#VT_FILETIME} some DateTime and time (of a
+ file).
+ Please note that not all {@link Variant} types yet. This might Change
+ over time but largely depends on your feedback so that the POI team knows
+ which variant types are really needed. So please feel free To submit error
+ reports or patches for the types you need.
+ Microsoft documentation:
+
+ Property Set Display Name Dictionary
+ .
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @author Drew Varner (Drew.Varner InAndAround sc.edu)
+ @see Section
+ @see Variant
+ @since 2002-02-09
+
+
+
+ The property's ID.
+
+
+ Returns the property's ID.
+
+ @return The ID value
+
+
+ The property's type.
+
+
+ Returns the property's type.
+
+ @return The type value
+
+
+ The property's value.
+
+
+
+ Gets the property's value.
+
+ The property's value
+
+
+
+ Initializes a new instance of the class.
+
+ the property's ID.
+ the property's type, see {@link Variant}.
+ the property's value. Only certain types are allowed, see
+ {@link Variant}.
+
+
+
+ Initializes a new instance of the class.
+
+ The property's ID.
+ The bytes the property Set stream consists of.
+ The property's type/value pair's offset in the
+ section.
+ The property's type/value pair's Length in bytes.
+ The section's and thus the property's
+ codepage. It is needed only when Reading string values
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the dictionary.
+
+ The byte array containing the bytes making out the dictionary.
+ At this offset within src the dictionary starts.
+ The dictionary Contains at most this many bytes.
+ The codepage of the string values.
+ The dictonary
+
+
+
+ Gets the property's size in bytes. This is always a multiple of
+ 4.
+
+ the property's size in bytes
+
+
+
+ Compares two properties.
+ Please beware that a property with
+ ID == 0 is a special case: It does not have a type, and its value is the
+ section's dictionary. Another special case are strings: Two properties
+ may have the different types Variant.VT_LPSTR and Variant.VT_LPWSTR;
+
+ The o.
+
+
+
+
+ Typeses the are equal.
+
+ The t1.
+ The t2.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Represents a property Set in the Horrible Property Set Format
+ (HPSF). These are usually metadata of a Microsoft Office
+ document.
+ An application that wants To access these metadata should Create
+ an instance of this class or one of its subclasses by calling the
+ factory method {@link PropertySetFactory#Create} and then retrieve
+ the information its needs by calling appropriate methods.
+ {@link PropertySetFactory#Create} does its work by calling one
+ of the constructors {@link PropertySet#PropertySet(InputStream)} or
+ {@link PropertySet#PropertySet(byte[])}. If the constructor's
+ argument is not in the Horrible Property Set Format, i.e. not a
+ property Set stream, or if any other error occurs, an appropriate
+ exception is thrown.
+ A {@link PropertySet} has a list of {@link Section}s, and each
+ {@link Section} has a {@link Property} array. Use {@link
+ #GetSections} To retrieve the {@link Section}s, then call {@link
+ Section#GetProperties} for each {@link Section} To Get hold of the
+ {@link Property} arrays. Since the vast majority of {@link
+ PropertySet}s Contains only a single {@link Section}, the
+ convenience method {@link #GetProperties} returns the properties of
+ a {@link PropertySet}'s {@link Section} (throwing a {@link
+ NoSingleSectionException} if the {@link PropertySet} Contains more
+ (or less) than exactly one {@link Section}).
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @author Drew Varner (Drew.Varner hanginIn sc.edu)
+ @since 2002-02-09
+
+
+
+ The "byteOrder" field must equal this value.
+
+
+ Specifies this {@link PropertySet}'s byte order. See the
+ HPFS documentation for details!
+
+
+
+ Gets or sets the property Set stream's low-level "byte order"
+ field. It is always 0xFFFE
+
+ The property Set stream's low-level "byte order" field..
+
+
+ The "format" field must equal this value.
+
+
+ Specifies this {@link PropertySet}'s format. See the HPFS
+ documentation for details!
+
+
+
+ Gets or sets the property Set stream's low-level "format"
+ field. It is always 0x0000
+
+ The property Set stream's low-level "format" field.
+
+
+ Specifies the version of the operating system that Created
+ this {@link PropertySet}. See the HPFS documentation for
+ details!
+
+
+ If the OS version field holds this value the property Set stream Was
+ Created on a 16-bit Windows system.
+
+
+ If the OS version field holds this value the property Set stream Was
+ Created on a Macintosh system.
+
+
+ If the OS version field holds this value the property Set stream Was
+ Created on a 32-bit Windows system.
+
+
+
+ Returns the property Set stream's low-level "OS version"
+ field.
+
+ The property Set stream's low-level "OS version" field.
+
+
+ Specifies this {@link PropertySet}'s "classID" field. See
+ the HPFS documentation for details!
+
+
+
+ Gets or sets the property Set stream's low-level "class ID"
+
+ The property Set stream's low-level "class ID" field.
+
+
+
+ Returns the number of {@link Section}s in the property
+ Set.
+
+ The number of {@link Section}s in the property Set.
+
+
+ The sections in this {@link PropertySet}.
+
+
+
+ Returns the {@link Section}s in the property Set.
+
+ {@link Section}s in the property Set.
+
+
+
+ Creates an empty (uninitialized) {@link PropertySet}
+ Please note: For the time being this
+ constructor is protected since it is used for internal purposes
+ only, but expect it To become public once the property Set's
+ writing functionality is implemented.
+
+
+
+
+ Creates a {@link PropertySet} instance from an {@link
+ InputStream} in the Horrible Property Set Format.
+ The constructor Reads the first few bytes from the stream
+ and determines whether it is really a property Set stream. If
+ it Is, it parses the rest of the stream. If it is not, it
+ Resets the stream To its beginning in order To let other
+ components mess around with the data and throws an
+ exception.
+
+ Holds the data making out the property Set
+ stream.
+
+
+
+ Creates a {@link PropertySet} instance from a byte array
+ that represents a stream in the Horrible Property Set
+ Format.
+
+ The byte array holding the stream data.
+ The offset in stream where the stream data begin.
+ If the stream data begin with the first byte in the
+ array, the offset is 0.
+ The Length of the stream data.
+
+
+
+ Creates a {@link PropertySet} instance from a byte array
+ that represents a stream in the Horrible Property Set
+ Format.
+
+ The byte array holding the stream data. The
+ complete byte array contents is the stream data.
+
+
+
+ Checks whether an {@link InputStream} is in the Horrible
+ Property Set Format.
+
+ The {@link InputStream} To check. In order To
+ perform the check, the method Reads the first bytes from the
+ stream. After Reading, the stream is Reset To the position it
+ had before Reading. The {@link InputStream} must support the
+ {@link InputStream#mark} method.
+
+ true if the stream is a property Set
+ stream; otherwise, false.
+
+
+
+
+ Checks whether a byte array is in the Horrible Property Set
+ Format.
+
+ The byte array To check.
+ The offset in the byte array.
+ The significant number of bytes in the byte
+ array. Only this number of bytes will be checked.
+
+ true if the byte array is a property Set
+ stream; otherwise, false.
+
+
+
+
+ Initializes this {@link PropertySet} instance from a byte
+ array. The method assumes that it has been checked alReady that
+ the byte array indeed represents a property Set stream. It does
+ no more checks on its own.
+
+ Byte array containing the property Set stream
+ The property Set stream starts at this offset
+ Length of the property Set stream.
+
+
+
+ Checks whether this {@link PropertySet} represents a Summary
+ Information.
+
+
+ true Checks whether this {@link PropertySet} represents a Summary
+ Information; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is document summary information.
+
+
+ true if this instance is document summary information; otherwise, false.
+
+ Checks whether this {@link PropertySet} is a Document
+ Summary Information.
+ @return
+ true
+ if this {@link PropertySet}
+ represents a Document Summary Information, else
+ false
+
+
+
+ Convenience method returning the {@link Property} array
+ contained in this property Set. It is a shortcut for Getting
+ the {@link PropertySet}'s {@link Section}s list and then
+ Getting the {@link Property} array from the first {@link
+ Section}.
+
+ The properties of the only {@link Section} of this
+ {@link PropertySet}.
+
+
+
+ Convenience method returning the value of the property with
+ the specified ID. If the property is not available,
+ null is returned and a subsequent call To {@link
+ #WasNull} will return true .
+
+ The property ID
+ The property value
+
+
+
+ Convenience method returning the value of a bool property
+ with the specified ID. If the property is not available,
+ false is returned. A subsequent call To {@link
+ #WasNull} will return true To let the caller
+ distinguish that case from a real property value of
+ false.
+
+ The property ID
+ The property value
+
+
+
+ Convenience method returning the value of the numeric
+ property with the specified ID. If the property is not
+ available, 0 is returned. A subsequent call To {@link #WasNull}
+ will return true To let the caller distinguish
+ that case from a real property value of 0.
+
+ The property ID
+ The propertyIntValue value
+
+
+
+ Checks whether the property which the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access
+ Was available or not. This information might be important for
+ callers of {@link #GetPropertyIntValue} since the latter
+ returns 0 if the property does not exist. Using {@link
+ #WasNull}, the caller can distiguish this case from a
+ property's real value of 0.
+
+ true if the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access a
+ property that Was not available; otherwise, false.
+
+
+
+ Gets the first section.
+
+ The first section.
+
+
+
+ If the {@link PropertySet} has only a single section this
+ method returns it.
+
+ The singleSection value
+
+
+
+ Returns true if the PropertySet is equal
+ To the specified parameter, else false.
+
+ the object To Compare this
+ PropertySet
+ with
+ true
+ if the objects are equal,
+ false
+ if not
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Factory class To Create instances of {@link SummaryInformation},
+ {@link DocumentSummaryInformation} and {@link PropertySet}.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
Creates the most specific {@link PropertySet} from an entry
+ in the specified POIFS Directory. This is preferrably a {@link
+ DocumentSummaryInformation} or a {@link SummaryInformation}. If
+ the specified entry does not contain a property Set stream, an
+ exception is thrown. If no entry is found with the given name,
+ an exception is thrown.
+
+ @param dir The directory to find the PropertySet in
+ @param name The name of the entry Containing the PropertySet
+ @return The Created {@link PropertySet}.
+ @if there is no entry with that name
+ @if the stream does not
+ contain a property Set.
+ @if some I/O problem occurs.
+ @exception EncoderFallbackException if the specified codepage is not
+ supported.
+
+
+
+ Creates the most specific {@link PropertySet} from an {@link
+ InputStream}. This is preferrably a {@link
+ DocumentSummaryInformation} or a {@link SummaryInformation}. If
+ the specified {@link InputStream} does not contain a property
+ Set stream, an exception is thrown and the {@link InputStream}
+ is repositioned at its beginning.
+
+ Contains the property set stream's data.
+ The Created {@link PropertySet}.
+
+
+
+ Creates a new summary information
+
+ the new summary information.
+
+
+
+ Creates a new document summary information.
+
+ the new document summary information.
+
+
+
+ This exception is thrown when HPSF tries To Read a (yet) unsupported
+ variant type.
+ @see WritingNotSupportedException
+ @see UnsupportedVariantTypeException
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-08-08
+
+
+
+
+ Initializes a new instance of the class.
+
+ The unsupported variant type
+ The value who's variant type is not yet supported
+
+
+
+ Represents a section in a {@link PropertySet}.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @author Drew Varner (Drew.Varner allUpIn sc.edu)
+ @since 2002-02-09
+
+
+
+ Maps property IDs To section-private PID strings. These
+ strings can be found in the property with ID 0.
+
+
+ The section's format ID, {@link #GetFormatID}.
+
+
+
+ Returns the format ID. The format ID is the "type" of the
+ section. For example, if the format ID of the first {@link
+ Section} Contains the bytes specified by
+ org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID
+ the section (and thus the property Set) is a SummaryInformation.
+
+ The format ID.
+
+
+
+ Gets the offset of the section in the stream.
+
+ The offset of the section in the stream
+
+
+
+ Returns the section's size in bytes.
+
+ The section's size in bytes.
+
+
+
+ Returns the number of properties in this section.
+
+ The number of properties in this section.
+
+
+
+ Returns this section's properties.
+
+ This section's properties.
+
+
+
+ Creates an empty and uninitialized {@link Section}.
+
+
+
+
+ Creates a {@link Section} instance from a byte array.
+
+ Contains the complete property Set stream.
+ The position in the stream that points To the
+ section's format ID.
+
+
+ Represents an entry in the property list and holds a property's ID and
+ its offset from the section's beginning.
+
+
+ Compares this {@link PropertyListEntry} with another one by their
+ offsets. A {@link PropertyListEntry} is "smaller" than another one if
+ its offset from the section's begin is smaller.
+
+ @see Comparable#CompareTo(java.lang.Object)
+
+
+ Returns the value of the property with the specified ID. If
+ the property is not available, null is returned
+ and a subsequent call To {@link #wasNull} will return
+ true.
+
+ @param id The property's ID
+
+ @return The property's value
+
+
+ Returns the value of the numeric property with the specified
+ ID. If the property is not available, 0 is returned. A
+ subsequent call To {@link #wasNull} will return
+ true To let the caller distinguish that case from
+ a real property value of 0.
+
+ @param id The property's ID
+
+ @return The property's value
+
+
+ Returns the value of the bool property with the specified
+ ID. If the property is not available, false Is
+ returned. A subsequent call To {@link #wasNull} will return
+ true To let the caller distinguish that case from
+ a real property value of false.
+
+ @param id The property's ID
+
+ @return The property's value
+
+
+ This member is true if the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access a
+ property that was not available, else false.
+
+
+
+ Checks whether the property which the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access
+ was available or not. This information might be important for
+ callers of {@link #GetPropertyIntValue} since the latter
+ returns 0 if the property does not exist. Using {@link
+ #wasNull} the caller can distiguish this case from a property's
+ real value of 0.
+
+ true if the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access a
+ property that was not available; otherwise, false.
+
+
+
+ Returns the PID string associated with a property ID. The ID
+ is first looked up in the {@link Section}'s private
+ dictionary. If it is not found there, the method calls {@link
+ SectionIDMap#GetPIDString}.
+
+ The property ID.
+ The property ID's string value
+
+
+ Checks whether this section is equal To another object. The result Is
+ false if one of the the following conditions holds:
+
+
+
+
The other object is not a {@link Section}.
+
+
The format IDs of the two sections are not equal.
+
+
The sections have a different number of properties. However,
+ properties with ID 1 (codepage) are not counted.
+
+
The other object is not a {@link Section}.
+
+
The properties have different values. The order of the properties
+ is irrelevant.
+
+
+
+ @param o The object To Compare this section with
+ @return true if the objects are equal, false if
+ not
+
+
+
+ Removes a field from a property array. The resulting array Is
+ compactified and returned.
+
+ The property array.
+ The index of the field To be Removed.
+ the compactified array.
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the section's dictionary. A dictionary allows an application To
+ use human-Readable property names instead of numeric property IDs. It
+ Contains mappings from property IDs To their associated string
+ values. The dictionary is stored as the property with ID 0. The codepage
+ for the strings in the dictionary is defined by property with ID 1.
+
+ the dictionary or null
+ if the section does not have
+ a dictionary.
+
+
+
+ Gets the section's codepage, if any.
+
+ The section's codepage if one is defined, else -1.
+
+
+
+ Abstract superclass for the convenience classes {@link
+ SummaryInformation} and {@link DocumentSummaryInformation}.
+ The motivation behind this class is quite nasty if you look
+ behind the scenes, but it serves the application programmer well by
+ providing him with the easy-to-use {@link SummaryInformation} and
+ {@link DocumentSummaryInformation} classes. When parsing the data a
+ property Set stream consists of (possibly coming from an {@link
+ java.io.Stream}) we want To Read and process each byte only
+ once. Since we don't know in advance which kind of property Set we
+ have, we can expect only the most general {@link
+ PropertySet}. Creating a special subclass should be as easy as
+ calling the special subclass' constructor and pass the general
+ {@link PropertySet} in. To make things easy internally, the special
+ class just holds a reference To the general {@link PropertySet} and
+ delegates all method calls To it.
+ A cleaner implementation would have been like this: The {@link
+ PropertySetFactory} parses the stream data into some internal
+ object first. Then it Finds out whether the stream is a {@link
+ SummaryInformation}, a {@link DocumentSummaryInformation} or a
+ general {@link PropertySet}. However, the current implementation
+ went the other way round historically: the convenience classes came
+ only late To my mind.
+ @author Rainer Klute
+ klute@rainer-klute.de
+ @since 2002-02-09
+
+
+
+ The id to name mapping of the properties
+ in this set.
+
+
+ The "real" property Set SpecialPropertySet
+ delegates To.
+
+
+
+ Initializes a new instance of the class.
+
+ The property Set To be encapsulated by the SpecialPropertySet
+
+
+
+ Initializes a new instance of the class.
+
+ The mutable property Set To be encapsulated by the SpecialPropertySet
+
+
+
+ gets or sets the "byteOrder" property.
+
+ the byteOrder value To Set
+
+
+
+ gets or sets the "format" property
+
+ the format value To Set
+
+
+
+ gets or sets the property Set stream's low-level "class ID"
+ field.
+
+ The property Set stream's low-level "class ID" field
+
+
+
+ Returns the number of {@link Section}s in the property
+ Set.
+
+ The number of {@link Section}s in the property Set.
+
+
+
+ Checks whether this {@link PropertySet} represents a Summary
+ Information.
+
+
+ true Checks whether this {@link PropertySet} represents a Summary
+ Information; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is document summary information.
+
+
+ true if this instance is document summary information; otherwise, false.
+
+ Checks whether this {@link PropertySet} is a Document
+ Summary Information.
+ @return
+ true
+ if this {@link PropertySet}
+ represents a Document Summary Information, else
+ false
+
+
+
+ Gets the PropertySet's first section.
+
+ The {@link PropertySet}'s first section.
+
+
+
+ Adds a section To this property set.
+
+ The {@link Section} To Add. It will be Appended
+ after any sections that are alReady present in the property Set
+ and thus become the last section.
+
+
+
+ Removes all sections from this property Set.
+
+
+
+
+ gets or sets the "osVersion" property
+
+ the osVersion value To Set
+
+
+
+ Writes a property Set To a document in a POI filesystem directory.
+
+ The directory in the POI filesystem To Write the document To
+ The document's name. If there is alReady a document with the
+ same name in the directory the latter will be overwritten.
+
+
+
+ Writes the property Set To an output stream.
+
+ the output stream To Write the section To
+
+
+
+ Returns true if the PropertySet is equal
+ To the specified parameter, else false.
+
+ the object To Compare this
+ PropertySet
+ with
+
+ true
+ if the objects are equal,
+ false
+ if not
+
+
+
+
+ Convenience method returning the {@link Property} array
+ contained in this property Set. It is a shortcut for Getting
+ the {@link PropertySet}'s {@link Section}s list and then
+ Getting the {@link Property} array from the first {@link
+ Section}.
+
+
+ The properties of the only {@link Section} of this
+ {@link PropertySet}.
+
+
+
+
+ Convenience method returning the value of the property with
+ the specified ID. If the property is not available,
+ null is returned and a subsequent call To {@link
+ #WasNull} will return true .
+
+ The property ID
+ The property value
+
+
+
+ Convenience method returning the value of a bool property
+ with the specified ID. If the property is not available,
+ false is returned. A subsequent call To {@link
+ #WasNull} will return true To let the caller
+ distinguish that case from a real property value of
+ false.
+
+ The property ID
+ The property value
+
+
+
+ Convenience method returning the value of the numeric
+ property with the specified ID. If the property is not
+ available, 0 is returned. A subsequent call To {@link #WasNull}
+ will return true To let the caller distinguish
+ that case from a real property value of 0.
+
+ The property ID
+ The propertyIntValue value
+
+
+ Fetches the property with the given ID, then does its
+ best to return it as a String
+ @return The property as a String, or null if unavailable
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Checks whether the property which the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access
+ Was available or not. This information might be important for
+ callers of {@link #GetPropertyIntValue} since the latter
+ returns 0 if the property does not exist. Using {@link
+ #WasNull}, the caller can distiguish this case from a
+ property's real value of 0.
+
+
+ true if the last call To {@link
+ #GetPropertyIntValue} or {@link #GetProperty} tried To access a
+ property that Was not available; otherwise, false.
+
+
+
+
+ Convenience class representing a Summary Information stream in a
+ Microsoft Office document.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @see DocumentSummaryInformation
+ @since 2002-02-09
+
+
+
+ The document name a summary information stream usually has in a POIFS
+ filesystem.
+
+
+
+ Initializes a new instance of the class.
+
+ A property Set which should be Created from a summary
+ information stream.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Removes the title.
+
+
+
+
+ Gets or sets the subject.
+
+ The subject.
+
+
+
+ Removes the subject.
+
+
+
+
+ Gets or sets the author.
+
+ The author.
+
+
+
+ Removes the author.
+
+
+
+
+ Gets or sets the keywords.
+
+ The keywords.
+
+
+
+ Removes the keywords.
+
+
+
+
+ Gets or sets the comments.
+
+ The comments.
+
+
+
+ Removes the comments.
+
+
+
+
+ Gets or sets the template.
+
+ The template.
+
+
+
+ Removes the template.
+
+
+
+
+ Gets or sets the last author.
+
+ The last author.
+
+
+
+ Removes the last author.
+
+
+
+
+ Gets or sets the rev number.
+
+ The rev number.
+
+
+
+ Removes the rev number.
+
+
+
+
+ Returns the Total time spent in editing the document (or 0).
+
+ The Total time spent in editing the document or 0 if the {@link
+ SummaryInformation} does not contain this information.
+
+
+
+ Removes the edit time.
+
+
+
+
+ Gets or sets the last printed time
+
+ The last printed time
+ Returns the last printed time (or null).
+
+
+
+ Removes the last printed.
+
+
+
+
+ Gets or sets the create date time.
+
+ The create date time.
+
+
+
+ Removes the create date time.
+
+
+
+
+ Gets or sets the last save date time.
+
+ The last save date time.
+
+
+
+ Removes the last save date time.
+
+
+
+
+ Gets or sets the page count or 0 if the {@link SummaryInformation} does
+ not contain a page count.
+
+ The page count or 0 if the {@link SummaryInformation} does not
+ contain a page count.
+
+
+
+ Removes the page count.
+
+
+
+
+ Gets or sets the word count or 0 if the {@link SummaryInformation} does
+ not contain a word count.
+
+ The word count.
+
+
+
+ Removes the word count.
+
+
+
+
+ Gets or sets the character count or 0 if the {@link SummaryInformation}
+ does not contain a char count.
+
+ The character count.
+
+
+
+ Removes the char count.
+
+
+
+
+ Gets or sets the thumbnail (or null) when this
+ method is implemented. Please note that the return type is likely To
+ Change!
+ Hint To developers: Drew Varner <Drew.Varner
+ -at- sc.edu> said that this is an image in WMF or Clipboard (BMP?)
+ format. However, we won't do any conversion into any image type but
+ instead just return a byte array.
+
+ The thumbnail.
+
+
+
+ Removes the thumbnail.
+
+
+
+
+ Gets or sets the name of the application.
+
+ The name of the application.
+
+
+
+ Removes the name of the application.
+
+
+
+
+ Gets or sets a security code which is one of the following values:
+
+
0 if the {@link SummaryInformation} does not contain a
+ security field or if there is no security on the document. Use
+ {@link PropertySet#wasNull()} To distinguish between the two
+ cases!
+
1 if the document is password protected
+
2 if the document is Read-only recommended
+
4 if the document is Read-only enforced
+
8 if the document is locked for annotations
+
+
+ The security code
+
+
+
+ Removes the security code.
+
+
+
+
+ Class To manipulate data in the Clipboard Variant (Variant#VT_CF VT_CF) format.
+ @author Drew Varner (Drew.Varner inOrAround sc.edu)
+ @since 2002-04-29
+
+
+
+
+ OffSet in bytes where the Clipboard Format Tag starts in the byte[] returned by SummaryInformation#GetThumbnail()
+
+
+
+
+ OffSet in bytes where the Clipboard Format starts in the byte[] returned by SummaryInformation#GetThumbnail()
+
+ This is only valid if the Clipboard Format Tag is CFTAG_WINDOWS
+
+
+
+ OffSet in bytes where the Windows Metafile (WMF) image data starts in the byte[] returned by SummaryInformation#GetThumbnail()
+ There is only WMF data at this point in the
+ byte[] if the Clipboard Format Tag is
+ CFTAG_WINDOWS and the Clipboard Format is
+ CF_METAFILEPICT.
+
+ Note: The byte[] that starts at
+ OFFSet_WMFDATA and ends at
+ GetThumbnail().Length - 1 forms a complete WMF
+ image. It can be saved To disk with a .wmf file
+ type and Read using a WMF-capable image viewer.
+
+
+
+ Clipboard Format Tag - Windows clipboard format
+
+ A DWORD indicating a built-in Windows clipboard format value
+
+
+
+ Clipboard Format Tag - Macintosh clipboard format
+
+ A DWORD indicating a Macintosh clipboard format value
+
+
+
+ Clipboard Format Tag - Format ID
+
+ A GUID containing a format identifier (FMTID). This is rarely used.
+
+
+
+ Clipboard Format Tag - No Data
+
+ A DWORD indicating No data. This is rarely used.
+
+
+
+ Clipboard Format - Windows metafile format. This is the recommended way To store thumbnails in Property Streams.
+
+ Note:This is not the same format used in
+ regular WMF images. The clipboard version of this format has an
+ extra clipboard-specific header.
+
+
+
+ Clipboard Format - Device Independent Bitmap
+
+
+
+
+ Clipboard Format - Enhanced Windows metafile format
+
+
+
+
+ Clipboard Format - Bitmap
+
+ see msdn.microsoft.com/library/en-us/dnw98bk/html/clipboardoperations.asp
+
+
+ A byte[] To hold a thumbnail image in (
+ Variant#VT_CF VT_CF) format.
+
+
+
+ Default Constructor. If you use it then one you'll have To Add
+ the thumbnail byte[] from {@link
+ SummaryInformation#GetThumbnail()} To do any useful
+ manipulations, otherwise you'll Get a
+ NullPointerException.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The thumbnail data.
+
+
+
+ Gets or sets the thumbnail as a byte[] in {@link
+ Variant#VT_CF VT_CF} format.
+
+ The thumbnail value
+
+
+
+ Returns an int representing the Clipboard
+ Format Tag
+ Possible return values are:
+
+
{@link #CFTAG_WINDOWS CFTAG_WINDOWS}
+
{@link #CFTAG_MACINTOSH CFTAG_MACINTOSH}
+
{@link #CFTAG_FMTID CFTAG_FMTID}
+
{@link #CFTAG_NODATA CFTAG_NODATA}
+
+
+ A flag indicating the Clipboard Format Tag
+
+
+
+ Returns an int representing the Clipboard
+ Format
+ Will throw an exception if the Thumbnail's Clipboard Format
+ Tag is not {@link Thumbnail#CFTAG_WINDOWS CFTAG_WINDOWS}.
+ Possible return values are:
+
+
{@link #CF_METAFILEPICT CF_METAFILEPICT}
+
{@link #CF_DIB CF_DIB}
+
{@link #CF_ENHMETAFILE CF_ENHMETAFILE}
+
{@link #CF_BITMAP CF_BITMAP}
+
+
+ a flag indicating the Clipboard Format
+
+
+
+ Returns the Thumbnail as a byte[] of WMF data
+ if the Thumbnail's Clipboard Format Tag is {@link
+ #CFTAG_WINDOWS CFTAG_WINDOWS} and its Clipboard Format is
+ {@link #CF_METAFILEPICT CF_METAFILEPICT}
+ This
+ byte[] is in the traditional WMF file, not the
+ clipboard-specific version with special headers.
+ See http://www.wvware.com/caolan/ora-wmf.html
+ for more information on the WMF image format.
+ @return A WMF image of the Thumbnail
+ @throws HPSFException if the Thumbnail isn't CFTAG_WINDOWS and
+ CF_METAFILEPICT
+
+
+
+
+
+ Class for writing little-endian data and more.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-02-20
+
+
+
+
+ Writes a two-byte value (short) To an output stream.
+
+ The stream To Write To..
+ The number of bytes that have been written.
+
+
+
+ Writes a four-byte value To an output stream.
+
+ @param out The stream To Write To.
+ @param n The value To Write.
+ @exception IOException if an I/O error occurs
+ @return The number of bytes written To the output stream.
+
+
+ Writes a four-byte value To an output stream.
+
+ @param out The stream To Write To.
+ @param n The value To Write.
+ @exception IOException if an I/O error occurs
+ @return The number of bytes written To the output stream.
+
+
+ Writes a eight-byte value To an output stream.
+
+ @param out The stream To Write To.
+ @param n The value To Write.
+ @exception IOException if an I/O error occurs
+ @return The number of bytes written To the output stream.
+
+
+ Writes an unsigned two-byte value To an output stream.
+
+ @param out The stream To Write To
+ @param n The value To Write
+ @exception IOException if an I/O error occurs
+
+
+ Writes an unsigned four-byte value To an output stream.
+
+ @param out The stream To Write To.
+ @param n The value To Write.
+ @return The number of bytes that have been written To the output stream.
+ @exception IOException if an I/O error occurs
+
+
+ Writes a 16-byte {@link ClassID} To an output stream.
+
+ @param out The stream To Write To
+ @param n The value To Write
+ @return The number of bytes written
+ @exception IOException if an I/O error occurs
+
+
+ Writes an array of {@link Property} instances To an output stream
+ according To the Horrible Property Format.
+
+ @param out The stream To Write To
+ @param properties The array To Write To the stream
+ @param codepage The codepage number To use for writing strings
+ @exception IOException if an I/O error occurs
+ @throws UnsupportedVariantTypeException if HPSF does not support some
+ variant type.
+
+
+ Writes a double value value To an output stream.
+
+ @param out The stream To Write To.
+ @param n The value To Write.
+ @exception IOException if an I/O error occurs
+ @return The number of bytes written To the output stream.
+
+
+
+ This exception is thrown if a certain type of property Set Is
+ expected (e.g. a Document Summary Information) but the provided
+ property Set is not of that type.
+ The constructors of this class are analogous To those of its
+ superclass and documented there.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+
+
+
+ Initializes a new instance of the class.
+
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The message string.
+ The reason, i.e. a throwable that indirectly
+ caused this exception.
+
+
+
+ This exception is thrown if HPSF encounters a variant type that isn't
+ supported yet. Although a variant type is unsupported the value can still be
+ retrieved using the {@link VariantTypeException#GetValue} method.
+ Obviously this class should disappear some day.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-08-05
+
+
+
+
+ Initializes a new instance of the class.
+
+ The unsupported variant type
+ The value who's variant type is not yet supported
+
+
+
+ Provides various static utility methods.
+ @author Rainer Klute (klute@rainer-klute.de)
+ @since 2002-02-09
+
+
+
+
+ Copies a part of a byte array into another byte array.
+
+ The source byte array.
+ OffSet in the source byte array.
+ The number of bytes To Copy.
+ The destination byte array.
+ OffSet in the destination byte array.
+
+
+
+ Concatenates the contents of several byte arrays into a
+ single one.
+
+ The byte arrays To be conCatened.
+ A new byte array containing the conCatenated byte arrays.
+
+
+
+ Copies bytes from a source byte array into a new byte
+ array.
+
+ Copy from this byte array.
+ Start Copying here.
+ Copy this many bytes.
+ The new byte array. Its Length is number of copied bytes.
+
+
+ The difference between the Windows epoch (1601-01-01
+ 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in
+ milliseconds: 11644473600000L. (Use your favorite spReadsheet
+ program To verify the correctness of this value. By the way,
+ did you notice that you can tell from the epochs which
+ operating system is the modern one? :-))
+
+
+
+ Converts a Windows FILETIME into a {@link DateTime}. The Windows
+ FILETIME structure holds a DateTime and time associated with a
+ file. The structure identifies a 64-bit integer specifying the
+ number of 100-nanosecond intervals which have passed since
+ January 1, 1601. This 64-bit value is split into the two double
+ words stored in the structure.
+
+ The higher double word of the FILETIME structure.
+ The lower double word of the FILETIME structure.
+ The Windows FILETIME as a {@link DateTime}.
+
+
+
+ Converts a Windows FILETIME into a {@link DateTime}. The Windows
+ FILETIME structure holds a DateTime and time associated with a
+ file. The structure identifies a 64-bit integer specifying the
+ number of 100-nanosecond intervals which have passed since
+ January 1, 1601.
+
+ The filetime To Convert.
+ The Windows FILETIME as a {@link DateTime}.
+
+
+
+ Converts a {@link DateTime} into a filetime.
+
+ The DateTime To be Converted
+ The filetime
+
+
+
+ Compares To object arrays with regarding the objects' order. For
+ example, [1, 2, 3] and [2, 1, 3] are equal.
+
+ The first object array.
+ The second object array.
+ true
+ if the object arrays are equal,
+ false
+ if they are not.
+
+
+
+ Internals the equals.
+
+ The c1.
+ The c2.
+
+
+
+
+ Pads a byte array with 0x00 bytes so that its Length is a multiple of
+ 4.
+
+ The byte array To pad.
+ The padded byte array.
+
+
+
+ Pads a character array with 0x0000 characters so that its Length is a
+ multiple of 4.
+
+ The character array To pad.
+ The padded character array.
+
+
+
+ Pads a string with 0x0000 characters so that its Length is a
+ multiple of 4.
+
+ The string To pad.
+ The padded string as a character array.
+
+
+
+ The Variant types as defined by Microsoft's COM. I
+ found this information in
+ http://www.marin.clara.net/COM/variant_type_definitions.htm.
+ In the variant types descriptions the following shortcuts are
+ used: [V] - may appear in a VARIANT,
+ [T] - may appear in a TYPEDESC,
+ [P] - may appear in an OLE property Set,
+ [S] - may appear in a Safe Array.
+ @author Rainer Klute (klute@rainer-klute.de)
+ @since 2002-02-09
+
+
+
+ [V][P] Nothing, i.e. not a single byte of data.
+
+
+ [V][P] SQL style Null.
+
+
+ [V][T][P][S] 2 byte signed int.
+
+
+ [V][T][P][S] 4 byte signed int.
+
+
+ [V][T][P][S] 4 byte real.
+
+
+ [V][T][P][S] 8 byte real.
+
+
+ [V][T][P][S] currency. How long is this? How is it To be
+ interpreted?
+
+
+ [V][T][P][S] DateTime. How long is this? How is it To be
+ interpreted?
+
+
+ [V][T][P][S] OLE Automation string. How long is this? How is it
+ To be interpreted?
+
+
+ [V][T][P][S] IDispatch *. How long is this? How is it To be
+ interpreted?
+
+
+ [V][T][S] SCODE. How
+ long is this? How is it To be interpreted?
+
+
+ [V][T][P][S] True=-1, False=0.
+
+
+ [V][T][P][S] VARIANT *. How long is this? How is it To be
+ interpreted?
+
+
+ [V][T][S] IUnknown *. How long is this? How is it To be
+ interpreted?
+
+
+ [V][T][S] 16 byte fixed point.
+
+
+ [T] signed char.
+
+
+ [V][T][P][S] unsigned char.
+
+
+ [T][P] unsigned short.
+
+
+ [T][P] unsigned int.
+
+
+ [T][P] signed 64-bit int.
+
+
+ [T][P] unsigned 64-bit int.
+
+
+ [T] signed machine int.
+
+
+ [T] unsigned machine int.
+
+
+ [T] C style void.
+
+
+ [T] Standard return type. How long is this? How is it To be
+ interpreted?
+
+
+ [T] pointer type. How long is this? How is it To be
+ interpreted?
+
+
+ [T] (use VT_ARRAY in VARIANT).
+
+
+ [T] C style array. How long is this? How is it To be
+ interpreted?
+
+
+ [T] user defined type. How long is this? How is it To be
+ interpreted?
+
+
+ [T][P] null terminated string.
+
+
+ [T][P] wide (Unicode) null terminated string.
+
+
+ [P] FILETIME. The FILETIME structure holds a DateTime and time
+ associated with a file. The structure identifies a 64-bit
+ integer specifying the number of 100-nanosecond intervals which
+ have passed since January 1, 1601. This 64-bit value is split
+ into the two dwords stored in the structure.
+
+
+ [P] Length prefixed bytes.
+
+
+ [P] Name of the stream follows.
+
+
+ [P] Name of the storage follows.
+
+
+ [P] Stream Contains an object. How long is this? How is it
+ To be interpreted?
+
+
+ [P] Storage Contains an object. How long is this? How is it
+ To be interpreted?
+
+
+ [P] Blob Contains an object. How long is this? How is it To be
+ interpreted?
+
+
+ [P] Clipboard format. How long is this? How is it To be
+ interpreted?
+
+
+ [P] A Class ID.
+
+ It consists of a 32 bit unsigned integer indicating the size
+ of the structure, a 32 bit signed integer indicating (Clipboard
+ Format Tag) indicating the type of data that it Contains, and
+ then a byte array containing the data.
+
+ The valid Clipboard Format Tags are:
+
+
+
{@link Thumbnail#CFTAG_WINDOWS}
+
{@link Thumbnail#CFTAG_MACINTOSH}
+
{@link Thumbnail#CFTAG_NODATA}
+
{@link Thumbnail#CFTAG_FMTID}
+
+
+
typedef struct tagCLIPDATA {
+ // cbSize is the size of the buffer pointed To
+ // by pClipData, plus sizeof(ulClipFmt)
+ ULONG cbSize;
+ long ulClipFmt;
+ BYTE* pClipData;
+ } CLIPDATA;
+
+ See
+ msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp.
+
+
+ "MUST be a VersionedStream. The storage representing the (non-simple)
+ property set MUST have a stream element with the name in the StreamName
+ field." -- [MS-OLEPS] -- v20110920; Object Linking and Embedding (OLE)
+ Property Set Data Structures; page 24 / 63
+
+
+ [P] simple counted array. How long is this? How is it To be
+ interpreted?
+
+
+ [V] SAFEARRAY*. How
+ long is this? How is it To be interpreted?
+
+
+ [V] void* for local use. How long is this? How is it To be
+ interpreted?
+
+
+ FIXME (3): Document this!
+
+
+ FIXME (3): Document this!
+
+
+ FIXME (3): Document this!
+
+
+ FIXME (3): Document this!
+
+
+ Maps the numbers denoting the variant types To their corresponding
+ variant type names.
+
+
+ Denotes a variant type with a Length that is unknown To HPSF yet.
+
+
+ Denotes a variant type with a variable Length.
+
+
+ Denotes a variant type with a Length of 0 bytes.
+
+
+ Denotes a variant type with a Length of 2 bytes.
+
+
+ Denotes a variant type with a Length of 4 bytes.
+
+
+ Denotes a variant type with a Length of 8 bytes.
+
+
+
+ Returns the variant type name associated with a variant type
+ number.
+
+ The variant type number.
+ The variant type name or the string "unknown variant type"
+
+
+
+ Returns a variant type's Length.
+
+ The variant type number.
+ The Length of the variant type's data in bytes. If the Length Is
+ variable, i.e. the Length of a string, -1 is returned. If HPSF does not
+ know the Length, -2 is returned. The latter usually indicates an
+ unsupported variant type.
+
+
+
+ Supports Reading and writing of variant data.
+ FIXME (3):
+ Reading and writing should be made more
+ uniform than it is now. The following items should be resolved:
+ Reading requires a Length parameter that is 4 byte greater than the
+ actual data, because the variant type field is included.
+ Reading Reads from a byte array while writing Writes To an byte array
+ output stream.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-08-08
+
+
+
+
+ Checks whether logging of unsupported variant types warning is turned
+ on or off.
+
+
+ true if logging is turned on; otherwise, false.
+
+
+
+ Keeps a list of the variant types an "unsupported" message has alReady
+ been issued for.
+
+
+
+ Writes a warning To System.err that a variant type Is
+ unsupported by HPSF. Such a warning is written only once for each variant
+ type. Log messages can be turned on or off by
+
+ The exception To log
+
+
+ HPSF is able To Read these {@link Variant} types.
+
+
+
+ Checks whether HPSF supports the specified variant type. Unsupported
+ types should be implemented included in the {@link #SUPPORTED_TYPES}
+ array.
+
+ the variant type To check
+
+ true if HPFS supports this type,otherwise, false.
+
+
+
+
+ Reads a variant type from a byte array
+
+ The byte array
+ The offset in the byte array where the variant starts
+ The Length of the variant including the variant type field
+ The variant type To Read
+ The codepage To use for non-wide strings
+ A Java object that corresponds best To the variant field. For
+ example, a VT_I4 is returned as a {@link long}, a VT_LPSTR as a
+ {@link String}.
+
+
+
Turns a codepage number into the equivalent character encoding's
+ name.
+
+ @param codepage The codepage number
+
+ @return The character encoding's name. If the codepage number is 65001,
+ the encoding name is "UTF-8". All other positive numbers are mapped to
+ "cp" followed by the number, e.g. if the codepage number is 1252 the
+ returned character encoding name will be "cp1252".
+
+ @exception UnsupportedEncodingException if the specified codepage is
+ less than zero.
+
+
+
+ Writes a variant value To an output stream. This method ensures that
+ always a multiple of 4 bytes is written.
+ If the codepage is UTF-16, which is encouraged, strings
+ must always be written as {@link Variant#VT_LPWSTR}
+ strings, not as {@link Variant#VT_LPSTR} strings. This method ensure this
+ by Converting strings appropriately, if needed.
+
+ The stream To Write the value To.
+ The variant's type.
+ The variant's value.
+ The codepage To use To Write non-wide strings
+ The number of entities that have been written. In many cases an
+ "entity" is a byte but this is not always the case.
+
+
+
+ This exception is thrown if HPSF encounters a problem with a variant type.
+ Concrete subclasses specifiy the problem further.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2004-06-21
+
+
+
+
+ Initializes a new instance of the class.
+
+ The variant type causing the problem
+ The value who's variant type causes the problem
+ A message text describing the problem
+
+
+
+ Gets the offending variant type
+
+ the offending variant type.
+
+
+
+ Returns the value who's variant type caused the problem.
+
+ the value who's variant type caused the problem.
+
+
+
+ This is a dictionary which maps property ID values To property
+ ID strings.
+ The methods {@link #GetSummaryInformationProperties} and {@link
+ #GetDocumentSummaryInformationProperties} return singleton {@link
+ PropertyIDMap}s. An application that wants To extend these maps
+ should treat them as unmodifiable, copy them and modifiy the
+ copies.
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2002-02-09
+
+
+
+ ID of the property that denotes the document's title
+
+
+ ID of the property that denotes the document's subject
+
+
+ ID of the property that denotes the document's author
+
+
+ ID of the property that denotes the document's keywords
+
+
+ ID of the property that denotes the document's comments
+
+
+ ID of the property that denotes the document's template
+
+
+ ID of the property that denotes the document's last author
+
+
+ ID of the property that denotes the document's revision number
+
+
+ ID of the property that denotes the document's edit time
+
+
+ ID of the property that denotes the DateTime and time the document was
+ last printed
+
+
+ ID of the property that denotes the DateTime and time the document was
+ Created.
+
+
+ ID of the property that denotes the DateTime and time the document was
+ saved
+
+
+ ID of the property that denotes the number of pages in the
+ document
+
+
+ ID of the property that denotes the number of words in the
+ document
+
+
+ ID of the property that denotes the number of characters in the
+ document
+
+
+ ID of the property that denotes the document's thumbnail
+
+
+ ID of the property that denotes the application that Created the
+ document
+
+
+ ID of the property that denotes whether Read/Write access To the
+ document is allowed or whether is should be opened as Read-only. It can
+ have the following values:
+
+
+
+
+
Value
+
Description
+
+
+
0
+
No restriction
+
+
+
2
+
Read-only recommended
+
+
+
4
+
Read-only enforced
+
+
+
+
+
+ The entry is a dictionary.
+
+
+ The entry denotes a code page.
+
+
+ The entry is a string denoting the category the file belongs
+ To, e.g. review, memo, etc. This is useful To Find documents of
+ same type.
+
+
+ TarGet format for power point presentation, e.g. 35mm,
+ printer, video etc.
+
+
+ Number of bytes.
+
+
+ Number of lines.
+
+
+ Number of paragraphs.
+
+
+ Number of slides in a power point presentation.
+
+
+ Number of slides with notes.
+
+
+ Number of hidden slides.
+
+
+ Number of multimedia clips, e.g. sound or video.
+
+
+ This entry is Set To -1 when scaling of the thumbnail Is
+ desired. Otherwise the thumbnail should be cropped.
+
+
+ This entry denotes an internally used property. It is a
+ vector of variants consisting of pairs of a string (VT_LPSTR)
+ and a number (VT_I4). The string is a heading name, and the
+ number tells how many document parts are under that
+ heading.
+
+
+ This entry Contains the names of document parts (word: names
+ of the documents in the master document, excel: sheet names,
+ power point: slide titles, binder: document names).
+
+
+ This entry Contains the name of the project manager.
+
+
+ This entry Contains the company name.
+
+
+ If this entry is -1 the links are dirty and should be
+ re-evaluated.
+
+
+ The highest well-known property ID. Applications are free To use higher values for custom purposes.
+
+
+ Contains the summary information property ID values and
+ associated strings. See the overall HPSF documentation for
+ details!
+
+
+ Contains the summary information property ID values and
+ associated strings. See the overall HPSF documentation for
+ details!
+
+
+
+ Initializes a new instance of the class.
+
+ initialCapacity The initial capacity as defined for
+ {@link HashMap}
+ The load factor as defined for {@link HashMap}
+
+
+
+ Initializes a new instance of the class.
+
+ The instance To be Created is backed by this map.
+
+
+
+ Puts a ID string for an ID into the {@link
+ PropertyIDMap}.
+
+ The ID string.
+ The id string.
+ As specified by the {@link java.util.Map} interface, this method
+ returns the previous value associated with the specified id
+
+
+
+ Gets the ID string for an ID from the {@link
+ PropertyIDMap}.
+
+ The ID.
+ The ID string associated with id
+
+
+
+ Gets the Summary Information properties singleton
+
+
+
+
+
+ Gets the Document Summary Information properties
+ singleton.
+
+ The Document Summary Information properties singleton.
+
+
+
+ Maps section format IDs To {@link PropertyIDMap}s. It Is
+ initialized with two well-known section format IDs: those of the
+ \005SummaryInformation stream and the
+ \005DocumentSummaryInformation stream.
+ If you have a section format ID you can use it as a key To query
+ this map. If you Get a {@link PropertyIDMap} returned your section
+ is well-known and you can query the {@link PropertyIDMap} for PID
+ strings. If you Get back null you are on your own.
+ This {@link java.util.Map} expects the byte arrays of section format IDs
+ as keys. A key maps To a {@link PropertyIDMap} describing the
+ property IDs in sections with the specified section format ID.
+ @author Rainer Klute (klute@rainer-klute.de)
+ @since 2002-02-09
+
+
+
+ The SummaryInformation's section's format ID.
+
+
+ The DocumentSummaryInformation's first and second sections' format
+ ID.
+
+
+ A property without a known name is described by this string.
+
+
+ The default section ID map. It maps section format IDs To
+ {@link PropertyIDMap}s.
+
+
+
+ Returns the singleton instance of the default {@link
+ SectionIDMap}.
+
+ The instance value
+
+
+
+ Returns the property ID string that is associated with a
+ given property ID in a section format ID's namespace.
+
+ Each section format ID has its own name
+ space of property ID strings and thus must be specified.
+ The property ID
+ The well-known property ID string associated with the
+ property ID pid in the name space spanned by sectionFormatID If the pid
+ sectionFormatID combination is not well-known, the
+ string "[undefined]" is returned.
+
+
+
+
+ Returns the {@link PropertyIDMap} for a given section format
+ ID.
+
+ The section format ID.
+ the property ID map
+
+
+
+ Returns the {@link PropertyIDMap} for a given section format
+ ID.
+
+ A section format ID as a
+ byte[]
+ the property ID map
+
+
+
+ Associates a section format ID with a {@link
+ PropertyIDMap}.
+
+ the section format ID
+ The property ID map.
+
+
+
+
+ Puts the specified key.
+
+ This parameter remains undocumented since the method Is
+ deprecated.
+ This parameter remains undocumented since the method Is
+ deprecated.
+ The return value remains undocumented since the method Is
+ deprecated.
+
+
+
+ This exception is thrown when trying To Write a (yet) unsupported variant
+ type.
+ @see ReadingNotSupportedException
+ @see UnsupportedVariantTypeException
+ @author Rainer Klute
+ <klute@rainer-klute.de>
+ @since 2003-08-08
+
+
+
+
+ Initializes a new instance of the class.
+
+ The unsupported variant type.
+ The value
+
+
+ A text extractor for old Excel files, which are too old for
+ HSSFWorkbook to handle. This includes Excel 95, and very old
+ (pre-OLE2) Excel files, such as Excel 4 files.
+
+ Returns much (but not all) of the textual content of the file,
+ suitable for indexing by something like Apache Lucene, or used
+ by Apache Tika, but not really intended for display to the user.
+
+
+
+ The Biff version, largely corresponding to the Excel version
+
+
+ The kind of the file, one of {@link BOFRecord#TYPE_WORKSHEET},
+ {@link BOFRecord#TYPE_CHART}, {@link BOFRecord#TYPE_EXCEL_4_MACRO}
+ or {@link BOFRecord#TYPE_WORKSPACE_FILE}
+
+
+ Retrieves the text contents of the file, as best we can
+ for these old file formats
+
+
+
+ A text extractor for Excel files, that is based
+ on the hssf eventusermodel api.
+ It will typically use less memory than
+ ExcelExtractor, but may not provide
+ the same richness of formatting.
+ Returns the textual content of the file, suitable for
+ indexing by something like Lucene, but not really
+ intended for display to the user.
+
+
+
+
+ Would return the document information metadata for the document,
+ if we supported it
+
+ The doc summary information.
+
+
+
+ Would return the summary information metadata for the document,
+ if we supported it
+
+ The summary information.
+
+
+
+ Should sheet names be included? Default is true
+
+ if set to true [include sheet names].
+
+
+
+ Should we return the formula itself, and not
+ the result it produces? Default is false
+
+ if set to true [formulas not results].
+
+
+
+ Retreives the text contents of the file
+
+ All the text from the document.
+
+
+
+ Triggers the extraction.
+
+
+
+
+
+ Process an HSSF Record. Called when a record occurs in an HSSF file.
+
+
+
+
+
+ Formats a number or date cell, be that a real number, or the
+ answer to a formula
+
+ The cell.
+ The value.
+
+
+
+
+ A text extractor for Excel files.
+ Returns the textual content of the file, suitable for
+ indexing by something like Lucene, but not really
+ intended for display to the user.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The wb.
+
+
+
+ Initializes a new instance of the class.
+
+ The fs.
+
+
+
+ Should header and footer be included? Default is true
+
+
+
+
+ Should sheet names be included? Default is true
+
+ if set to true [include sheet names].
+
+
+
+ Should we return the formula itself, and not
+ the result it produces? Default is false
+
+ if set to true [formulas not results].
+
+
+
+ Should cell comments be included? Default is false
+
+ if set to true [include cell comments].
+
+
+
+ Should blank cells be output? Default is to only
+ output cells that are present in the file and are
+ non-blank.
+
+ if set to true [include blank cells].
+
+
+
+ Retreives the text contents of the file
+
+ All the text from the document.
+
+
+
+ Extracts the header footer.
+
+ The header or footer
+
+
+
+
+ ATTACHEDLABEL = Text Begin Pos [FontX] [AlRuns] AI [FRAME] [ObjectLink] [DataLabExtContents] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End
+ AI = BRAI [SeriesText]
+
+
+
+
+ AXES = [IVAXIS DVAXIS [SERIESAXIS] / DVAXIS DVAXIS] *3ATTACHEDLABEL [PlotArea FRAME]
+
+
+
+
+ AXISPARENT = AxisParent Begin Pos [AXES] 1*4CRT End
+
+
+
+
+ AXM = YMult StartObject ATTACHEDLABEL EndObject
+
+
+
+
+ AXS = [IFmtRecord] [Tick] [FontX] *4(AxisLine LineFormat) [AreaFormat]
+ [GELFRAME] *4SHAPEPROPS [TextPropsStream *ContinueFrt12]
+
+
+
+
+ CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS ShtProps
+ *2DFTTEXT AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL [CRTMLFRT]
+ *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End
+
+
+
+
+ CHARTSHEET = BOF CHARTSHEETCONTENT
+ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP PrintSize
+ [HeaderFooter] [BACKGROUND] *Fbi *Fbi2 [ClrtClient] [PROTECTION] [Palette] [SXViewLink]
+ [PivotChartBits] [SBaseRef] [MsoDrawingGroup] OBJECTS Units CHARTFOMATS SERIESDATA
+ *WINDOW *CUSTOMVIEW [CodeName] [CRTMLFRT] EOF
+
+
+
+ All the records between BOF and EOF
+
+
+
+ CRT = ChartFormat Begin (Bar / Line / (BopPop [BopPopCustom]) / Pie / Area / Scatter / Radar /
+ RadarArea / Surf) CrtLink [SeriesList] [Chart3d] [LD] [2DROPBAR] *4(CrtLine LineFormat)
+ *2DFTTEXT [DataLabExtContents] [SS] *4SHAPEPROPS End
+
+
+
+
+ CRTMLFRT = CrtMlFrt *CrtMlFrtContinue
+
+
+
+
+ DAT = Dat Begin LD End
+
+
+
+
+ DFTTEXT = [DataLabExt StartObject] DefaultText ATTACHEDLABEL [EndObject]
+
+
+
+
+ DROPBAR = DropBar Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End
+
+
+
+
+ DVAXIS = Axis Begin [ValueRange] [AXM] AXS [CRTMLFRT] End
+
+
+
+
+ FONTLIST = FrtFontList StartObject *(Font [Fbi]) EndObject
+
+
+
+
+ FRAME = Frame Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End
+
+
+
+
+ GELFRAME = 1*2GelFrame *Continue [PICF]
+ PICF = Begin PicF End
+
+
+
+
+ IVAXIS = Axis Begin [CatSerRange] AxcExt [CatLab] AXS [CRTMLFRT] End
+
+
+
+
+ LD = Legend Begin Pos ATTACHEDLABEL [FRAME] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End
+
+
+
+
+ SERIESAXIS = Axis Begin [CatSerRange] AXS [CRTMLFRT] End
+
+
+
+
+ SERIESDATA = Dimensions 3(SIIndex *(Number / BoolErr / Blank / Label))
+
+
+
+
+ SERIESFORMAT = Series Begin 4AI *SS (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar)))
+ *(LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End]) End
+
+
+
+
+ LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End]
+
+
+
+
+ SHAPEPROPS = ShapePropsStream *ContinueFrt12
+
+
+
+
+ SS = DataFormat Begin [Chart3DBarShape] [LineFormat AreaFormat PieFormat] [SerFmt]
+ [GELFRAME] [MarkerFormat] [AttachedLabel] *2SHAPEPROPS [CRTMLFRT] End
+
+
+
+
+ TEXTPROPS = (RichTextStream / TextPropsStream) *ContinueFrt12
+
+
+
+ Manages the all the records associated with a chart sub-stream.
+ Includes the Initial {@link BOFRecord} and {@link EOFRecord}.
+
+ @author Josh Micich
+
+
+ All the records between BOF and EOF
+
+
+ Groups the sheet protection records for a worksheet.
+
+
+ See OOO excelfileformat.pdf sec 4.18.2 'Sheet Protection in a Workbook
+ (BIFF5-BIFF8)'
+
+ @author Josh Micich
+
+
+ Creates an empty WorksheetProtectionBlock
+
+
+ @return true if the specified Record sid is one belonging to
+ the 'Page Settings Block'.
+
+
+ This method Reads {@link WorksheetProtectionBlock} records from the supplied RecordStream
+ until the first non-WorksheetProtectionBlock record is encountered. As each record is Read,
+ it is incorporated into this WorksheetProtectionBlock.
+
+ As per the OOO documentation, the protection block records can be expected to be written
+ toGether (with no intervening records), but earlier versions of POI (prior to Jun 2009)
+ didn't do this. Workbooks with sheet protection Created by those earlier POI versions
+ seemed to be valid (Excel opens them OK). So PO allows continues to support Reading of files
+ with non continuous worksheet protection blocks.
+
+
+ Note - when POI Writes out this WorksheetProtectionBlock, the records will always be
+ written in one consolidated block (in the standard ordering) regardless of how scattered the
+ records were when they were originally Read.
+
+
+
+ the ProtectRecord. If one is not contained in the sheet, then one is created.
+
+
+
+
+ the PasswordRecord. If one is not Contained in the sheet, then one is Created.
+
+
+
+
+ protect a spreadsheet with a password (not encrypted, just sets protect flags and the password.)
+
+ password to set;Pass null to remove all protection
+ shouldProtectObjects are protected
+ shouldProtectScenarios are protected
+
+
+
+ Creates an ObjectProtect record with protect set to false.
+
+
+
+
+
+ Creates a ScenarioProtect record with protect set to false.
+
+
+
+
+
+ Creates a Password record with password set to 0x0000.
+
+
+
+
+
+
+
+ CFRecordsAggregate - aggregates Conditional Formatting records CFHeaderRecord
+ and number of up to three CFRuleRecord records toGether to simplify
+ access to them.
+ @author Dmitriy Kumshayev
+
+
+ Excel allows up to 3 conditional formating rules
+
+
+ List of CFRuleRecord objects
+
+
+
+ Create CFRecordsAggregate from a list of CF Records
+
+ list of Record objects
+
+
+
+ Create CFRecordsAggregate from a list of CF Records
+
+ list of Record objects
+ position of CFHeaderRecord object in the list of Record objects
+
+
+
+ Create a deep Clone of the record
+
+
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ The offset to begin writing at
+ The data byte array containing instance data
+ number of bytes written
+
+
+ @return false if this whole {@link CFHeaderRecord} / {@link CFRuleRecord}s should be deleted
+
+
+ @return sum of sizes of all aggregated records
+
+
+
+ @author Glen Stampoultzis
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The rs.
+
+
+ It's an aggregate... just made something up
+
+
+
+ Gets the num columns.
+
+ The num columns.
+
+
+
+ Gets the size of the record.
+
+ The size of the record.
+
+
+ Performs a deep Clone of the record
+
+
+
+ Inserts a column into the aggregate (at the end of the list).
+
+ The column.
+
+
+
+ Inserts a column into the aggregate (at the position specified
+ by index
+
+ The index.
+ The columninfo.
+
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ offset to begin writing at
+ byte array containing instance data
+ number of bytes written
+
+
+
+ Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order
+ that they should be written to file. Implementors may or may not return the actual
+ Records being used to manage POI's internal implementation. Callers should not
+ assume either way, and therefore only attempt to modify those Records after cloning
+
+
+
+
+
+ Finds the start of column outline group.
+
+ The idx.
+
+
+
+
+ Finds the end of column outline group.
+
+ The idx.
+
+
+
+
+ Gets the col info.
+
+ The idx.
+
+
+
+
+ Determines whether [is column group collapsed] [the specified idx].
+
+ The idx.
+
+ true if [is column group collapsed] [the specified idx]; otherwise, false.
+
+
+
+
+ Determines whether [is column group hidden by parent] [the specified idx].
+
+ The idx.
+
+ true if [is column group hidden by parent] [the specified idx]; otherwise, false.
+
+
+
+
+ Collapses the column.
+
+ The column number.
+
+
+
+ Expands the column.
+
+ The column number.
+
+
+ Sets all non null fields into the ci parameter.
+
+
+
+ Attempts to merge the col info record at the specified index
+ with either or both of its neighbours
+
+ The col info ix.
+
+
+ merges two column info records (if they are adjacent and have the same formatting, etc)
+ @return false if the two column records could not be merged
+
+
+
+ Sets all adjacent columns of the same outline level to the specified hidden status.
+
+ the col info index of the start of the outline group.
+ The level.
+ The hidden.
+ the column index of the last column in the outline group
+
+
+
+ Sets the column.
+
+ The target column ix.
+ Index of the xf.
+ The width.
+ The level.
+ The hidden.
+ The collapsed.
+
+
+ Sets all non null fields into the ci parameter.
+
+
+
+ Collapses the col info records.
+
+ The column index.
+
+
+
+ Creates an outline Group for the specified columns.
+
+ Group from this column (inclusive)
+ Group to this column (inclusive)
+ if true the Group will be indented by one level;if false indenting will be Removed by one level.
+
+
+
+ Finds the ColumnInfoRecord
+ which contains the specified columnIndex
+
+ index of the column (not the index of the ColumnInfoRecord)
+ /// null
+ if no column info found for the specified column
+
+
+
+
+ Gets the max outline level.
+
+ The max outline level.
+
+
+ Holds all the conditional formatting for a workbook sheet.
+
+ See OOO exelfileformat.pdf sec 4.12 'Conditional Formatting Table'
+
+ @author Josh Micich
+
+
+ Creates an empty ConditionalFormattingTable
+
+
+ @return index of the newly added CF header aggregate
+
+
+ Manages the all the records associated with a 'Custom View Settings' sub-stream.
+ Includes the Initial USERSVIEWBEGIN(0x01AA) and USERSVIEWEND(0x01AB).
+
+ @author Josh Micich
+
+
+ All the records between BOF and EOF
+
+
+
+ Manages the DVALRecord and DVRecords for a single sheet
+ See OOO excelfileformat.pdf section 4.14
+ @author Josh Micich
+
+
+
+ The list of data validations for the current sheet.
+ Note - this may be empty (contrary to OOO documentation)
+
+
+
+ The formula record aggregate is used to join toGether the formula record and it's
+ (optional) string record and (optional) Shared Formula Record (template Reads, excel optimization).
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+ caches the calculated result of the formula
+
+
+
+ Initializes a new instance of the class.
+
+ The formula rec.
+ The string rec.
+ The SVM.
+
+
+ Should be called by any code which is either deleting this formula cell, or changing
+ its type. This method gives the aggregate a chance to unlink any shared formula
+ that may be involved with this cell formula.
+
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ offset to begin writing at
+ byte array containing instance data.
+ number of bytes written
+
+
+
+ Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order
+ that they should be written to file. Implementors may or may not return the actual
+ {@link Record}s being used to manage POI's internal implementation. Callers should not
+ assume either way, and therefore only attempt to modify those {@link Record}s after cloning
+
+
+
+
+
+ Get the current Serialized size of the record. Should include the sid and recLength (4 bytes).
+
+ The size of the record.
+
+
+
+ return the non static version of the id for this record.
+
+ The sid.
+
+
+
+ Sometimes the shared formula flag "seems" to be erroneously set (because the corresponding
+ SharedFormulaRecord does not exist). Normally this would leave no way of determining
+ the Ptg tokens for the formula. However as it turns out in these
+ cases, Excel encodes the unshared Ptg tokens in the right place (inside the FormulaRecord).
+ So the the only thing that needs to be done is to ignore the erroneous
+ shared formula flag.
+
+ This method may also be used for setting breakpoints to help diagnose issues regarding the
+ abnormally-set 'shared formula' flags.
+
+ The formula.
+
+
+
+ Gets or sets the formula record.
+
+ The formula record.
+
+
+
+ Gets or sets the string record.
+
+ The string record.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+ The parameter is null.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the string value.
+
+ The string value.
+
+
+
+ Sets the cached string result.
+
+ The value.
+
+
+
+ Sets the cached boolean result.
+
+ if set to true [value].
+
+
+
+ Sets the cached error result.
+
+ The error code.
+
+
+ Also checks for a related shared formula and unlinks it if found
+
+
+ Removes an array formula
+ @return the range of the array formula containing the specified cell. Never null
+
+
+
+ @author Josh Micich
+
+
+
+ Creates an empty aggregate
+
+
+
+ Reads zero or more consecutive {@link MergeCellsRecord}s
+ @param rs
+
+
+ Groups the page settings records for a worksheet.
+
+ See OOO excelfileformat.pdf sec 4.4 'Page Settings Block'
+
+ @author Josh Micich
+
+
+ Creates a PageSettingsBlock with default settings
+
+
+ @return true if the specified Record sid is one belonging to the
+ 'Page Settings Block'.
+
+
+ Sets a page break at the indicated column
+
+
+
+ Removes a page break at the indicated column
+
+
+
+ Creates the HCenter Record and sets it to false (don't horizontally center)
+
+
+ Creates the VCenter Record and sets it to false (don't horizontally center)
+
+
+ Creates the PrintSetup Record and sets it to defaults and marks it invalid
+ @see org.apache.poi.hssf.record.PrintSetupRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a PrintSetupRecord
+
+
+ Returns the HeaderRecord.
+ @return HeaderRecord for the sheet.
+
+
+ Returns the FooterRecord.
+ @return FooterRecord for the sheet.
+
+
+ Returns the PrintSetupRecord.
+ @return PrintSetupRecord for the sheet.
+
+
+ Gets the size of the margin in inches.
+ @param margin which margin to Get
+ @return the size of the margin
+
+
+ Sets the size of the margin in inches.
+ @param margin which margin to Get
+ @param size the size of the margin
+
+
+ Shifts all the page breaks in the range "count" number of rows/columns
+ @param breaks The page record to be shifted
+ @param start Starting "main" value to shift breaks
+ @param stop Ending "main" value to shift breaks
+ @param count number of units (rows/columns) to shift by
+
+
+ Sets a page break at the indicated row
+ @param row
+
+
+ Removes a page break at the indicated row
+ @param row
+
+
+ Queries if the specified row has a page break
+ @param row
+ @return true if the specified row has a page break
+
+
+ Queries if the specified column has a page break
+
+ @return true if the specified column has a page break
+
+
+ Shifts the horizontal page breaks for the indicated count
+ @param startingRow
+ @param endingRow
+ @param count
+
+
+ Shifts the vertical page breaks for the indicated count
+ @param startingCol
+ @param endingCol
+ @param count
+
+
+ @return all the horizontal page breaks, never null
+
+
+ @return the number of row page breaks
+
+
+ @return all the column page breaks, never null
+
+
+ @return the number of column page breaks
+
+
+
+ HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after
+ the PageSettingsBlock where it belongs.
+
+
+
+
+
+ This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered.
+ As each record is read, it is incorporated into this PageSettingsBlock.
+
+
+
+
+ holds any continue records found after the PLS record.
+ This would not be required if PLS was properly interpreted.
+ Currently, PLS is an {@link UnknownRecord} and does not automatically
+ include any trailing {@link ContinueRecord}s.
+
+
+ Implementors may call non-mutating methods on Record r.
+ @param r must not be null
+
+
+ RecordAggregates are groups of of BIFF Records that are typically stored
+ together and/or updated together. Workbook / Sheet records are typically stored in a sequential
+ list, which does not provide much structure to coordinate updates.
+
+ @author Josh Micich
+
+
+ Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order
+ that they should be written to file. Implementors may or may not return the actual
+ {@link Record}s being used to manage POI's internal implementation. Callers should not
+ assume either way, and therefore only attempt to modify those {@link Record}s after cloning
+
+
+ A wrapper for {@link RecordVisitor} which accumulates the sizes of all
+ records visited.
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Creates a new instance of ValueRecordsAggregate
+
+
+ @param rs record stream with all {@link SharedFormulaRecord}
+ {@link ArrayRecord}, {@link TableRecord} {@link MergeCellsRecord} Records removed
+
+
+ Handles UnknownRecords which appear within the row/cell records
+
+
+ Returns the number of row blocks.
+ The row blocks are goupings of rows that contain the DBCell record
+ after them
+
+
+ Returns the number of physical rows within a block
+
+
+ Returns the physical row number of the first row in a block
+
+
+ Returns the physical row number of the end row in a block
+
+
+ Create a row record.
+
+ @param row number
+ @return RowRecord Created for the passed in row number
+ @see org.apache.poi.hssf.record.RowRecord
+
+
+
+ Manages various auxiliary records while constructing a RowRecordsAggregate
+ @author Josh Micich
+
+
+
+ Coordinates of the first cell having a formula that uses this shared formula.
+ This is often but not always the top left cell in the range covered by
+ {@link #_sfr}
+
+
+ Note - the 'first cell' of a shared formula group is not always the top-left cell
+ of the enclosing range.
+ @return true if the specified coordinates correspond to the 'first cell'
+ of this shared formula group.
+
+
+ cached for optimization purposes
+
+
+ @param firstCells
+ @param recs list of sheet records (possibly Contains records for other parts of the Excel file)
+ @param startIx index of first row/cell record for current sheet
+ @param endIx one past index of last row/cell record for current sheet. It is important
+ that this code does not inadvertently collect SharedFormulaRecords from any other
+ sheet (which could happen if endIx is chosen poorly). (see bug 44449)
+
+
+ @param firstCell as extracted from the {@link ExpPtg} from the cell's formula.
+ @return never null
+
+
+ Gets the {@link SharedValueRecordBase} record if it should be encoded immediately after the
+ formula record Contained in the specified {@link FormulaRecordAggregate} agg. Note - the
+ shared value record always appears after the first formula record in the group. For arrays
+ and tables the first formula is always the in the top left cell. However, since shared
+ formula groups can be sparse and/or overlap, the first formula may not actually be in the
+ top left cell.
+
+ @return the SHRFMLA, TABLE or ARRAY record for the formula cell, if it is the first cell of
+ a table or array region. null if the formula cell is not shared/array/table,
+ or if the specified formula is not the the first in the group.
+
+
+ Converts all {@link FormulaRecord}s handled by sharedFormulaRecord
+ to plain unshared formulas
+
+
+ Add specified Array Record.
+
+
+ Removes the {@link ArrayRecord} for the cell group containing the specified cell.
+ The caller should clear (set blank) all cells in the returned range.
+ @return the range of the array formula which was just removed. Never null.
+
+
+ @return the shared ArrayRecord identified by (firstRow, firstColumn). never null.
+
+
+
+ Aggregate value records toGether. Things are easier to handle that way.
+
+ @author andy
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Creates a new instance of ValueRecordsAggregate
+
+
+ Sometimes the shared formula flag "seems" to be erroneously Set, in which case there is no
+ call to SharedFormulaRecord.ConvertSharedFormulaRecord and hence the
+ ParsedExpression field of this FormulaRecord will not Get updated.
+ As it turns out, this is not a problem, because in these circumstances, the existing value
+ for ParsedExpression is perfectly OK.
+
+ This method may also be used for Setting breakpoints to help diagnose Issues regarding the
+ abnormally-Set 'shared formula' flags.
+ (see TestValueRecordsAggregate.testSpuriousSharedFormulaFlag()).
+
+ The method currently does nothing but do not delete it without Finding a nice home for this
+ comment.
+
+
+ Tallies a count of the size of the cell records
+ that are attached to the rows in the range specified.
+
+
+ Returns true if the row has cells attached to it
+
+
+ Serializes the cells that are allocated to a certain row range
+
+
+
+ The AlRuns record specifies Rich Text Formatting within chart
+ titles (section 2.2.3.3), trendline (section 2.2.3.12), and
+ data labels (section 2.2.3.11).
+
+
+
+ * The series label record defines the type of label associated with the data format record.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a SeriesLabels record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the format flags field for the SeriesLabels record.
+
+
+ show actual value of the data point
+ @return the show actual field value.
+
+
+ show value as percentage of total (pie charts only)
+ @return the show percent field value.
+
+
+ show category label/value as percentage (pie charts only)
+ @return the label as percentage field value.
+
+
+ show smooth line
+ @return the smoothed line field value.
+
+
+ Display category label
+ @return the show label field value.
+
+
+ ??
+ @return the show bubble sizes field value.
+
+
+
+ The AxcExt record specifies additional extension properties of a date axis (section 2.2.3.6),
+ along with a CatSerRange record (section 2.4.39).
+
+
+
+
+ specifies the interval at which the major tick marks are displayed on the axis (section 2.2.3.6),
+ in the unit defined by duMajor.
+
+
+
+
+ specifies the unit of time to use for catMajor when the axis (section 2.2.3.6) is a date axis (section 2.2.3.6).
+ If fDateAxis is set to 0, MUST be ignored.
+
+
+
+
+ specifies the interval at which the minor tick marks are displayed on the axis (section 2.2.3.6),
+ in a unit defined by duMinor.
+
+
+
+
+ specifies the smallest unit of time used by the axis (section 2.2.3.6).
+
+
+
+
+ specifies at which date, as a date in the date system specified by the Date1904 record (section 2.4.77),
+ in the units defined by duBase, the value axis (section 2.2.3.6) crosses this axis (section 2.2.3.6).
+
+
+
+
+ specifies whether MinimumDate is calculated automatically.
+
+
+
+
+ specifies whether MaximumDate is calculated automatically.
+
+
+
+ * The number of axes used on a chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a AxisUsed record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the num axis field for the AxisUsed record.
+
+
+
+ The axis (section 2.2.3.6) line itself.
+
+
+
+
+ The major gridlines along the axis
+
+
+
+
+ The minor gridlines along the axis
+
+
+
+
+ The walls or floor of a 3-D chart
+
+
+
+
+ The AxisLine record specifies which part of the axis (section 2.2.3.6) is
+ specified by the LineFormat record (section 2.4.156) that follows.
+
+ Excel Binary File Format (.xls) Structure Specification
+
+
+
+ Constructs a AxisLineFormat record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+
+
+
+
+
+ * The number of axes used on a chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a AxisUsed record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the num axis field for the AxisUsed record.
+
+
+
+ The BopPopCustom record specifies which data points in the series are contained
+ in the secondary bar/pie instead of the primary pie. MUST follow a BopPop record
+ that has its split field set to Custom (0x0003).
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The BopPop record specifies that the chart group is a bar of pie chart group or
+ a pie of pie chart group and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The BRAI record specifies a reference to data in a sheet (1) that is used by a part of a series,
+ legend entry, trendline or error bars.
+
+
+
+
+ A ChartParsedFormula structure that specifies the formula (section 2.2.2) that specifies the reference.
+
+
+
+ Constructs a LinkedData record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+
+ specifies the part of the series, trendline, or error bars the referenced data specifies.
+
+
+
+
+ specifies the number format to use for the data.
+
+
+
+
+ specifies the properties of a category (3) axis, a date axis, or a series axis.
+
+
+
+ Constructs a CategorySeriesAxis record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+
+ specifies where the value axis crosses this axis, based on the following table.
+ If fMaxCross is set to 1, the value this field MUST be ignored.
+ Category (3) axis This field specifies the category (3) at which the value axis crosses.
+ For example, if this field is 2, the value axis crosses this axis at the second category (3)
+ on this axis. MUST be greater than or equal to 1 and less than or equal to 31999.
+ Series axis MUST be 0.
+ Date axis catCross MUST be equal to the value given by the following formula:
+ catCross = catCrossDate – catMin + 1
+ Where catCrossDate is the catCrossDate field of the AxcExt record
+ and catMin is the catMin field of the AxcExt record.
+
+
+
+
+ specifies the interval between axis labels on this axis. MUST be greater than or equal to 1 and
+ less than or equal to 31999. MUST be ignored for a date axis.
+
+
+
+
+ specifies the interval at which major tick marks and minor tick marks are displayed on the axis.
+ Major tick marks and minor tick marks that would have been visible are hidden unless they are
+ located at a multiple of this field.
+
+
+
+
+ specifies whether the value axis crosses this axis between major tick marks. MUST be a value from to following table:
+ 0 The value axis crosses this axis on a major tick mark.
+ 1 The value axis crosses this axis between major tick marks.
+
+
+
+
+ specifies whether the value axis crosses this axis at the last category (3), the last series,
+ or the maximum date. MUST be a value from the following table:
+ 0 The value axis crosses this axis at the value specified by catCross.
+ 1 The value axis crosses this axis at the last category (3), the last series, or the maximum date.
+
+
+
+
+ specifies whether the axis is displayed in reverse order. MUST be a value from the following table:
+ 0 The axis is displayed in order.
+ 1 The axis is display in reverse order.
+
+
+
+
+ the shape of the base of the data points in a bar or column chart group.
+ MUST be a value from the following table
+ 0x00 The base of the data point is a rectangle.
+ 0x01 The base of the data point is an ellipse.
+
+
+
+
+ how the data points in a bar or column chart group taper from base to tip.
+ MUST be a value from the following
+ 0x00 The data points of the bar or column chart group do not taper.
+ The shape at the maximum value of the data point is the same as the shape at the base.:
+ 0x01 The data points of the bar or column chart group taper to a point at the maximum value of each data point.
+ 0x02 The data points of the bar or column chart group taper towards a projected point at the position of
+ the maximum value of all of the data points in the chart group, but are clipped at the value of each data point.
+
+
+
+
+ The CrtLine record specifies the presence of drop lines, high-low lines, series lines
+ or leader lines on the chart group. This record is followed by a LineFormat record
+ which specifies the format of the lines.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The CrtMlFrtContinue record specifies additional data for a CrtMlFrt record, as specified in the CrtMlFrt record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The DataLabExtContents record specifies the contents of an extended data label.
+
+
+
+ DATALABEXT - Chart Data Label Extension (0x086A)
+
+ @author Patrick Cheng
+
+
+
+ specifies the text elements that are formatted using the position and appearance information
+ specified by the Text record immediately following this record.
+
+
+
+
+ Format all Text records in the chart group where fShowPercent is equal to 0 or fShowValue is equal to 0.
+
+
+
+
+ Format all Text records in the chart group where fShowPercent is equal to 1 or fShowValue is equal to 1.
+
+
+
+
+ Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 0.
+
+
+
+
+ Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 1.
+
+
+
+
+ specifies the text elements that are formatted using the information specified by
+ the Text record immediately following this record.
+
+
+
+ Constructs a DefaultDataLabelTextProperties record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+
+ specifies the text elements that are formatted using the position and appearance
+ information specified by the Text record immediately following this record.
+
+
+
+
+ The DropBar record specifies the attributes of the up bars or the down bars between multiple
+ series of a line chart group and specifies the beginning of a collection of records as
+ defined by the Chart Sheet Substream ABNF. The first of these collections in the line chart
+ group specifies the attributes of the up bars. The second specifies the attributes of the
+ down bars. If this record exists, then the chart group type MUST be line and the field cSer
+ in the record SeriesList MUST be greater than 1.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+ ENDBLOCK - Chart Future Record Type End Block (0x0853)
+
+ @author Patrick Cheng
+
+
+
+ The Fbi2 record specifies the font information at the time the scalable font is added to the chart.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The Fbi record specifies the font information at the time the scalable font is added to the chart.
+
+
+
+ Constructs a FontBasis record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the x Basis field for the FontBasis record.
+
+
+ Get the y Basis field for the FontBasis record.
+
+
+ Get the height basis field for the FontBasis record.
+
+
+ Get the scale field for the FontBasis record.
+
+
+ Get the index to font table field for the FontBasis record.
+
+
+
+ The FontX record specifies the font for a given text element.
+ The Font record referenced by iFont can exist in this chart sheet substream or the workbook.
+
+
+
+ Constructs a FontIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+
+ specifies the font to use for subsequent records.
+ This font can either be the default font of the chart, part of the collection of Font records following
+ the FrtFontList record, or part of the collection of Font records in the globals substream.
+ If iFont is 0x0000, this record specifies the default font of the chart.
+ If iFont is less than or equal to the number of Font records in the globals substream,
+ iFont is a one-based index to a Font record in the globals substream.
+ Otherwise iFont is a one-based index into the collection of Font records in this chart sheet substream
+ where the index is equal to iFont – n, where n is the number of Font records in the globals substream.
+
+
+
+
+ The FrtFontList record specifies font information used on the chart and specifies the
+ beginning of a collection of Font records as defined by the Chart Sheet Substream ABNF.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ specifies the properties of a fill pattern for parts of a chart.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The IFmtRecord record specifies the number format to use for the text on an axis.
+
+
+
+ Constructs a NumberFormatIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the format index field for the NumberFormatIndex record.
+
+
+
+ The LegendException record specifies information about a legend entry which was
+ changed from the default legend entry settings, and specifies the beginning of
+ a collection of records as defined by the Chart Sheet Substream ABNF.
+ The collection of records specifies legend entry formatting. On a chart where
+ the legend contains legend entries for the series and trendlines, as defined
+ in the legend overview, there MUST be zero instances or one instance of this
+ record in the sequence of records that conform to the SERIESFORMAT rule.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The PicF record specifies the layout of a picture that is attached to a picture-filled chart element.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The RadarArea record specifies that the chart group is a filled radar chart group and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The Radar record specifies that the chart group is a radar chart group and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The RichTextStream record specifies additional text properties for the text in
+ the entire chart, text in the current legend, text in the current legend entry,
+ or text in the attached label. These text properties are a superset of the
+ properties stored in the Text, Font, FontX, BRAI, and ObjectLink records based
+ on the following table, as specified by the Chart Sheet Substream ABNF. In each
+ case, the associated Font record is specified by the associated FontX record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The Scatter record specifies that the chart group is a scatter chart group or
+ a bubble chart group, and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The SerAuxErrBar record specifies properties of an error bar.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The SerAuxTrend record specifies a trendline.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The SerFmt record specifies properties of the associated data points, data markers,
+ or lines of the series. The associated data points, data markers, or lines of the
+ series are specified by the preceding DataFormat record. If this record is not
+ present in the sequence of records that conforms to the SS rule of the Chart Sheet
+ Substream ABNF, then the properties of the associated data points, data markers,
+ or lines of the series are specified by the default values of the fields of this record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The SerParent record specifies the series to which the current trendline or error bar corresponds.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The SerToCrt record specifies the chart group for the current series.
+
+
+
+ Constructs a SeriesChartGroupIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the chart Group index field for the SeriesChartGroupIndex record.
+
+
+
+ The ShapePropsStream record specifies the shape formatting properties for chart elements.
+ These shape formatting properties are a superset of the properties stored in the LineFormat,
+ AreaFormat, MarkerFormat, and GelFrame records. They are stored in the rgb field, which is an
+ XML stream (section 2.1.7.22), as defined in [ECMA-376] Part 4, section 5.7.2.198.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+ * Describes a chart sheet properties record.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+ specifies properties of a chart as defined by the Chart Sheet Substream ABNF
+
+
+
+ Constructs a SheetProperties record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the flags field for the SheetProperties record.
+
+
+ Get the empty field for the SheetProperties record.
+
+ @return One of
+ EMPTY_NOT_PLOTTED
+ EMPTY_ZERO
+ EMPTY_INTERPOLATED
+
+ specifies how the empty cells are plotted be a value from the following table:
+ 0x00 Empty cells are not plotted.
+ 0x01 Empty cells are plotted as zero.
+ 0x02 Empty cells are plotted as interpolated.
+
+
+
+
+ whether series are automatically allocated for the chart.
+
+
+
+
+ whether to plot visible cells only.
+
+
+
+
+ whether to size the chart with the window.
+
+
+
+
+ If fAlwaysAutoPlotArea is 1, then this field MUST be 1.
+ If fAlwaysAutoPlotArea is 0, then this field MUST be ignored.
+
+
+
+
+ specifies whether the default plot area dimension (2) is used.
+ 0 Use the default plot area dimension (2) regardless of the Pos record information.
+ 1 Use the plot area dimension (2) of the Pos record; and fManPlotArea MUST be 1.
+
+
+
+ STARTBLOCK - Chart Future Record Type Start Block (0x0852)
+
+ @author Patrick Cheng
+
+
+
+ The Surf record specifies that the chart group is a surface chart group and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The RichTextStream record specifies additional text properties for the text
+ in the entire chart, text in the current legend, text in the current legend
+ entry, or text in the attached label. These text properties are a superset
+ of the properties stored in the Text, Font, FontX, BRAI, and ObjectLink records
+ based on the following table, as specified by the Chart Sheet Substream ABNF.
+ In each case, the associated Font record is specified by the associated FontX record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The YMult record specifies properties of the value multiplier for a value axis and
+ that specifies the beginning of a collection of records as defined by the Chart Sheet
+ substream ABNF. The collection of records specifies a display units label.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ The Chart3d record specifies that the plot area of the chart group is rendered in a 3-D scene
+ and also specifies the attributes of the 3-D plot area. The preceding chart group type MUST be
+ of type bar, pie, line, area, or surface.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ A signed integer that specifies the clockwise rotation, in degrees, of the 3-D plot area
+ around a vertical line through the center of the 3-D plot area. MUST be greater than or
+ equal to 0 and MUST be less than or equal to 360.
+
+
+
+
+ A signed integer that specifies the rotation, in degrees, of the 3-D plot area around
+ a horizontal line through the center of the 3-D plot area.MUST be greater than or equal
+ to -90 and MUST be less than or equal to 90.
+
+
+
+
+ A signed integer that specifies the field of view angle for the 3-D plot area.
+ MUST be greater than or equal to zero and less than 200.
+
+
+
+
+ If fNotPieChart is 0, then this is an unsigned integer that specifies the thickness of the pie for a pie chart group.
+ If fNotPieChart is 1, then this is a signed integer that specifies the height of the 3-D plot area as a percentage of its width.
+
+
+
+
+ A signed integer that specifies the depth of the 3-D plot area as a percentage of its width.
+ MUST be greater than or equal to 1 and less than or equal to 2000.
+
+
+
+
+ An unsigned integer that specifies the width of the gap between the series and the front and
+ back edges of the 3-D plot area as a percentage of the data point depth divided by 2.
+ If fCluster is not 1 and chart group type is not a bar then pcGap also specifies distance
+ between adjacent series as a percentage of the data point depth. MUST be less than or equal to 500.
+
+
+
+
+ A bit that specifies whether the 3-D plot area is rendered with a vanishing point.
+ If fNotPieChart is 0 the value MUST be 0. If fNotPieChart is 1 then the value
+ MUST be a value from the following
+ true Perspective vanishing point applied based on value of pcDist.
+ false No vanishing point applied.
+
+
+
+
+ specifies whether data points are clustered together in a bar chart group.
+ If chart group type is not bar or pie, value MUST be ignored. If chart group type is pie,
+ value MUST be 0. If chart group type is bar, then the value MUST be a value from the following
+ true Data points are clustered.
+ false Data points are not clustered.
+
+
+
+
+ A bit that specifies whether the height of the 3-D plot area is automatically determined.
+ If fNotPieChart is 0 then this MUST be 0. If fNotPieChart is 1 then the value MUST be a value from the following table:
+ false The value of pcHeight is used to determine the height of the 3-D plot area
+ true The height of the 3-D plot area is automatically determined
+
+
+
+
+ A bit that specifies whether the chart group type is pie. MUST be a value from the following :
+ false Chart group type MUST be pie.
+ true Chart group type MUST not be pie.
+
+
+
+
+ Whether the walls are rendered in 2-D. If fPerspective is 1 then this MUST be ignored.
+ If the chart group type is not bar, area or pie this MUST be ignored.
+ If the chart group is of type bar and fCluster is 0, then this MUST be ignored.
+ If the chart group type is pie this MUST be 0 and MUST be ignored.
+ If the chart group type is bar or area, then the value MUST be a value from the following
+ false Chart walls and floor are rendered in 3D.
+ true Chart walls are rendered in 2D and the chart floor is not rendered.
+
+
+
+
+ The CrtLayout12A record specifies layout information for a plot area.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ specifies the type of plot area for the layout target.
+ false Outer plot area - The bounding rectangle that includes the axis labels, axis titles, data table (2) and plot area of the chart.
+ true Inner plot area – The rectangle bounded by the chart axes.
+
+
+
+
+ specifies the checksum
+
+
+
+
+ specifies the horizontal offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area
+
+
+
+
+ specifies the vertical offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area
+
+
+
+
+ specifies the width of the plot area
+
+
+
+
+ specifies the height of the plot area
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of x.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of y.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of dx.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of dy.
+
+
+
+
+ An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode.
+
+
+
+
+ An Xnum value that specifies a vertical offset. The meaning is determined by wYMode.
+
+
+
+
+ An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode.
+
+
+
+
+ An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode.
+
+
+
+
+ The CrtLayout12Mode specifies a layout mode. Each layout mode specifies a different
+ meaning of the x, y, dx, and dy fields of CrtLayout12 and CrtLayout12A.
+
+
+
+
+ Position and dimension (2) are determined by the application. x, y, dx and dy MUST be ignored.
+
+
+
+
+ x and y specify the offset of the top left corner, relative to its default position,
+ as a fraction of the chart area. MUST be greater than or equal to -1.0 and MUST be
+ less than or equal to 1.0. dx and dy specify the width and height, as a fraction of
+ the chart area, MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0.
+
+
+
+
+ x and y specify the offset of the upper-left corner; dx and dy specify the offset of the bottom-right corner.
+ x, y, dx and dy are specified relative to the upper-left corner of the chart area as a fraction of the chart area.
+ x, y, dx and dy MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0.
+
+
+
+
+ The CrtLayout12 record specifies the layout information for attached label, when contained
+ in the sequence of records that conforms to the ATTACHEDLABEL rule,
+ or legend, when contained in the sequence of records that conforms to the LD rule.
+
+
+
+
+ automatic layout type of the legend.
+ MUST be ignored when this record is in the sequence of records that conforms to the ATTACHEDLABEL rule.
+ MUST be a value from the following table:
+ 0x0 Align to the bottom
+ 0x1 Align to top right corner
+ 0x2 Align to the top
+ 0x3 Align to the right
+ 0x4 Align to the left
+
+
+
+
+ specifies the checksum of the values in the order as follows,
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of x.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of y.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of dx.
+
+
+
+
+ A CrtLayout12Mode structure that specifies the meaning of dy.
+
+
+
+
+ An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode.
+
+
+
+
+ An Xnum value that specifies a vertical offset. The meaning is determined by wYMode.
+
+
+
+
+ An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode.
+
+
+
+
+ An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode.
+
+
+
+
+ The CrtMlFrt record specifies additional properties for chart elements, as specified by
+ the Chart Sheet Substream ABNF. These properties complement the record to which they
+ correspond, and are stored as a structure chain defined in XmlTkChain. An application
+ can ignore this record without loss of functionality, except for the additional properties.
+ If this record is longer than 8224 bytes, it MUST be split into several records. The first
+ section of the data appears in this record and subsequent sections appear in one or more
+ CrtMlFrtContinue records that follow this record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ specifies the color, size, and shape of the associated data markers that appear on line, radar,
+ and scatter chart groups. The associated data markers are specified by the preceding DataFormat record.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ the border color of the data marker.
+
+
+
+
+ the interior color of the data marker.
+
+
+
+
+ the type of data marker.
+
+
+
+
+ whether the data marker is automatically generated.
+ false The data marker is not automatically generated.
+ true The data marker type, size, and color are automatically generated and the values are set accordingly in this record.
+
+
+
+
+ whether to show the data marker interior.
+ false The data marker interior is shown.
+ true The data marker interior is not shown.
+
+
+
+
+ whether to show the data marker border.
+ false The data marker border is shown.
+ true The data marker border is not shown.
+
+
+
+
+ the border color of the data marker.
+
+
+
+
+ the interior color of the data marker.
+
+
+
+
+ specifies the size in twips of the data marker.
+
+
+
+
+ The PieFormat record specifies the distance of a data point or data points in a series from the center of one of the following:
+ The plot area for a doughnut or pie chart group.
+ The primary pie in a pie of pie or bar of pie chart group.
+ The secondary bar/pie of a pie of pie chart group.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ A signed integer that specifies the distance of a data point or data points in a series from the center of one of the following:
+ The plot area for a doughnut or pie chart group.
+ The primary pie in a pie of pie or bar of pie chart group.
+ The secondary bar/pie of a pie of pie chart group.
+
+
+
+
+ The Pie record specifies that the chart group is a pie chart group or
+ a doughnut chart group, and specifies the chart group attributes.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+
+ An unsigned integer that specifies the starting angle of the first data point,
+ clockwise from the top of the circle. MUST be less than or equal to 360.
+
+
+
+
+ An unsigned integer that specifies the size of the center hole in a doughnut chart group
+ as a percentage of the plot area size. MUST be a value from the following table:
+ 0 Pie chart group.
+ 10 to 90 Doughnut chart group.
+
+
+
+
+ A bit that specifies whether one data point or more data points in the chart group have shadows.
+
+
+
+
+ A bit that specifies whether the leader lines to the data labels are shown.
+
+
+
+ * The area format record is used to define the colours and patterns for an area.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a AreaFormat record and s its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ the foreground color field for the AreaFormat record.
+
+
+ the background color field for the AreaFormat record.
+
+
+ the pattern field for the AreaFormat record.
+
+
+ the format flags field for the AreaFormat record.
+
+
+ the forecolor index field for the AreaFormat record.
+
+
+ the backcolor index field for the AreaFormat record.
+
+
+ automatic formatting
+ @return the automatic field value.
+
+
+ swap foreground and background colours when data is negative
+ @return the invert field value.
+
+
+ * The area record is used to define a area chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Area record and s its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ the format flags field for the Area record.
+
+
+ series is stacked
+ @return the stacked field value.
+
+
+ results Displayed as percentages
+ @return the Display as percentage field value.
+
+
+ Display a shadow for the chart
+ @return the shadow field value.
+
+
+ * The axis size and location
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a AxisParent record and s its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ the axis type field for the AxisParent record.
+
+ @return One of
+ AXIS_TYPE_MAIN
+ AXIS_TYPE_SECONDARY
+
+
+ the x field for the AxisParent record.
+
+
+ the y field for the AxisParent record.
+
+
+ the width field for the AxisParent record.
+
+
+ the height field for the AxisParent record.
+
+
+ * The axis record defines the type of an axis.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Axis record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the axis type field for the Axis record.
+
+ @return One of
+ AXIS_TYPE_CATEGORY_OR_X_AXIS
+ AXIS_TYPE_VALUE_AXIS
+ AXIS_TYPE_SERIES_AXIS
+
+
+ Get the reserved1 field for the Axis record.
+
+
+ Get the reserved2 field for the Axis record.
+
+
+ Get the reserved3 field for the Axis record.
+
+
+ Get the reserved4 field for the Axis record.
+
+
+ * The bar record is used to define a bar chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Bar record and s its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ the bar space field for the Bar record.
+
+
+ the category space field for the Bar record.
+
+
+ the format flags field for the Bar record.
+
+
+ true to Display horizontal bar charts, false for vertical
+ @return the horizontal field value.
+
+
+ stack Displayed values
+ @return the stacked field value.
+
+
+ Display chart values as a percentage
+ @return the Display as percentage field value.
+
+
+ Display a shadow for the chart
+ @return the shadow field value.
+
+
+ The begin record defines the start of a block of records for a (grpahing
+ data object. This record is matched with a corresponding EndRecord.
+
+ @see EndRecord
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a BeginRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ CATLAB - Category Labels (0x0856)
+
+ @author Patrick Cheng
+
+
+ ENDBLOCK - Chart Future Record Type End Block (0x0853)
+
+ @author Patrick Cheng
+
+
+ ENDOBJECT - Chart Future Record Type End Object (0x0855)
+
+ @author Patrick Cheng
+
+
+
+ The ChartFrtInfo record specifies the versions of the application that originally created and last saved the file.
+
+
+
+ * The chart record is used to define the location and size of a chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Chart record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the x field for the Chart record.
+
+
+ Get the y field for the Chart record.
+
+
+ Get the width field for the Chart record.
+
+
+ Get the height field for the Chart record.
+
+
+ STARTBLOCK - Chart Future Record Type Start Block (0x0852)
+
+ @author Patrick Cheng
+
+
+ STARTOBJECT - Chart Future Record Type Start Object (0x0854)
+
+ @author Patrick Cheng
+
+
+
+ The CrtLink record is written but unused.
+
+
+
+ * The data format record is used to index into a series.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a DataFormat record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the point number field for the DataFormat record.
+
+
+ Get the series index field for the DataFormat record.
+
+
+ Get the series number field for the DataFormat record.
+
+
+ Get the format flags field for the DataFormat record.
+
+
+ Set true to use excel 4 colors.
+ @return the use excel 4 colors field value.
+
+
+ DATALABEXT - Chart Data Label Extension (0x086A)
+
+ @author Patrick Cheng
+
+
+ * The dat record is used to store options for the chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Dat record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the options field for the Dat record.
+
+
+ Sets the horizontal border field value.
+ has a horizontal border
+
+
+ has a horizontal border
+ @return the horizontal border field value.
+
+
+ Sets the vertical border field value.
+ has vertical border
+
+
+ has vertical border
+ @return the vertical border field value.
+
+
+ Sets the border field value.
+ data table has a border
+
+
+ data table has a border
+ @return the border field value.
+
+
+ Sets the show series key field value.
+ shows the series key
+
+
+ shows the series key
+ @return the show series key field value.
+
+
+ The end record defines the end of a block of records for a (Graphing)
+ data object. This record is matched with a corresponding BeginRecord.
+
+ @see BeginRecord
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a EndRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ * The font basis record stores various font metrics.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a FontBasis record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the x Basis field for the FontBasis record.
+
+
+ Get the y Basis field for the FontBasis record.
+
+
+ Get the height basis field for the FontBasis record.
+
+
+ Get the scale field for the FontBasis record.
+
+
+ Get the index to font table field for the FontBasis record.
+
+
+ * The frame record indicates whether there is a border around the Displayed text of a chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Frame record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the border type field for the Frame record.
+
+ @return One of
+ BORDER_TYPE_REGULAR
+ BORDER_TYPE_SHADOW
+
+
+ Get the options field for the Frame record.
+
+
+ excel calculates the size automatically if true
+ @return the auto size field value.
+
+
+ excel calculates the position automatically
+ @return the auto position field value.
+
+
+ * Defines a legend for a chart.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a Legend record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the x axis upper left field for the Legend record.
+
+
+ Get the y axis upper left field for the Legend record.
+
+
+ Get the x size field for the Legend record.
+
+
+ Get the y size field for the Legend record.
+
+
+ Get the type field for the Legend record.
+
+ @return One of
+ TYPE_BOTTOM
+ TYPE_CORNER
+ TYPE_TOP
+ TYPE_RIGHT
+ TYPE_LEFT
+ TYPE_UNDOCKED
+
+
+ Get the spacing field for the Legend record.
+
+ @return One of
+ SPACING_CLOSE
+ SPACING_MEDIUM
+ SPACING_OPEN
+
+
+ Get the options field for the Legend record.
+
+
+ automatic positioning (1=docked)
+ @return the auto position field value.
+
+
+ excel 5 only (true)
+ @return the auto series field value.
+
+
+ position of legend on the x axis is automatic
+ @return the auto x positioning field value.
+
+
+ position of legend on the y axis is automatic
+ @return the auto y positioning field value.
+
+
+ vertical or horizontal legend (1 or 0 respectively). Always 0 if not automatic.
+ @return the vertical field value.
+
+
+ 1 if chart Contains data table
+ @return the data table field value.
+
+
+ * Describes a line format record. The line format record controls how a line on a chart appears.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a LineFormat record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the line color field for the LineFormat record.
+
+
+ Get the line pattern field for the LineFormat record.
+
+ @return One of
+ LINE_PATTERN_SOLID
+ LINE_PATTERN_DASH
+ LINE_PATTERN_DOT
+ LINE_PATTERN_DASH_DOT
+ LINE_PATTERN_DASH_DOT_DOT
+ LINE_PATTERN_NONE
+ LINE_PATTERN_DARK_GRAY_PATTERN
+ LINE_PATTERN_MEDIUM_GRAY_PATTERN
+ LINE_PATTERN_LIGHT_GRAY_PATTERN
+
+
+ Get the weight field for the LineFormat record.
+ specifies the thickness of the line.
+ @return One of
+ WEIGHT_HAIRLINE
+ WEIGHT_NARROW
+ WEIGHT_MEDIUM
+ WEIGHT_WIDE
+
+
+ Get the format field for the LineFormat record.
+
+
+ Get the colour palette index field for the LineFormat record.
+
+
+ automatic format
+ @return the auto field value.
+
+
+ draw tick marks
+ @return the draw ticks field value.
+
+
+ book marks this as reserved = 0 but it seems to do something
+ @return the Unknown field value.
+
+
+ * The number format index record indexes format table. This applies to an axis.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a NumberFormatIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the format index field for the NumberFormatIndex record.
+
+
+ * Links text to an object on the chart or identifies it as the title.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a ObjectLink record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the anchor id field for the ObjectLink record.
+
+ @return One of
+ ANCHOR_ID_CHART_TITLE
+ ANCHOR_ID_Y_AXIS
+ ANCHOR_ID_X_AXIS
+ ANCHOR_ID_SERIES_OR_POINT
+ ANCHOR_ID_Z_AXIS
+
+
+ Get the link 1 field for the ObjectLink record.
+
+
+ Get the link 2 field for the ObjectLink record.
+
+
+ * preceeds and identifies a frame as belonging to the plot area.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a PlotArea record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ * The plot growth record specifies the scaling factors used when a font is scaled.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a PlotGrowth record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the horizontalScale field for the PlotGrowth record.
+
+
+ Get the verticalScale field for the PlotGrowth record.
+
+
+
+ pecifies positioning mode for position information saved in a Pos record.
+
+
+
+
+ Relative position to the chart, in points.
+
+
+
+
+ Absolute width and height in points. It can only be applied to the mdBotRt field of Pos.
+
+
+
+
+ Owner of Pos determines how to interpret the position data.
+
+
+
+
+ Offset to default position, in 1/1000th of the plot area size.
+
+
+
+
+ Relative position to the chart, in SPRC.
+
+
+
+
+ specifies the size and position for a legend, an attached label, or the plot area, as specified by the primary axis group.
+
+
+
+
+ specifies the positioning mode for the upper-left corner of a legend, an attached label, or the plot area.
+
+
+
+
+ specifies the positioning mode for the lower-right corner of a legend, an attached label, or the plot area
+
+
+
+
+ specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type.
+
+
+
+
+ specifies a width. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type.
+
+
+
+
+ specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type.
+
+
+
+
+ specifies a height. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type.
+
+
+
+ * The series chart Group index record stores the index to the CHARTFORMAT record (0 based).
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a SeriesChartGroupIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the chart Group index field for the SeriesChartGroupIndex record.
+
+
+ * links a series to its position in the series list.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a SeriesIndex record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the index field for the SeriesIndex record.
+
+
+ * The series label record defines the type of label associated with the data format record.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a SeriesLabels record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the format flags field for the SeriesLabels record.
+
+
+ show actual value of the data point
+ @return the show actual field value.
+
+
+ show value as percentage of total (pie charts only)
+ @return the show percent field value.
+
+
+ show category label/value as percentage (pie charts only)
+ @return the label as percentage field value.
+
+
+ show smooth line
+ @return the smoothed line field value.
+
+
+ Display category label
+ @return the show label field value.
+
+
+ ??
+ @return the show bubble sizes field value.
+
+
+ * The series list record defines the series Displayed as an overlay to the main chart record.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a SeriesList record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the series numbers field for the SeriesList record.
+
+
+ * The series record describes the overall data for a series.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Series record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the category data type field for the Series record.
+
+ @return One of
+ CATEGORY_DATA_TYPE_DATES
+ CATEGORY_DATA_TYPE_NUMERIC
+ CATEGORY_DATA_TYPE_SEQUENCE
+ CATEGORY_DATA_TYPE_TEXT
+
+
+ Get the values data type field for the Series record.
+
+ @return One of
+ VALUES_DATA_TYPE_DATES
+ VALUES_DATA_TYPE_NUMERIC
+ VALUES_DATA_TYPE_SEQUENCE
+ VALUES_DATA_TYPE_TEXT
+
+
+ Get the num categories field for the Series record.
+
+
+ Get the num values field for the Series record.
+
+
+ Get the bubble series type field for the Series record.
+
+ @return One of
+ BUBBLE_SERIES_TYPE_DATES
+ BUBBLE_SERIES_TYPE_NUMERIC
+ BUBBLE_SERIES_TYPE_SEQUENCE
+ BUBBLE_SERIES_TYPE_TEXT
+
+
+ Get the num bubble values field for the Series record.
+
+
+ * Defines a series name
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ the actual text cannot be longer than 255 characters
+
+
+ Constructs a SeriesText record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the id field for the SeriesText record.
+
+
+ Get the text field for the SeriesText record.
+
+
+ * Indicates the chart-group index for a series. The order probably defines the mapping. So the 0th record probably means the 0th series. The only field in this of course defines which chart Group the 0th series (for instance) would map to. Confusing? Well thats because it Is. (p 522 BCG)
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a SeriesToChartGroup record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the chart Group index field for the SeriesToChartGroup record.
+
+
+ * The value range record defines the range of the value axis.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a ValueRange record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the minimum axis value field for the ValueRange record.
+
+
+ Get the maximum axis value field for the ValueRange record.
+
+
+ Get the major increment field for the ValueRange record.
+
+
+ Get the minor increment field for the ValueRange record.
+
+
+ Get the category axis cross field for the ValueRange record.
+
+
+ Get the options field for the ValueRange record.
+
+
+ automatic minimum value selected
+ @return the automatic minimum field value.
+
+
+ automatic maximum value selected
+ @return the automatic maximum field value.
+
+
+ automatic major Unit selected
+ @return the automatic major field value.
+
+
+ automatic minor Unit selected
+ @return the automatic minor field value.
+
+
+ category crossing point is automatically selected
+ @return the automatic category crossing field value.
+
+
+ use logarithmic scale
+ @return the logarithmic scale field value.
+
+
+ values are reverses in graph
+ @return the values in reverse field value.
+
+
+ category axis to cross at maximum value
+ @return the cross category axis at maximum field value.
+
+
+ reserved, must equal 1 (excel dev. guide says otherwise)
+ @return the reserved field value.
+
+
+
+ The ContinueFrt12 record specifies a continuation of the data in a preceding Future Record
+ Type record that has data longer than 8,224 bytes. Such records are split into several records.
+ The first section of the data appears in the base record and subsequent sections appear in
+ one or more ContinueFrt12 records that appear after the base record. The preceding base record
+ MUST contain a FrtRefHeader or a FrtHeader field.
+
+
+ author: Antony liu (antony.apollo at gmail.com)
+
+
+
+ DConRef records specify a range in a workbook (internal or external) that serves as a data source
+ for pivot tables or data consolidation.
+
+ Represents a DConRef Structure
+ [MS-XLS s.
+ 2.4.86], and the contained DConFile structure
+
+ [MS-XLS s. 2.5.69]. This in turn contains a XLUnicodeStringNoCch
+
+ [MS-XLS s. 2.5.296].
+
+
DConFile.h = 0x00 if the characters inrgb are single byte, and
+ DConFile.h = 0x01 if they are double byte.
+ If they are double byte, then
+
+
If it exists, the length of DConRef.un = 2. Otherwise it is 1.
+
The length of DConFile.rgb = (2 * DConRef.cch). Otherwise it is equal to
+ DConRef.cch
.
+
+
+
DConRef.rgb starts with 0x01 if it is an external reference,
+ and with 0x02 if it is a self-reference.
+
+
+ At the moment this class is read-only.
+
+ @author Niklas Rehfeld
+
+
+ The id of the record type,
+ sid = {@value}
+
+
+ A RefU structure specifying the range of cells if this record is part of an SXTBL.
+
+ [MS XLS s.2.5.211]
+
+
+ A RefU structure specifying the range of cells if this record is part of an SXTBL.
+
+ [MS XLS s.2.5.211]
+
+
+ A RefU structure specifying the range of cells if this record is part of an SXTBL.
+
+ [MS XLS s.2.5.211]
+
+
+ A RefU structure specifying the range of cells if this record is part of an SXTBL.
+
+ [MS XLS s.2.5.211]
+
+
+ the number of chars in the link
+
+
+ the type of characters (single or double byte)
+
+
+ The link's path string. This is the rgb field of a
+ XLUnicodeStringNoCch. Therefore it will contain at least one leading special
+ character (0x01 or 0x02) and probably other ones.
+ @see
+ DConFile [MS-XLS s. 2.5.77] and
+
+ VirtualPath [MS-XLS s. 2.5.69]
+
+
+
+ unused bits at the end, must be set to 0.
+
+
+ Read constructor.
+
+ @param data byte array containing a DConRef Record, including the header.
+
+
+ Read Constructor.
+
+ @param inStream RecordInputStream containing a DConRefRecord structure.
+
+
+ @return The first column of the range.
+
+
+ @return The first row of the range.
+
+
+ @return The last column of the range.
+
+
+ @return The last row of the range.
+
+
+
+ @return raw path byte array.
+
+
+ @return the link's path, with the special characters stripped/replaced. May be null.
+ See MS-XLS 2.5.277 (VirtualPath)
+
+
+ Checks if the data source in this reference record is external to this sheet or internal.
+
+ @return true iff this is an external reference.
+
+
+ The FtCf structure specifies the clipboard format of the picture-type Obj record Containing this FtCf.
+
+
+ Specifies the format of the picture is an enhanced metafile.
+
+
+ Specifies the format of the picture is a bitmap.
+
+
+ Specifies the picture is in an unspecified format that is
+ neither and enhanced metafile nor a bitmap.
+
+
+ Construct a new FtPioGrbitSubRecord and
+ fill its data with the default values
+
+
+ Convert this record to string.
+ Used by BiffViewer and other utilities.
+
+
+ Serialize the record data into the supplied array of bytes
+
+ @param out the stream to serialize into
+
+
+ @return id of this record.
+
+
+ This structure appears as part of an Obj record that represents image display properties.
+
+
+ A bit that specifies whether the picture's aspect ratio is preserved when rendered in
+ different views (Normal view, Page Break Preview view, Page Layout view and printing).
+
+
+ A bit that specifies whether the pictFmla field of the Obj record that Contains
+ this FtPioGrbit specifies a DDE reference.
+
+
+ A bit that specifies whether this object is expected to be updated on print to
+ reflect the values in the cell associated with the object.
+
+
+ A bit that specifies whether the picture is displayed as an icon.
+
+
+ A bit that specifies whether this object is an ActiveX control.
+ It MUST NOT be the case that both fCtl and fDde are equal to 1.
+
+
+ A bit that specifies whether the object data are stored in an
+ embedding storage (= 0) or in the controls stream (ctls) (= 1).
+
+
+ A bit that specifies whether this is a camera picture.
+
+
+ A bit that specifies whether this picture's size has been explicitly Set.
+ 0 = picture size has been explicitly Set, 1 = has not been Set
+
+
+ A bit that specifies whether the OLE server for the object is called
+ to load the object's data automatically when the parent workbook is opened.
+
+
+ Construct a new FtPioGrbitSubRecord and
+ fill its data with the default values
+
+
+ Use one of the bitmasks MANUAL_ADVANCE_BIT ... CURSOR_VISIBLE_BIT
+ @param bitmask
+ @param enabled
+
+
+ Convert this record to string.
+ Used by BiffViewer and other utilities.
+
+
+ Serialize the record data into the supplied array of bytes
+
+ @param out the stream to serialize into
+
+
+ @return id of this record.
+
+
+ Base class for all old (Biff 2 - Biff 4) cell value records
+ (implementors of {@link CellValueRecordInterface}).
+ Subclasses are expected to manage the cell data values (of various types).
+
+
+ Get the index to the ExtendedFormat, for non-Biff2
+
+ @see NPOI.HSSF.Record.ExtendedFormatRecord
+ @return index to the XF record
+
+
+ Is this a Biff2 record, or newer?
+
+
+ Append specific debug info (used by {@link #ToString()} for the value
+ Contained in this record. Trailing new-line should not be Appended
+ (superclass does that).
+
+
+ Gets the debug info BIFF record type name (used by {@link #ToString()}.
+
+
+ Formula Record (0x0006 / 0x0206 / 0x0406) - holds a formula in
+ encoded form, along with the value if a number
+
+
+ Get the calculated value of the formula
+
+ @return calculated value
+
+
+ Get the option flags
+
+ @return bitmask
+
+
+ @return the formula tokens. never null
+
+
+ Biff2 - Biff 4 Label Record (0x0004 / 0x0204) - read only support for
+ strings stored directly in the cell, from the older file formats that
+ didn't use {@link LabelSSTRecord}
+
+
+ @param in the RecordInputstream to read the record from
+
+
+ Get the number of characters this string Contains
+ @return number of characters
+
+
+ Get the String of the cell
+
+
+ Not supported
+
+
+ Title: Bound Sheet Record (aka BundleSheet) (0x0085) for BIFF 5
+ Description: Defines a sheet within a workbook. Basically stores the sheet name
+ and tells where the Beginning of file record is within the HSSF
+ file.
+
+
+ Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file
+
+ @return offset in bytes
+
+
+ Get the sheetname for this sheet. (this appears in the tabs at the bottom)
+ @return sheetname the name of the sheet
+
+
+ Biff2 - Biff 4 Label Record (0x0007 / 0x0207) - read only support for
+ formula string results.
+
+
+ @param in the RecordInputstream to read the record from
+
+
+ @return The string represented by this record.
+
+
+
+ this record only used for record that has name and not implemented.
+
+
+
+
+ DOPER Structure for AutoFilter record
+
+ author: Tony Qu
+
+
+
+ get or set the RK record
+
+
+
+
+ Gets or sets Length of the string (the string is stored in the rgch field that follows the DOPER structures)
+
+
+
+
+ Whether the bBoolErr field contains a Boolean value
+
+
+
+
+ Whether the bBoolErr field contains a Error value
+
+
+
+
+ Get or sets the boolean value
+
+
+
+
+ Get or sets the boolean value
+
+
+
+ FeatFormulaErr2 (Formula Evaluation Shared Feature) common record part
+
+ This record part specifies Formula Evaluation & Error Ignoring data
+ for a sheet, stored as part of a Shared Feature. It can be found in
+ records such as {@link FeatRecord}.
+ For the full meanings of the flags, see pages 669 and 670
+ of the Excel binary file format documentation.
+
+
+ What errors we should ignore
+
+
+ Title: FeatProtection (Protection Shared Feature) common record part
+
+ This record part specifies Protection data for a sheet, stored
+ as part of a Shared Feature. It can be found in records such
+ as {@link FeatRecord}
+
+
+ 0 means no password. Otherwise indicates the
+ password verifier algorithm (same kind as
+ {@link PasswordRecord} and
+ {@link PasswordRev4Record})
+
+
+ Title: FeatSmartTag (Smart Tag Shared Feature) common record part
+
+ This record part specifies Smart Tag data for a sheet, stored as part
+ of a Shared Feature. It can be found in records such as {@link FeatRecord}.
+ It is made up of a hash, and a Set of Factoid Data that Makes up
+ the smart tags.
+ For more details, see page 669 of the Excel binary file
+ format documentation.
+
+
+ Title: FtrHeader (Future Record Header) common record part
+
+ This record part specifies a header for a Ftr (Future)
+ style record, which includes extra attributes above and
+ beyond those of a traditional record.
+
+
+ This MUST match the type on the Containing record
+
+
+ This is a FrtFlags
+
+
+ MUST be 8 bytes and all zero
+
+
+ Common Interface for all Shared Features
+
+
+ Title: Unicode String
+ Description: Unicode String - just standard fields that are in several records.
+ It is considered more desirable then repeating it in all of them.
+ This is often called a XLUnicodeRichExtendedString in MS documentation.
+ REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ REFERENCE: PG 951 Excel Binary File Format (.xls) Structure Specification v20091214
+
+
+ Returns our size, excluding our
+ 4 byte header
+
+
+ Our handling of Equals is inconsistent with CompareTo. The trouble is because we don't truely understand
+ rich text fields yet it's difficult to make a sound comparison.
+
+ @param o The object to Compare.
+ @return true if the object is actually Equal.
+
+
+ construct a unicode string record and fill its fields, ID is ignored
+ @param in the RecordInputstream to read the record from
+
+
+ get the number of characters in the string,
+ as an un-wrapped int
+
+ @return number of characters
+
+
+ Get the option flags which among other things return if this is a 16-bit or
+ 8 bit string
+
+ @return optionflags bitmask
+
+
+
+ @return the actual string this Contains as a java String object
+
+
+ Adds a font run to the formatted string.
+
+ If a font run exists at the current charcter location, then it is
+ Replaced with the font run to be Added.
+
+
+ Swaps all use in the string of one font index
+ for use of a different font index.
+ Normally only called when fonts have been
+ Removed / re-ordered
+
+
+ unlike the real records we return the same as "getString()" rather than debug info
+ @see #getDebugInfo()
+ @return String value of the record
+
+
+ return a character representation of the fields of this record
+
+
+ @return String of output for biffviewer etc.
+
+
+
+ Serialises out the String. There are special rules
+ about where we can and can't split onto
+ Continue records.
+
+
+ A decorated {@link RecordInputStream} that can read primitive data types
+ (short, int, long, etc.) spanned across a {@link ContinueRecord } boundary.
+
+
+ Most records construct themselves from {@link RecordInputStream}.
+ This class assumes that a {@link ContinueRecord} record break always occurs at the type boundary,
+ however, it is not always so.
+
+ Two attachments to Bugzilla 50779
+ demonstrate that a CONTINUE break can appear right in between two bytes of a unicode character
+ or between two bytes of a short. The problematic portion of the data is
+ in a Asian Phonetic Settings Block (ExtRst) of a UnicodeString.
+
+ {@link RecordInputStream} greedily requests the bytes to be read and stumbles on such files with a
+ "Not enough data (1) to read requested (2) bytes" exception. The ContinuableRecordInput
+ class circumvents this "type boundary" rule and Reads data byte-by-byte rolling over CONTINUE if necessary.
+
+
+
+ YK: For now (March 2011) this class is only used to read
+ @link NPOI.HSSF.Record.Common.UnicodeString.ExtRst} blocks of a UnicodeString.
+
+
+
+ @author Yegor Kozlov
+
+
+ Common superclass of all records that can produce {@link ContinueRecord}s while being Serialized.
+
+ @author Josh Micich
+
+
+ Serializes this record's content to the supplied data output.
+ The standard BIFF header (ushort sid, ushort size) has been handled by the superclass, so
+ only BIFF data should be written by this method. Simple data types can be written with the
+ standard {@link LittleEndianOutput} methods. Methods from {@link ContinuableRecordOutput}
+ can be used to Serialize strings (with {@link ContinueRecord}s being written as required).
+ If necessary, implementors can explicitly start {@link ContinueRecord}s (regardless of the
+ amount of remaining space).
+
+ @param out a data output stream
+
+
+ @return the total Length of the encoded record(s)
+ (Note - if any {@link ContinueRecord} is required, this result includes the
+ size of those too)
+
+
+ An augmented {@link LittleEndianOutput} used for serialization of {@link ContinuableRecord}s.
+ This class keeps track of how much remaining space is available in the current BIFF record and
+ can start new {@link ContinueRecord}s as required.
+
+ @author Josh Micich
+
+
+ @return total number of bytes written so far (including all BIFF headers)
+
+
+ Terminates the last record (also updates its 'ushort size' field)
+
+
+ @return number of remaining bytes of space in current record
+
+
+ Terminates the current record and starts a new {@link ContinueRecord} (regardless
+ of how much space is still available in the current record).
+
+
+ Writes the 'optionFlags' byte and encoded character data of a unicode string. This includes:
+
+
byte optionFlags
+
encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
+
+
+ Notes:
+
+
The value of the 'is16bitEncoded' flag is determined by the actual character data
+ of text
+
The string options flag is never separated (by a {@link ContinueRecord}) from the
+ first chunk of character data it refers to.
+
The 'ushort Length' field is assumed to have been explicitly written earlier. Hence,
+ there may be an intervening {@link ContinueRecord}
+
+
+
+ Writes a unicode string complete with header and character data. This includes:
+
+
ushort Length
+
byte optionFlags
+
ushort numberOfRichTextRuns (optional)
+
ushort extendedDataSize (optional)
+
encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
+
+
+ The following bits of the 'optionFlags' byte will be set as appropriate:
+
+
Mask
Description
+
0x01
is16bitEncoded
+
0x04
hasExtendedData
+
0x08
isRichText
+
+ Notes:
+
+
The value of the 'is16bitEncoded' flag is determined by the actual character data
+ of text
+
The string header fields are never separated (by a {@link ContinueRecord}) from the
+ first chunk of character data (i.e. the first character is always encoded in the same
+ record as the string header).
+
+
+
+ **
+
+
+ Allows the writing of BIFF records when the 'ushort size' header field is not known in advance.
+ When the client is finished writing data, it calls {@link #terminate()}, at which point this
+ class updates the 'ushort size' with its value.
+
+ @author Josh Micich
+
+
+ for writing the 'ushort size' field once its value is known
+
+
+ includes 4 byte header
+
+
+ Finishes writing the current record and updates 'ushort size' field.
+ After this method is called, only {@link #getTotalSize()} may be called.
+
+
+ Title: FeatHdr (Feature Header) Record
+
+ This record specifies common information for Shared Features, and
+ specifies the beginning of a collection of records to define them.
+ The collection of data (Globals Substream ABNF, macro sheet substream
+ ABNF or worksheet substream ABNF) specifies Shared Feature data.
+
+
+ Specifies the enhanced protection type. Used to protect a
+ shared workbook by restricting access to some areas of it
+
+
+ Specifies that formula errors should be ignored
+
+
+ Specifies the smart tag type. Recognises certain
+ types of entries (proper names, dates/times etc) and
+ flags them for action
+
+
+ Specifies the shared list type. Used for a table
+ within a sheet
+
+
+ 0x00000000 = rgbHdrData not present
+ 0xffffffff = rgbHdrData present
+
+
+ We need a BOFRecord to make sense of this...
+
+
+ Title: Feat (Feature) Record
+
+ This record specifies Shared Features data. It is normally paired
+ up with a {@link FeatHdrRecord}.
+
+
+ See SHAREDFEATURES_* on {@link FeatHdrRecord}
+
+
+ Only matters if type is ISFFEC2
+
+
+ Contents depends on isf_sharedFeatureType :
+ ISFPROTECTION -> FeatProtection
+ ISFFEC2 -> FeatFormulaErr2
+ ISFFACTOID -> FeatSmartTag
+
+
+ Construct a new FtCblsSubRecord and
+ fill its data with the default values
+
+
+ Convert this record to string.
+ Used by BiffViewer and other utilities.
+
+
+ Serialize the record data into the supplied array of bytes
+
+ @param out the stream to serialize into
+
+
+ @return id of this record.
+
+
+
+
+
+
+
+ The escher container record is used to hold escher records. It is abstract and
+ must be subclassed for maximum benefit.
+
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Michael Zalewski (zalewski at optonline.net)
+
+
+ Constructs a Bar record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (including 4 byte header)
+
+
+ Clone the current record, via a call to serialise
+ it, and another to Create a new record from the
+ bytes.
+ May only be used for classes which don't have
+ internal counts / ids in them. For those which
+ do, a full record-aware serialise is needed, which
+ allocates new ids / counts as needed.
+
+
+ If we have a EscherContainerRecord as one of our
+ children (and most top level escher holders do),
+ then return that.
+
+
+ Descends into all our children, returning the
+ first EscherRecord with the given id, or null
+ if none found
+
+
+ Big drawing Group records are split but it's easier to deal with them
+ as a whole Group so we need to join them toGether.
+
+
+ Convert raw data to escher records.
+
+
+ ARRAY (0x0221)
+
+ Treated in a similar way to SharedFormulaRecord
+
+ @author Josh Micich
+
+
+ Title: Backup Record
+ Description: bool specifying whether
+ the GUI should store a backup of the file.
+ REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a BackupRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the backup flag
+
+ @return short 0/1 (off/on)
+
+
+ Read an unsigned short from the stream without decrypting
+
+
+ Read an unsigned short from the stream without decrypting
+
+
+ Title: Blank cell record
+ Description: Represents a column in a row with no value but with styling.
+ REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Creates a new instance of BlankRecord
+
+
+ Constructs a BlankRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the row this cell occurs on
+
+ @return the row
+
+
+ Get the column this cell defines within the row
+
+ @return the column
+
+
+ Set the index of the extended format record to style this cell with
+
+ @param xf - the 0-based index of the extended format
+ @see org.apache.poi.hssf.record.ExtendedFormatRecord
+
+
+ return the non static version of the id for this record.
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ @return byte array containing instance data
+
+
+ Title: Beginning Of File
+ Description: Somewhat of a misnomer, its used for the beginning of a Set of
+ records that have a particular pupose or subject.
+ Used in sheets and workbooks.
+ REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ for BIFF8 files the BOF is 0x809. For earlier versions see
+ {@link #biff2_sid} {@link #biff3_sid} {@link #biff4_sid}
+ {@link #biff5_sid}
+
+
+ suggested default (0x06 - BIFF8)
+
+
+ suggested default 0x10d3
+
+
+ suggested default 0x07CC (1996)
+
+
+ suggested default for a normal sheet (0x41)
+
+
+ Constructs an empty BOFRecord with no fields Set.
+
+
+ Constructs a BOFRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Version number - for BIFF8 should be 0x06
+ @see #VERSION
+ @param version version to be Set
+
+
+ Set the history bit mask (not very useful)
+ @see #HISTORY_MASK
+ @param bitmask bitmask to Set for the history
+
+
+ Set the minimum version required to Read this file
+
+ @see #VERSION
+ @param version version to Set
+
+
+ type of object this marks
+ @see #TYPE_WORKBOOK
+ @see #TYPE_VB_MODULE
+ @see #TYPE_WORKSHEET
+ @see #TYPE_CHART
+ @see #TYPE_EXCEL_4_MACRO
+ @see #TYPE_WORKSPACE_FILE
+ @return short type of object
+
+
+ Get the build that wrote this file
+ @see #BUILD
+ @return short build number of the generator of this file
+
+
+ Year of the build that wrote this file
+ @see #BUILD_YEAR
+ @return short build year of the generator of this file
+
+
+ Title: Save External Links record (BookBool)
+ Description: Contains a flag specifying whether the Gui should save externally
+ linked values from other workbooks.
+ REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a BookBoolRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the save ext links flag
+
+ @return short 0/1 (off/on)
+
+
+ Creates new BoolErrRecord.
+ REFERENCE: PG ??? Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Michael P. Harhen
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ If true, this record represents an error cell value, otherwise this record represents a boolean cell value
+
+
+ Creates new BoolErrRecord
+
+
+ Constructs a BoolErr record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Set the bool value for the cell
+
+ @param value representing the bool value
+
+
+ Set the error value for the cell
+
+ @param value error representing the error value
+ this value can only be 0,7,15,23,29,36 or 42
+ see bugzilla bug 16560 for an explanation
+
+
+ Get the value for the cell
+
+ @return bool representing the bool value
+
+
+ Get the error value for the cell
+
+ @return byte representing the error value
+
+
+ Indicates whether the call holds a boolean value
+
+ @return boolean true if the cell holds a boolean value
+
+
+ Indicates whether the call holds an error value
+
+ @return bool true if the cell holds an error value
+
+
+ Record for the bottom margin.
+ NOTE: This source was automatically generated.
+
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+ Constructs a BottomMargin record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the margin field for the BottomMargin record.
+
+
+ Title: Bound Sheet Record (aka BundleSheet)
+ Description: Defines a sheet within a workbook. Basically stores the sheetname
+ and tells where the Beginning of file record Is within the HSSF
+ file.
+ REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Sergei Kozello (sergeikozello at mail.ru)
+
+
+ Constructs a BoundSheetRecord and Sets its fields appropriately
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file
+
+ @return offset in bytes
+
+
+ Is the sheet very hidden? Different from (normal) hidden
+
+
+ Get the sheetname for this sheet. (this appears in the tabs at the bottom)
+ @return sheetname the name of the sheet
+
+
+ Converts a List of {@link BoundSheetRecord}s to an array and sorts by the position of their
+ BOFs.
+
+
+ Title: Calc Count Record
+ Description: Specifies the maximum times the gui should perform a formula
+ recalculation. For instance: in the case a formula includes
+ cells that are themselves a result of a formula and a value
+ Changes. This Is essentially a failsafe against an infinate
+ loop in the event the formulas are not independant.
+ REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.CalcModeRecord
+
+
+ Constructs a CalcCountRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+
+ Get the number of iterations to perform
+ @return iterations
+
+
+ Title: Calc Mode Record
+ Description: Tells the gui whether to calculate formulas
+ automatically, manually or automatically
+ except for tables.
+ REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.CalcCountRecord
+
+
+ manually calculate formulas (0)
+
+
+ automatically calculate formulas (1)
+
+
+ automatically calculate formulas except for tables (-1)
+
+
+ Constructs a CalcModeRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Set the calc mode flag for formulas
+
+ @see #MANUAL
+ @see #AUTOMATIC
+ @see #AUTOMATIC_EXCEPT_TABLES
+
+ @param calcmode one of the three flags above
+
+
+ Get the calc mode flag for formulas
+
+ @see #MANUAL
+ @see #AUTOMATIC
+ @see #AUTOMATIC_EXCEPT_TABLES
+
+ @return calcmode one of the three flags above
+
+
+ get the index to the ExtendedFormat
+
+ @see org.apache.poi.hssf.record.ExtendedFormatRecord
+ @return index to the XF record
+
+
+ Append specific debug info (used by {@link #toString()} for the value
+ contained in this record. Trailing new-line should not be Appended
+ (superclass does that).
+
+
+ Gets the debug info BIFF record type name (used by {@link #toString()}.
+
+
+ writes out the value data for this cell record
+
+
+ @return the size (in bytes) of the value data for this cell record
+
+
+ The cell value record interface Is implemented by all classes of type Record that
+ contain cell values. It allows the containing sheet to move through them and Compare
+ them.
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+ @see org.apache.poi.hssf.model.Sheet
+ @see org.apache.poi.hssf.record.Record
+ @see org.apache.poi.hssf.record.RecordFactory
+
+
+ Get the row this cell occurs on
+
+ @return the row
+
+
+ Get the column this cell defines within the row
+
+ @return the column
+
+
+ Conditional Formatting Header record (CFHEADER)
+
+ @author Dmitriy Kumshayev
+
+
+ Creates new CFHeaderRecord
+
+
+ Conditional Formatting Rule Record.
+ @author Dmitriy Kumshayev
+
+
+ Creates new CFRuleRecord
+
+
+ get the stack of the 1st expression as a list
+
+ @return list of tokens (casts stack to a list and returns it!)
+ this method can return null is we are unable to create Ptgs from
+ existing excel file
+ callers should check for null!
+
+
+ get the stack of the 2nd expression as a list
+
+ @return list of tokens (casts stack to a list and returns it!)
+ this method can return null is we are unable to create Ptgs from
+ existing excel file
+ callers should check for null!
+
+
+ Creates a new comparison operation rule
+
+
+ Creates a new comparison operation rule
+
+
+ Creates a new comparison operation rule
+
+
+ Get the option flags
+
+ @return bit mask
+
+
+ @param ptgs may be null
+ @return encoded size of the formula
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ TODO - Parse conditional format formulas properly i.e. produce tRefN and tAreaN instead of tRef and tArea
+ this call will produce the wrong results if the formula Contains any cell references
+ One approach might be to apply the inverse of SharedFormulaRecord.ConvertSharedFormulas(Stack, int, int)
+ Note - two extra parameters (rowIx &colIx) will be required. They probably come from one of the Region objects.
+
+ @return null if formula was null.
+
+
+ TODO - parse conditional format formulas properly i.e. produce tRefN and tAreaN instead of tRef and tArea
+ this call will produce the wrong results if the formula contains any cell references
+ One approach might be to apply the inverse of SharedFormulaRecord.convertSharedFormulas(Stack, int, int)
+ Note - two extra parameters (rowIx & colIx) will be required. They probably come from one of the Region objects.
+
+ @return null if formula was null.
+
+
+ Border Formatting Block of the Conditional Formatting Rule Record.
+
+ @author Dmitriy Kumshayev
+
+
+ Creates new FontFormatting
+
+
+
+ Get the type of border to use for the left border of the cell
+
+
+
+
+ Get the type of border to use for the right border of the cell
+
+
+
+
+ Get the type of border to use for the top border of the cell
+
+
+
+
+ Get the type of border to use for the bottom border of the cell
+
+
+
+
+ Get the type of border to use for the diagonal border of the cell
+
+
+
+
+ Get the color to use for the left border
+
+
+
+
+ Get the color to use for the right border
+
+
+
+
+ Get the color to use for the top border
+
+
+
+
+ Get the color to use for the bottom border
+
+
+
+
+ Get the color to use for the diagonal border
+
+
+
+
+ true if forward diagonal is on
+
+
+
+
+ true if backward diagonal Is on
+
+
+
+
+ @author Dmitriy Kumshayev
+
+
+ first range is within the second range
+
+
+ first range encloses or is equal to the second
+
+
+ Intersect this range with the specified range.
+
+ @param crB - the specified range
+ @return code which reflects how the specified range is related to this range.
+ Possible return codes are:
+ NO_INTERSECTION - the specified range is outside of this range;
+ OVERLAP - both ranges partially overlap;
+ INSIDE - the specified range is inside of this one
+ ENCLOSES - the specified range encloses (possibly exactly the same as) this range
+
+
+ Do all possible cell merges between cells of the list so that:
+ if a cell range is completely inside of another cell range, it s removed from the list
+ if two cells have a shared border, merge them into one bigger cell range
+ @param cellRangeList
+ @return updated List of cell ranges
+
+
+ @return the new range(s) to replace the supplied ones. null if no merge is possible
+
+
+ **
+
+
+ Check if the specified range is located inside of this cell range.
+
+ @param crB
+ @return true if this cell range Contains the argument range inside if it's area
+
+
+ Check if the specified cell range has a shared border with the current range.
+
+ @return true if the ranges have a complete shared border (i.e.
+ the two ranges toher make a simple rectangular region.
+
+
+ Create an enclosing CellRange for the two cell ranges.
+
+ @return enclosing CellRange
+
+
+ @return true if a < b
+
+
+ @return true if a <= b
+
+
+ @return true if a > b
+
+
+ @return true if a >= b
+
+
+ Font Formatting Block of the Conditional Formatting Rule Record.
+
+ @author Dmitriy Kumshayev
+
+
+ Normal boldness (not bold)
+
+
+ Bold boldness (bold)
+
+
+ Creates new FontFormatting
+
+
+ Gets the height of the font in 1/20th point Units
+
+ @return fontheight (in points/20); or -1 if not modified
+
+
+ Get whether the font Is to be italics or not
+
+ @return italics - whether the font Is italics or not
+ @see #GetAttributes()
+
+
+ Get whether the font Is to be stricken out or not
+
+ @return strike - whether the font Is stricken out or not
+ @see #GetAttributes()
+
+
+
+ Get or set the font weight for this font (100-1000dec or 0x64-0x3e8).
+ Default Is 0x190 for normal and 0x2bc for bold
+
+
+
+
+ Get or set whether the font weight is set to bold or not
+
+
+
+ Get the type of base or subscript for the font
+
+ @return base or subscript option
+ @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_NONE
+ @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUPER
+ @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUB
+
+
+ Get the type of Underlining for the font
+
+ @return font Underlining type
+
+
+ Pattern Formatting Block of the Conditional Formatting Rule Record.
+
+ @author Dmitriy Kumshayev
+
+
+ Creates new FontFormatting
+
+
+ Get the Fill pattern
+ @return Fill pattern
+
+
+ Get the background Fill color
+ @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short)
+ @return Fill color
+
+
+ Get the foreground Fill color
+ @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short)
+ @return Fill color
+
+
+ Class ChartFormatRecord
+
+
+ @author Glen Stampoultzis (glens at apache.org)
+ @version %I%, %G%
+
+
+ Constructs a ChartFormatRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+
+ Section [2.4.324]. The Text record specifies the properties of an attached label and specifies the beginning of
+ a collection of records as defined by the chart sheet substream ABNF. This collection of records specifies an attached label.
+
+
+
+
+ Left-alignment if iReadingOrder specifies left-to-right reading order; otherwise, right-alignment
+
+
+
+
+ Center-alignment
+
+
+
+
+ Right-alignment if iReadingOrder specifies left-to-right reading order; otherwise, left-alignment
+
+
+
+
+ Justify-alignment
+
+
+
+
+ distributed alignment
+
+
+
+
+ distributed alignment
+
+
+
+
+ Transparent background
+
+
+
+
+ Opaque background
+
+
+
+ Constructs a Text record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the horizontal alignment field for the Text record.
+
+ @return One of
+ HORIZONTAL_ALIGNMENT_LEFT
+ HORIZONTAL_ALIGNMENT_CENTER
+ HORIZONTAL_ALIGNMENT_BOTTOM
+ HORIZONTAL_ALIGNMENT_JUSTIFY
+
+
+ Get the vertical alignment field for the Text record.
+
+ @return One of
+ VERTICAL_ALIGNMENT_TOP
+ VERTICAL_ALIGNMENT_CENTER
+ VERTICAL_ALIGNMENT_BOTTOM
+ VERTICAL_ALIGNMENT_JUSTIFY
+
+
+ Get the Display mode field for the Text record.
+
+ @return One of
+ DISPLAY_MODE_TRANSPARENT
+ DISPLAY_MODE_OPAQUE
+
+
+ Get the rgbColor field for the Text record.
+
+
+ Get the x field for the Text record.
+
+
+ Get the y field for the Text record.
+
+
+ Set the width field for the Text record.
+
+
+ Get the height field for the Text record.
+
+
+ Get the options1 field for the Text record.
+
+
+ Get the index of color value field for the Text record.
+
+
+ Get the options2 field for the Text record.
+
+
+ Get the text rotation field for the Text record.
+
+
+ true = automaticly selected colour, false = user-selected
+ @return the auto color field value.
+
+
+ true = draw legend
+ @return the show key field value.
+
+
+ false = text is category label
+ @return the show value field value.
+
+
+
+ @return the auto generated text field value.
+
+
+
+ @return the generated field value.
+
+
+
+ @return the auto label deleted field value.
+
+
+
+ @return the auto background field value.
+
+
+
+ @return the show category label as percentage field value.
+
+
+
+ @return the show value as percentage field value.
+
+
+
+ @return the show bubble sizes field value.
+
+
+
+ @return the show label field value.
+
+
+
+ @return the data label placement field value.
+
+
+ * The Tick record defines how tick marks and label positioning/formatting
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver(acoliver at apache.org)
+
+
+ Constructs a Tick record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the major tick type field for the Tick record.
+
+
+ Get the minor tick type field for the Tick record.
+
+
+ Get the label position field for the Tick record.
+
+
+ Get the background field for the Tick record.
+
+
+ Get the label color rgb field for the Tick record.
+
+
+ Get the zero 1 field for the Tick record.
+
+
+ Get the zero 2 field for the Tick record.
+
+
+ Get the options field for the Tick record.
+
+
+ Get the tick color field for the Tick record.
+
+
+ Get the zero 3 field for the Tick record.
+
+
+ use the quote Unquote automatic color for text
+ @return the auto text color field value.
+
+
+ use the quote Unquote automatic color for text background
+ @return the auto text background field value.
+
+
+ rotate text (0=none, 1=normal, 2=90 degrees counterclockwise, 3=90 degrees clockwise)
+ @return the rotation field value.
+
+
+ automatically rotate the text
+ @return the autorotate field value.
+
+
+ * The Units record describes Units.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Units record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the Units field for the Units record.
+
+
+ Title: Codepage Record
+
Description: the default characterset. for the workbook
+
REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+
Use {@link CodePageUtil} to turn these values into Java code pages
+ to encode/decode strings.
+ @version 2.0-pre
+
+
+ Excel 97+ (Biff 8) should always store strings as UTF-16LE or
+ compressed versions of that. As such, this should always be
+ 0x4b0 = UTF_16, except for files coming from older versions.
+
+
+ Constructs a CodepageRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the codepage for this workbook
+
+ @see #CODEPAGE
+ @return codepage - the codepage to Set
+
+
+ Title: COLINFO Record
+ Description: Defines with width and formatting for a range of columns
+ REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a ColumnInfo record and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ @return true if the format, options and column width match
+
+
+ Get the first column this record defines formatting info for
+ @return the first column index (0-based)
+
+
+ Get the last column this record defines formatting info for
+ @return the last column index (0-based)
+
+
+ Get the columns' width in 1/256 of a Char width
+ @return column width
+
+
+ Get the columns' default format info
+ @return the extended format index
+ @see org.apache.poi.hssf.record.ExtendedFormatRecord
+
+
+ Get the options bitfield - use the bitSetters instead
+ @return the bitfield raw value
+
+
+ Get whether or not these cells are hidden
+ @return whether the cells are hidden.
+ @see #SetOptions(short)
+
+
+ Get the outline level for the cells
+ @see #SetOptions(short)
+ @return outline level for the cells
+
+
+ Get whether the cells are collapsed
+ @return wether the cells are collapsed
+ @see #SetOptions(short)
+
+
+ Title: Continue Record - Helper class used primarily for SST Records
+ Description: handles overflow for prior record in the input
+ stream; content Is tailored to that prior record
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Csaba Nagy (ncsaba at yahoo dot com)
+ @version 2.0-pre
+
+
+ default constructor
+
+
+ Main constructor -- kinda dummy because we don't validate or fill fields
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Writes the full encoding of a Continue record without making an instance
+
+
+ @param initialDataByte (optional - often used for unicode flag).
+ If supplied, this will be written before srcData
+ @return the total number of bytes written
+
+
+ Get the data for continuation
+ @return byte array containing all of the continued data
+
+
+ Debugging toString
+
+ @return string representation
+
+
+ Clone this record.
+
+
+ Title: Country Record (aka WIN.INI country)
+ Description: used for localization. Currently HSSF always Sets this to 1
+ and it seems to work fine even in Germany. (es geht's auch fuer Deutschland)
+
+ REFERENCE: PG 298 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a CountryRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Gets the default country
+
+ @return country ID (1 = US)
+
+
+ Gets the current country
+
+ @return country ID (1 = US)
+
+
+ XCT ?CRN Count
+
+ REFERENCE: 5.114
+
+ @author Josh Micich
+
+
+ return the non static version of the id for this record.
+
+
+ Title: CRN
+ Description: This record stores the contents of an external cell or cell range
+ REFERENCE: 5.23
+
+ @author josh micich
+
+
+ return the non static version of the id for this record.
+
+
+
+ @author Josh Micich
+
+
+ Reads an unsigned short value without decrypting
+
+
+ Reads an unsigned short value without decrypting
+
+
+ Create using the default password and a specified docId
+ @param docId 16 bytes
+
+
+ @return true if the keyDigest is compatible with the specified saltData and saltHash
+
+
+ The {@link RC4} instance needs to be Changed every 1024 bytes.
+ @param keyBlockNo used to seed the newly Created {@link RC4}
+
+
+ Stores the BIFF8 encryption/decryption password for the current thread. This has been done
+ using a {@link ThreadLocal} in order to avoid further overloading the various public APIs
+ (e.g. {@link HSSFWorkbook}) that need this functionality.
+
+
+ @return the BIFF8 encryption/decryption password for the current thread.
+ null if it is currently unSet.
+
+
+ Used for both encrypting and decrypting BIFF8 streams. The internal
+ {@link RC4} instance is renewed (re-keyed) every 1024 bytes.
+
+ @author Josh Micich
+
+
+ This field is used to keep track of when to change the {@link RC4}
+ instance. The change occurs every 1024 bytes. Every byte passed over is
+ counted.
+
+
+ TODO: Additionally, the lbPlyPos (position_of_BOF) field of the BoundSheet8 record MUST NOT be encrypted.
+
+ @return true if record type specified by sid is never encrypted
+
+
+ Used when BIFF header fields (sid, size) are being Read. The internal
+ {@link RC4} instance must step even when unencrypted bytes are read
+
+
+ Simple implementation of the alleged RC4 algorithm.
+
+ Inspired by wikipedia's RC4 article
+
+ @author Josh Micich
+
+
+ @return The size of this field in bytes. This operation Is not valid
+ Until after the call to FillField()
+
+
+ Populates this fields data from the byte array passed in1.
+ @param in the RecordInputstream to Read the record from
+
+
+ Appends the string representation of this field to the supplied
+ StringBuilder.
+
+ @param str The string buffer to Append to.
+
+
+ Converts this field to it's byte array form.
+ @param offset The offset into the byte array to start writing to.
+ @param data The data array to Write to.
+ @return The number of bytes written.
+
+
+ Title: Date Window 1904 Flag record
+ Description: Flag specifying whether 1904 date windowing Is used.
+ (tick toc tick toc...BOOM!)
+ REFERENCE: PG 280 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a DateWindow1904 record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Gets whether or not to use 1904 date windowing (which means you'll be screwed in 2004)
+ @return window flag - 0/1 (false,true)
+
+
+ Title: DBCell Record
+ Description: Used by Excel and other MS apps to quickly Find rows in the sheets.
+ REFERENCE: PG 299/440 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height
+ @version 2.0-pre
+
+
+ Constructs a DBCellRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ offset from the start of this DBCellRecord to the start of the first cell in
+ the next DBCell block.
+
+
+ Gets offset from the start of this DBCellRecord to the start of the first cell in
+ the next DBCell block.
+
+ @return rowoffset to the start of the first cell in the next DBCell block
+
+
+ return the cell offset in the array
+
+ @param index of the cell offset to retrieve
+ @return celloffset from the celloffset array
+
+
+ Get the number of cell offsets in the celloffset array
+
+ @return number of cell offsets
+
+
+ @returns the size of the Group of DBCellRecords needed to encode
+ the specified number of blocks and rows
+
+
+ Title: Default Column Width Record
+ Description: Specifies the default width for columns that have no specific
+ width Set.
+ REFERENCE: PG 302 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ The default column width is 8 characters
+
+
+ Constructs a DefaultColumnWidth record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the default column width
+ @return defaultwidth for columns
+
+
+ Title: Default Row Height Record
+ Description: Row height for rows with Undefined or not explicitly defined
+ heights.
+ REFERENCE: PG 301 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ The default row height for empty rows is 255 twips (255 / 20 == 12.75 points)
+
+
+
+ Constructs a DefaultRowHeight record and Sets its fields appropriately.
+
+ the RecordInputstream to Read the record from
+
+
+
+ Get the default row height
+
+
+
+ Title: Delta Record
+ Description: controls the accuracy of the calculations
+ REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a Delta record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the maximum Change
+ @return maxChange - maximum rounding error
+
+
+ Title: Dimensions Record
+ Description: provides the minumum and maximum bounds
+ of a sheet.
+ REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a Dimensions record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the first row number for the sheet
+ @return row - first row on the sheet
+
+
+ Get the last row number for the sheet
+ @return row - last row on the sheet
+
+
+ Get the first column number for the sheet
+ @return column - first column on the sheet
+
+
+ Get the last col number for the sheet
+ @return column - last column on the sheet
+
+
+ Process the bytes into escher records.
+ (Not done by default in case we break things,
+ Unless you Set the "poi.deSerialize.escher"
+ system property)
+
+
+ Size of record (including 4 byte headers for all sections)
+
+
+ DrawingRecord (0x00EC)
+
+
+
+ Cloning of drawing records must be executed through HSSFPatriarch, because all id's must be changed
+ @return cloned drawing records
+
+
+ This Is purely for the biff viewer. During normal operations we don't want
+ to be seeing this.
+
+
+ Title: double Stream Flag Record
+ Description: tells if this Is a double stream file. (always no for HSSF generated files)
+ double Stream files contain both BIFF8 and BIFF7 workbooks.
+ REFERENCE: PG 305 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a DBCellRecord and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: DATAVALIDATIONS Record
+ Description: used in data validation ;
+ This record Is the list header of all data validation records (0x01BE) in the current sheet.
+ @author Dragos Buleandra (dragos.buleandra@trade2b.ro)
+
+
+ Options of the DVAL
+
+
+ Horizontal position of the dialog
+
+
+ Vertical position of the dialog
+
+
+ Object ID of the drop down arrow object for list boxes ;
+ in our case this will be always FFFF , Until
+ MSODrawingGroup and MSODrawing records are implemented
+
+
+ Number of following DV Records
+
+
+ Constructs a DVAL record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ @return the field_1_options
+
+
+ @return the Horizontal position of the dialog
+
+
+ @return the the Vertical position of the dialog
+
+
+ Get Object ID of the drop down arrow object for list boxes
+
+
+ Get number of following DV records
+
+
+ Title: DATAVALIDATION Record (0x01BE)
+ Description: This record stores data validation Settings and a list of cell ranges
+ which contain these Settings. The data validation Settings of a sheet
+ are stored in a sequential list of DV records. This list Is followed by
+ DVAL record(s)
+ @author Dragos Buleandra (dragos.buleandra@trade2b.ro)
+ @version 2.0-pre
+
+
+ Option flags
+
+
+ Title of the prompt box
+
+
+ Title of the error box
+
+
+ Text of the prompt box
+
+
+ Text of the error box
+
+
+ Not used - Excel seems to always write 0x3FE0
+
+
+ Formula data for first condition (RPN token array without size field)
+
+
+ Not used - Excel seems to always write 0x0000
+
+
+ Formula data for second condition (RPN token array without size field)
+
+
+ Cell range address list with all affected ranges
+
+
+ Option flags field
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ Constructs a DV record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ When entered via the UI, Excel translates empty string into "\0"
+ While it is possible to encode the title/text as empty string (Excel doesn't exactly crash),
+ the resulting tool-tip text / message box looks wrong. It is best to do the same as the
+ Excel UI and encode 'not present' as "\0".
+
+
+ Get the condition data type
+ @return the condition data type
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ Get the condition error style
+ @return the condition error style
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ return true if in list validations the string list Is explicitly given in the formula, false otherwise
+ @return true if in list validations the string list Is explicitly given in the formula, false otherwise
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ return true if empty values are allowed in cells, false otherwise
+ @return if empty values are allowed in cells, false otherwise
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ @return true if drop down arrow should be suppressed when list validation is
+ used, false otherwise
+
+
+ return true if a prompt window should appear when cell Is selected, false otherwise
+ @return if a prompt window should appear when cell Is selected, false otherwise
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ return true if an error window should appear when an invalid value Is entered in the cell, false otherwise
+ @return if an error window should appear when an invalid value Is entered in the cell, false otherwise
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ Get the condition operator
+ @return the condition operator
+ @see org.apache.poi.hssf.util.HSSFDataValidation utility class
+
+
+ Gets the option flags field.
+ @return options - the option flags field
+
+
+ Clones the object. Uses serialisation, as the
+ contents are somewhat complex
+
+
+ End Of File record.
+
+ Description: Marks the end of records belonging to a particular object in the
+ HSSF File
+ REFERENCE: PG 307 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a EOFRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ This class Is used to aggregate the MSODRAWING and OBJ record
+ combinations. This Is necessary due to the bizare way in which
+ these records are Serialized. What happens Is that you Get a
+ combination of MSODRAWING -> OBJ -> MSODRAWING -> OBJ records
+ but the escher records are Serialized _across_ the MSODRAWING
+ records.
+
+ It Gets even worse when you start looking at TXO records.
+
+ So what we do with this class Is aggregate lazily. That Is
+ we don't aggregate the MSODRAWING -> OBJ records Unless we
+ need to modify them.
+
+ At first document contains 4 types of records which belong to drawing layer.
+ There are can be such sequence of record:
+
+ DrawingRecord
+ ContinueRecord
+ ...
+ ContinueRecord
+ ObjRecord | TextObjectRecord
+ .....
+ ContinueRecord
+ ...
+ ContinueRecord
+ ObjRecord | TextObjectRecord
+ NoteRecord
+ ...
+ NoteRecord
+
+ To work with shapes we have to read data from Drawing and Continue records into single array of bytes and
+ build escher(office art) records tree from this array.
+ Each shape in drawing layer matches corresponding ObjRecord
+ Each textbox matches corresponding TextObjectRecord
+
+ ObjRecord contains information about shape. Thus each ObjRecord corresponds EscherContainerRecord(SPGR)
+
+ EscherAggrefate contains also NoteRecords
+ NoteRecords must be serial
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Maps shape container objects to their OBJ records
+
+
+ list of "tail" records that need to be Serialized after all drawing Group records
+
+
+ @return Returns the current sid.
+
+
+ Calculates the string representation of this record. This Is
+ simply a dump of all the records.
+
+
+ Calculates the xml representation of this record. This is
+ simply a dump of all the records.
+ @param tab - string which must be added before each line (used by default '\t')
+ @return xml representation of the all aggregated records
+
+
+ @param sid - record sid we want to check if it belongs to drawing layer
+ @return true if record is instance of DrawingRecord or ContinueRecord or ObjRecord or TextObjRecord
+
+
+ Collapses the drawing records into an aggregate.
+ read Drawing, Obj, TxtObj, Note and Continue records into single byte array,
+ create Escher tree from byte array, create map <EscherRecord, Record>
+
+ @param records - list of all records inside sheet
+ @param locFirstDrawingRecord - location of the first DrawingRecord inside sheet
+ @return new EscherAggregate create from all aggregated records which belong to drawing layer
+
+
+ Serializes this aggregate to a byte array. Since this Is an aggregate
+ record it will effectively Serialize the aggregated records.
+
+ @param offset The offset into the start of the array.
+ @param data The byte array to Serialize to.
+ @return The number of bytes Serialized.
+
+
+ @param drawingData - escher records saved into single byte array
+ @param writtenEscherBytes - count of bytes already saved into drawing records (we should know it to decide create
+ drawing or continue record)
+ @param pos current position of data array
+ @param data - array of bytes where drawing records must be serialized
+ @param i - number of shape, saved into data array
+ @return offset of data array after serialization
+
+
+ How many bytes do the raw escher records contain.
+
+ @param records List of escher records
+ @return the number of bytes
+
+
+ @param records list of records to look into
+ @param loc - location of the record which sid must be returned
+ @return sid of the record with selected location
+
+
+ @return record size, including header size of obj, text, note, drawing, continue records
+
+
+ create base tree with such structure:
+ EscherDgContainer
+ -EscherSpgrContainer
+ --EscherSpContainer
+ ---EscherSpRecord
+ ---EscherSpgrRecord
+ ---EscherSpRecord
+ -EscherDgRecord
+
+ id of DgRecord and SpRecord are empty and must be set later by HSSFPatriarch
+
+
+ Unused since this Is an aggregate record. Use CreateAggregate().
+
+ @see #CreateAggregate
+
+
+ Converts the Records into UserModel
+ objects on the bound HSSFPatriarch
+
+
+
+ Associates an escher record to an OBJ record or a TXO record.
+
+ ClientData or Textbox record
+ Obj or TextObj record
+
+
+
+ Remove echerRecord and associated to it Obj or TextObj record
+
+ clientData or textbox record to be removed
+
+
+ @return unmodifiable copy of tail records. We need to access them when building shapes.
+ Every HSSFComment shape has a link to a NoteRecord from the tailRec collection.
+
+
+ @param obj - ObjRecord with id == NoteRecord.id
+ @return null if note record is not found else returns note record with id == obj.id
+
+
+ Title: Extended Format Record
+ Description: Probably one of the more complex records. There are two breeds:
+ Style and Cell.
+
+ It should be noted that fields in the extended format record are
+ somewhat arbitrary. Almost all of the fields are bit-level, but
+ we name them as best as possible by functional Group. In some
+ places this Is better than others.
+
+
+ REFERENCE: PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructor ExtendedFormatRecord
+
+
+
+
+ Constructs an ExtendedFormat record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Clones all the style information from another
+ ExtendedFormatRecord, onto this one. This
+ will then hold all the same style options.
+
+ If The source ExtendedFormatRecord comes from
+ a different Workbook, you will need to sort
+ out the font and format indicies yourself!
+
+
+
+ Get the index to the FONT record (which font to use 0 based)
+
+
+
+
+ Get the index to the Format record (which FORMAT to use 0-based)
+
+
+
+
+ Gets the options bitmask - you can also use corresponding option bit Getters
+ (see other methods that reference this one)
+
+
+
+
+ Get whether the cell Is locked or not
+
+
+
+
+ Get whether the cell Is hidden or not
+
+
+
+
+ Get whether the cell Is a cell or style XFRecord
+
+
+
+
+ Get some old holdover from lotus 123. Who cares, its all over for Lotus.
+ RIP Lotus.
+
+
+
+
+ for cell XF types this Is the parent style (usually 0/normal). For
+ style this should be NULL.
+
+
+
+
+ Get the alignment options bitmask. See corresponding bitGetter methods
+ that reference this one.
+
+
+
+
+ Get the horizontal alignment of the cell.
+
+
+
+
+ Get whether to wrap the text in the cell
+
+
+
+
+ Get the vertical alignment of text in the cell
+
+
+
+
+ Docs just say this Is for far east versions.. (I'm guessing it
+ justifies for right-to-left Read languages)
+
+
+
+
+ Get the degree of rotation. (I've not actually seen this used anywhere)
+
+
+
+
+ Get the indent options bitmask (see corresponding bit Getters that reference
+ this field)
+
+
+
+
+ Get indention (not sure of the Units, think its spaces)
+
+
+
+
+ Get whether to shrink the text to fit
+
+
+
+
+ Get whether to merge cells
+
+
+
+
+ Get the Reading order for far east versions (0 - Context, 1 - Left to right,
+ 2 - right to left) - We could use some help with support for the far east.
+
+
+
+
+ Get whether or not to use the format in this XF instead of the parent XF.
+
+
+
+
+ Get whether or not to use the font in this XF instead of the parent XF.
+
+
+
+
+ Get whether or not to use the alignment in this XF instead of the parent XF.
+
+
+
+
+ Get whether or not to use the border in this XF instead of the parent XF.
+
+
+
+
+ Get whether or not to use the pattern in this XF instead of the parent XF.
+ (foregrount/background)
+
+
+
+
+ Get whether or not to use the locking/hidden in this XF instead of the parent XF.
+
+
+
+
+ Get the border options bitmask (see the corresponding bit Getter methods
+ that reference back to this one)
+
+
+
+
+ Get the borderline style for the left border
+
+
+
+
+ Get the borderline style for the right border
+
+
+
+
+ Get the borderline style for the top border
+
+
+
+
+ Get the borderline style for the bottom border
+
+
+
+
+ Get the palette options bitmask (see the individual bit Getter methods that
+ reference this one)
+
+
+
+
+ Get the palette index for the left border color
+
+
+
+
+ Get the palette index for the right border color
+
+
+
+
+ Get the Additional palette options bitmask (see individual bit Getter methods
+ that reference this method)
+
+
+
+
+ Get the palette index for the top border
+
+
+
+
+ Get the palette index for the bottom border
+
+
+
+
+ Get for diagonal borders
+
+
+
+
+ Get the diagonal border line style
+
+
+
+
+ Not sure what this Is for (maybe Fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
+
+
+
+
+ Get the Additional Fill pattern
+
+
+
+
+ Get the Fill palette options bitmask (see indivdual bit Getters that
+ reference this method)
+
+
+
+
+ Get the foreground palette color index
+
+
+
+
+ Get the background palette color index
+
+
+
+ Will consider two different records with the same
+ contents as Equals, as the various indexes
+ that matter are embedded in the records
+
+
+ EXTERNALNAME
+
+ @author Josh Micich
+
+
+ 'rgoper' / 'Last received results of the DDE link'
+ (seems to be only applicable to DDE links)
+ Logically this is a 2-D array, which has been flattened into 1-D array here.
+
+
+ (logical) number of columns in the {@link #_ddeValues} array
+
+
+ (logical) number of rows in the {@link #_ddeValues} array
+
+
+ Convenience Function to determine if the name Is a built-in name
+
+
+ For OLE and DDE, links can be either 'automatic' or 'manual'
+
+
+ only for OLE and DDE
+
+
+ DDE links only. If true, this denotes the 'StdDocumentName'
+
+
+ @return the standard String representation of this name
+
+
+ index to External Book Block (which starts with a EXTERNALBOOK record)
+
+
+ a Constructor for making new sub record
+
+
+ @param in the RecordInputstream to Read the record from
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ Title: Extern Sheet
+ Description: A List of Inndexes to SupBook
+ REFERENCE:
+ @author Libin Roman (Vista Portal LDT. Developer)
+ @version 1.0-pre
+
+
+ Constructs a Extern Sheet record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Add a zero-based reference to a {@link org.apache.poi.hssf.record.SupBookRecord}.
+
+ If the type of the SupBook record is same-sheet referencing, Add-In referencing,
+ DDE data source referencing, or OLE data source referencing,
+ then no scope is specified and this value MUST be -2. Otherwise,
+ the scope must be set as follows:
+
+
-2 Workbook-level reference that applies to the entire workbook.
+
-1 Sheet-level reference.
+
>=0 Sheet-level reference. This specifies the first sheet in the reference.
+
+ If the SupBook type is unused or external workbook referencing,
+ then this value specifies the zero-based index of an external sheet name,
+ see {@link org.apache.poi.hssf.record.SupBookRecord#getSheetNames()}.
+ This referenced string specifies the name of the first sheet within the external workbook that is in scope.
+ This sheet MUST be a worksheet or macro sheet.
+
+
+ If the supporting link type is self-referencing, then this value specifies the zero-based index of a
+ {@link org.apache.poi.hssf.record.BoundSheetRecord} record in the workbook stream that specifies
+ the first sheet within the scope of this reference. This sheet MUST be a worksheet or a macro sheet.
+
+
+
+
+ @param firstSheetIndex the scope, must be -2 for add-in references
+ @param lastSheetIndex the scope, must be -2 for add-in references
+ @return index of newly added ref
+
+
+ returns the number of REF Records, which is in model
+ @return number of REF records
+
+
+ @return number of REF structures
+
+
+ Adds REF struct (ExternSheetSubRecord)
+ @param rec REF struct
+
+
+ Returns the index of the SupBookRecord for this index
+
+
+ @return -1 if not found
+
+
+ Returns the first sheet that the reference applies to, or
+ -1 if the referenced sheet can't be found, or -2 if the
+ reference is workbook scoped.
+
+
+ Returns the last sheet that the reference applies to, or
+ -1 if the referenced sheet can't be found, or -2 if the
+ reference is workbook scoped.
+ For a single sheet reference, the first and last should be
+ the same.
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ return the non static version of the id for this record.
+
+
+ Title: A sub Record for Extern Sheet
+ Description: Defines a named range within a workbook.
+ REFERENCE:
+ @author Libin Roman (Vista Portal LDT. Developer)
+ @version 1.0-pre
+
+
+ a Constractor for making new sub record
+
+
+ Constructs a Extern Sheet Sub Record record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Sets the Index to the sup book
+ @param index sup book index
+
+
+ Gets the index to sup book
+ @return sup book index
+
+
+ Sets the index to first sheet in supbook
+ @param index index to first sheet
+
+
+ Gets the index to first sheet from supbook
+ @return index to first supbook
+
+
+ Sets the index to last sheet in supbook
+ @param index index to last sheet
+
+
+ Gets the index to last sheet in supbook
+ @return index to last supbook
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ returns the record size
+
+
+ return the non static version of the id for this record.
+
+
+ Extended SST table info subrecord
+ Contains the elements of "info" in the SST's array field
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.ExtSSTRecord
+
+
+ Creates new ExtSSTInfoSubRecord
+
+
+ Title: Extended Static String Table
+ Description: This record Is used for a quick Lookup into the SST record. This
+ record breaks the SST table into a Set of buckets. The offsets
+ to these buckets within the SST record are kept as well as the
+ position relative to the start of the SST record.
+ REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at apache dot org)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.ExtSSTInfoSubRecord
+
+
+ Constructs a EOFRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Returns the size of this record
+
+
+ Given a number of strings (in the sst), returns the size of the extsst record
+
+
+ Title: File Pass Record
+ Description: Indicates that the record after this record are encrypted. HSSF does not support encrypted excel workbooks
+ and the presence of this record will cause Processing to be aborted.
+ REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 3.0-pre
+
+
+ Title: FILESHARING
+ Description: stores the encrypted Readonly for a workbook (Write protect)
+ This functionality Is accessed from the options dialog box available when performing 'Save As'.
+ REFERENCE: PG 314 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+ Constructs a FileSharing record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the Readonly
+
+ @return short representing if this Is Read only (1 = true)
+
+
+ @returns password hashed with hashPassword() (very lame)
+
+
+ @returns username of the user that Created the file
+
+
+ Clone this record.
+
+
+ Title: Function Group Count Record
+ Description: Number of built in function Groups in the current version of the
+ SpReadsheet (probably only used on Windoze)
+ REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ suggested default (14 dec)
+
+
+ Constructs a FnGroupCount record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the number of built-in functions
+
+ @return number of built-in functions
+
+
+ Title: Font Record - descrbes a font in the workbook (index = 0-3,5-infinity - skip 4)
+ Description: An element in the Font Table
+ REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a Font record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Clones all the font style information from another
+ FontRecord, onto this one. This
+ will then hold all the same font style options.
+
+
+ Set the font to be italics or not
+
+ @param italics - whether the font Is italics or not
+ @see #SetAttributes(short)
+
+
+ Set the font to be stricken out or not
+
+ @param strike - whether the font Is stricken out or not
+ @see #SetAttributes(short)
+
+
+ whether to use the mac outline font style thing (mac only) - Some mac person
+ should comment this instead of me doing it (since I have no idea)
+
+ @param mac - whether to do that mac font outline thing or not
+ @see #SetAttributes(short)
+
+
+ whether to use the mac shado font style thing (mac only) - Some mac person
+ should comment this instead of me doing it (since I have no idea)
+
+ @param mac - whether to do that mac font shadow thing or not
+ @see #SetAttributes(short)
+
+
+ Set the type of Underlining for the font
+
+
+ Set the font family (TODO)
+
+ @param f family
+
+
+ Set the Char Set
+
+ @param charSet - CharSet
+
+
+ Set the name of the font
+
+ @param fn - name of the font (i.e. "Arial")
+
+
+ Gets the height of the font in 1/20th point Units
+
+ @return fontheight (in points/20)
+
+
+ Get the font attributes (see individual bit Getters that reference this method)
+
+ @return attribute - the bitmask
+
+
+ Get the font's color palette index
+
+ @return cpi - font color index
+
+
+ Get the bold weight for this font (100-1000dec or 0x64-0x3e8). Default Is
+ 0x190 for normal and 0x2bc for bold
+
+ @return bw - a number between 100-1000 for the fonts "boldness"
+
+
+ Get the type of base or subscript for the font
+
+ @return base or subscript option
+
+
+ Does this FontRecord have all the same font
+ properties as the supplied FontRecord?
+ Note that {@link #equals(Object)} will check
+ for exact objects, while this will check
+ for exact contents, because normally the
+ font record's position makes a big
+ difference too.
+
+
+ Only returns two for the same exact object -
+ creating a second FontRecord with the same
+ properties won't be considered equal, as
+ the record's position in the record stream
+ matters.
+
+
+ Title: Footer Record
+ Description: Specifies the footer for a sheet
+ REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+
+ Initializes a new instance of the class.
+
+ the RecordInputstream to Read the record from
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+
+ return the non static version of the id for this record.
+
+
+ Title: Format Record
+ Description: describes a number format -- those goofy strings like $(#,###)
+
+ REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Shawn M. Laubach (slaubach at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a Format record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the format index code (for built in formats)
+
+ @return the format index code
+ @see org.apache.poi.hssf.model.Workbook
+
+
+ Get the format string
+
+ @return the format string
+
+
+ Manages the cached formula result values of other types besides numeric.
+ Excel encodes the same 8 bytes that would be field_4_value with various NaN
+ values that are decoded/encoded by this class.
+
+
+ deliberately chosen by Excel in order to encode other values within Double NaNs
+
+
+ @return null if the double value encoded by valueLongBits
+ is a normal (non NaN) double value.
+
+
+ Formula Record.
+ REFERENCE: PG 317/444 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Since the NaN support seems sketchy (different constants) we'll store and spit it out directly
+
+
+ Creates new FormulaRecord
+
+
+ Constructs a Formula record and Sets its fields appropriately.
+ Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an
+ "explanation of this bug in the documentation) or an exception
+ will be throw upon validation
+
+ @param in the RecordInputstream to Read the record from
+
+
+ @return true if this {@link FormulaRecord} is followed by a
+ {@link StringRecord} representing the cached text result of the formula
+ evaluation.
+
+
+ Get the calculated value of the formula
+
+ @return calculated value
+
+
+ Get the option flags
+
+ @return bitmask
+
+
+ Get the stack as a list
+
+ @return list of tokens (casts stack to a list and returns it!)
+ this method can return null Is we are Unable to Create Ptgs from
+ existing excel file
+ callers should Check for null!
+
+
+ Title: GridSet Record.
+ Description: flag denoting whether the user specified that gridlines are used when
+ printing.
+ REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+ @version 2.0-pre
+
+
+ Constructs a GridSet record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether the gridlines are shown during printing.
+
+ @return gridSet - true if gridlines are NOT printed, false if they are.
+
+
+ Title: Guts Record
+ Description: Row/column gutter sizes
+ REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a Guts record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the size of the gutter that appears at the left of the rows
+
+ @return gutter size in screen Units
+
+
+ Get the size of the gutter that appears at the above the columns
+
+ @return gutter size in screen Units
+
+
+ Get the maximum outline level for the row gutter.
+
+ @return maximum outline level
+
+
+ Get the maximum outline level for the col gutter.
+
+ @return maximum outline level
+
+
+ Title: HCenter record
+ Description: whether to center between horizontal margins
+ REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an HCenter record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether or not to horizonatally center this sheet.
+ @return center - t/f
+
+
+ Common header/footer base class
+
+ @author Josh Micich
+
+
+ get the length of the footer string
+
+ @return length of the footer string
+
+
+ The HEADERFOOTER record stores information Added in Office Excel 2007 for headers/footers.
+
+ @author Yegor Kozlov
+
+
+ construct a HeaderFooterRecord record. No fields are interpreted and the record will
+ be Serialized in its original form more or less
+ @param in the RecordInputstream to read the record from
+
+
+ spit the record out AS IS. no interpretation or identification
+
+
+ If this header belongs to a specific sheet view , the sheet view?s GUID will be saved here.
+
+ If it is zero, it means the current sheet. Otherwise, this field MUST match the guid field
+ of the preceding {@link UserSViewBegin} record.
+
+ @return the sheet view's GUID
+
+
+ @return whether this record belongs to the current sheet
+
+
+ Title: Header Record
+ Description: Specifies a header for a sheet
+ REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an Header record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: Hide Object Record
+ Description: flag defines whether to hide placeholders and object
+ REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs an HideObj record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Set hide object options
+
+ @param hide options
+ @see #HIDE_ALL
+ @see #SHOW_PLACEHOLDERS
+ @see #SHOW_ALL
+
+
+ Get hide object options
+
+ @return hide options
+ @see #HIDE_ALL
+ @see #SHOW_PLACEHOLDERS
+ @see #SHOW_ALL
+
+
+ HorizontalPageBreak record that stores page breaks at rows
+
+ This class Is just used so that SID Compares work properly in the RecordFactory
+ @see PageBreakRecord
+ @author Danny Mui (dmui at apache dot org)
+
+
+
+
+
+ @param in the RecordInputstream to Read the record from
+
+
+ The HyperlinkRecord wraps an HLINK-record
+ from the Excel-97 format.
+ Supports only external links for now (eg http://)
+
+ @author Mark Hissink Muller mark@hissinkmuller.nl
+ @author Yegor Kozlov (yegor at apache dot org)
+
+
+ Link flags
+
+
+ Tail of a URL link
+
+
+ Tail of a file link
+
+
+ cell range of this hyperlink
+
+
+ 16-byte GUID
+
+
+ Some sort of options for file links.
+
+
+ Link options. Can include any of HLINK_* flags.
+
+
+ Test label
+
+
+ Moniker. Makes sense only for URL and file links
+
+
+ in 8:3 DOS format No Unicode string header,
+ always 8-bit characters, zero-terminated
+
+
+ Link
+
+
+ Text describing a place in document. In Excel UI, this is appended to the
+ address, (after a '#' delimiter).
+ This field is optional. If present, the {@link #HLINK_PLACE} must be set.
+
+
+ Remaining bytes
+
+
+ Create a new hyperlink
+
+
+ Read hyperlink from input stream
+
+ @param in the stream to Read from
+
+
+ Return the column of the first cell that Contains the hyperlink
+
+ @return the 0-based column of the first cell that Contains the hyperlink
+
+
+ Set the column of the last cell that Contains the hyperlink
+
+ @return the 0-based column of the last cell that Contains the hyperlink
+
+
+ Return the row of the first cell that Contains the hyperlink
+
+ @return the 0-based row of the first cell that Contains the hyperlink
+
+
+ Return the row of the last cell that Contains the hyperlink
+
+ @return the 0-based row of the last cell that Contains the hyperlink
+
+
+ Returns a 16-byte guid identifier. Seems to always equal {@link STD_MONIKER}
+
+ @return 16-byte guid identifier
+
+
+ Returns a 16-byte moniker.
+
+ @return 16-byte moniker
+
+
+ Return text label for this hyperlink
+
+ @return text to Display
+
+
+ Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+
+ @return the Address of this hyperlink
+
+
+ Link options. Must be a combination of HLINK_* constants.
+
+
+ Label options
+
+
+ Options for a file link
+
+
+
+ Initialize a new url link
+
+
+
+
+ Initialize a new file link
+
+
+
+
+ Initialize a new document link
+
+
+
+ Title: Index Record
+ Description: Occurs right after BOF, tells you where the DBCELL records are for a sheet
+ Important for locating cells
+ NOT USED IN THIS RELEASE
+ REFERENCE: PG 323 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an Index record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Returns the size of an INdexRecord when it needs to index the specified number of blocks
+
+
+
+ Title: Interface End Record
+ Description: Shows where the Interface Records end (MMS)
+ (has no fields)
+ REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs an InterfaceEnd record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+
+ for test TestInterfaceEndRecord.TestCreate()
+
+
+
+
+ Title: Interface Header Record
+ Description: Defines the beginning of Interface records (MMS)
+ REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ suggested (and probably correct) default
+
+
+ Constructs an Codepage record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: Iteration Record
+ Description: Tells whether to iterate over forumla calculations or not
+ (if a formula Is dependant upon another formula's result)
+ (odd feature for something that can only have 32 elements in
+ a formula!)
+ REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an Iteration record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether or not to iterate for calculations
+
+ @return whether iterative calculations are turned off or on
+
+
+ Label Record - Read only support for strings stored directly in the cell.. Don't
+ use this (except to Read), use LabelSST instead
+ REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+
+ @see org.apache.poi.hssf.record.LabelSSTRecord
+
+
+ Creates new LabelRecord
+
+
+ Constructs an Label record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the number of Chars this string Contains
+ @return number of Chars
+
+
+ Is this Uncompressed Unicode (16bit)? Or just 8-bit compressed?
+ @return IsUnicode - True for 16bit- false for 8bit
+
+
+ Get the value
+
+ @return the text string
+ @see #GetStringLength
+
+
+ THROWS A RUNTIME EXCEPTION.. USE LABELSSTRecords. YOU HAVE NO REASON to use LABELRecord!!
+
+
+ Title: Label SST Record
+ Description: Refers to a string in the shared string table and Is a column
+ value.
+ REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an LabelSST record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the index to the string in the SSTRecord
+
+ @return index of string in the SST Table
+ @see org.apache.poi.hssf.record.SSTRecord
+
+
+ Record for the left margin.
+ NOTE: This source was automatically generated.
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+ Constructs a LeftMargin record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the margin field for the LeftMargin record.
+
+
+ Not implemented yet. May commit it anyway just so people can see
+ where I'm heading.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ The margin interface Is a parent used to define left, right, top and bottom margins.
+ This allows much of the code to be generic when it comes to handling margins.
+ NOTE: This source wass automatically generated.
+
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+ Get the margin field for the Margin.
+
+
+ Title: Merged Cells Record
+
+ Description: Optional record defining a square area of cells to "merged" into
+ one cell.
+ REFERENCE: NONE (UNDOCUMENTED PRESENTLY)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ sometimes the regions array is shared with other MergedCellsRecords
+
+
+ Constructs a MergedCellsRecord and Sets its fields appropriately
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the number of merged areas. If this drops down to 0 you should just go
+ ahead and delete the record.
+ @return number of areas
+
+
+ @return MergedRegion at the given index representing the area that is Merged (r1,c1 - r2,c2)
+
+
+ Title: MMS Record
+ Description: defines how many Add menu and del menu options are stored
+ in the file. Should always be Set to 0 for HSSF workbooks
+ REFERENCE: PG 328 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a MMS record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Set number of Add menu options (Set to 0)
+ @param am number of Add menu options
+
+
+ Set number of del menu options (Set to 0)
+ @param dm number of del menu options
+
+
+ Title: Mulitple Blank cell record
+ Description: Represents a Set of columns in a row with no value but with styling.
+ In this release we have Read-only support for this record type.
+ The RecordFactory Converts this to a Set of BlankRecord objects.
+ REFERENCE: PG 329 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.BlankRecord
+
+
+ Creates new MulBlankRecord
+
+
+ Constructs a MulBlank record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the row number of the cells this represents
+
+ @return row number
+
+
+ starting column (first cell this holds in the row)
+ @return first column number
+
+
+ ending column (last cell this holds in the row)
+ @return first column number
+
+
+ Get the number of columns this Contains (last-first +1)
+ @return number of columns (last - first +1)
+
+
+ returns the xf index for column (coffset = column - field_2_first_col)
+ @param coffset the column (coffset = column - field_2_first_col)
+ @return the XF index for the column
+
+
+ Used to store multiple RK numbers on a row. 1 MulRk = Multiple Cell values.
+ HSSF just Converts this into multiple NUMBER records. Read-ONLY SUPPORT!
+ REFERENCE: PG 330 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Creates new MulRKRecord
+
+
+ Constructs a MulRK record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ starting column (first cell this holds in the row)
+ @return first column number
+
+
+ ending column (last cell this holds in the row)
+ @return first column number
+
+
+ Get the number of columns this Contains (last-first +1)
+ @return number of columns (last - first +1)
+
+
+ returns the xf index for column (coffset = column - field_2_first_col)
+ @return the XF index for the column
+
+
+ returns the rk number for column (coffset = column - field_2_first_col)
+ @return the value (decoded into a double)
+
+
+ Title: NAMECMT Record (0x0894)
+ Description: Defines a comment associated with a specified name.
+ REFERENCE:
+
+ @author Andrew Shirley (aks at corefiling.co.uk)
+
+
+ @param ris the RecordInputstream to read the record from
+
+
+ return the non static version of the id for this record.
+
+
+ @return the name of the NameRecord to which this comment applies.
+
+
+ @return the text of the comment.
+
+
+ Title: Name Record (aka Named Range)
+ Description: Defines a named range within a workbook.
+ REFERENCE:
+ @author Libin Roman (Vista Portal LDT. Developer)
+ @author Sergei Kozello (sergeikozello at mail.ru)
+ @author Glen Stampoultzis (glens at apache.org)
+ @version 1.0-pre
+
+
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ Included for completeness sake, not implemented
+
+
+ One-based extern index of sheet (resolved via LinkTable). Zero if this is a global name
+
+
+ the one based sheet number.
+
+
+ Creates new NameRecord
+
+
+ Constructs a Name record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Constructor to Create a built-in named region
+ @param builtin Built-in byte representation for the name record, use the public constants
+ @param index
+
+
+ @return function Group
+ @see FnGroupCountRecord
+
+
+ Gets the option flag
+ @return option flag
+
+
+ returns the keyboard shortcut
+ @return keyboard shortcut
+
+
+ **
+
+
+ Indicates that the defined name refers to a user-defined function.
+ This attribute is used when there is an add-in or other code project associated with the file.
+
+ @param function true indicates the name refers to a function.
+
+
+ @return true if name has a formula (named range or defined value)
+
+
+ @return true if name Is hidden
+
+
+ @return true if name Is a function
+
+
+ @return true if name Is a command
+
+
+ @return true if function macro or command macro
+
+
+ @return true if array formula or user defined
+
+
+ Convenience Function to determine if the name Is a built-in name
+
+
+ Gets the name
+ @return name
+
+
+ Gets the Built In Name
+ @return the built in Name
+
+
+ Gets the definition, reference (Formula)
+ @return definition -- can be null if we cant Parse ptgs
+
+
+ Get the custom menu text
+ @return custom menu text
+
+
+ Gets the description text
+ @return description text
+
+
+ Get the help topic text
+ @return gelp topic text
+
+
+ Gets the status bar text
+ @return status bar text
+
+
+ For named ranges, and built-in names
+ @return the 1-based sheet number.
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ Gets the extern sheet number
+ @return extern sheet index
+
+
+ return the non static version of the id for this record.
+
+
+ @see Object#ToString()
+
+
+ Creates a human Readable name for built in types
+ @return Unknown if the built-in name cannot be translated
+
+
+ NOTE: Comment Associated with a Cell (1Ch)
+
+ @author Yegor Kozlov
+
+
+ Flag indicating that the comment Is hidden (default)
+
+
+ Flag indicating that the comment Is visible
+
+
+ Saves padding byte value to reduce delta during round-trip serialization.
+
+ The documentation is not clear about how padding should work. In any case
+ Excel(2007) does something different.
+
+
+ Construct a new NoteRecord and
+ Fill its data with the default values
+
+
+ Constructs a NoteRecord and Fills its fields
+ from the supplied RecordInputStream.
+
+ @param in the stream to Read from
+
+
+ @return id of this record.
+
+
+ Serialize the record data into the supplied array of bytes
+
+ @param offset offset in the data
+ @param data the data to Serialize into
+
+ @return size of the record
+
+
+ Size of record
+
+
+ Convert this record to string.
+ Used by BiffViewer and other utulities.
+
+
+ Return the row that Contains the comment
+
+ @return the row that Contains the comment
+
+
+ Return the column that Contains the comment
+
+ @return the column that Contains the comment
+
+
+ Options flags.
+
+ @return the options flag
+ @see #NOTE_VISIBLE
+ @see #NOTE_HIDDEN
+
+
+ Object id for OBJ record that Contains the comment
+
+
+ Name of the original comment author
+
+ @return the name of the original author of the comment
+
+
+ For unit testing only!
+
+
+ Contains a numeric cell value.
+ REFERENCE: PG 334 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Creates new NumberRecord
+
+
+ Constructs a Number record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the value for the cell
+
+ @return double representing the value
+
+
+ Title: Object Protect Record
+ Description: Protect embedded object with the lamest "security" ever invented.
+ This record tells "I want to protect my objects" with lame security. It
+ appears in conjunction with the PASSWORD and PROTECT records as well as its
+ scenario protect cousin.
+ REFERENCE: PG 368 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+ Constructs a Protect record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether the sheet Is protected or not
+ @return whether to protect the sheet or not
+
+
+ The obj record is used to hold various graphic objects and controls.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ used when POI has no idea what is going on
+
+
+ Excel seems to tolerate padding to quad or double byte length
+
+
+ Constructs a OBJ record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Some XLS files have ObjRecords with nearly 8Kb of excessive padding. These were probably
+ written by a version of POI (around 3.1) which incorrectly interpreted the second short of
+ the ftLbs subrecord (0x1FEE) as a length, and read that many bytes as padding (other bugs
+ helped allow this to occur).
+
+ Excel reads files with this excessive padding OK, truncating the over-sized ObjRecord back
+ to the its proper size. POI does the same.
+
+
+ Size of record (excluding 4 byte header)
+
+
+ Record that Contains the functionality page _breaks (horizontal and vertical)
+
+ The other two classes just specifically Set the SIDS for record creation.
+
+ REFERENCE: Microsoft Excel SDK page 322 and 420
+
+ @see HorizontalPageBreakRecord
+ @see VerticalPageBreakRecord
+ @author Danny Mui (dmui at apache dot org)
+
+
+ Since both records store 2byte integers (short), no point in
+ differentiating it in the records.
+
+ The subs (rows or columns, don't seem to be able to Set but excel Sets
+ them automatically)
+
+
+ Adds the page break at the specified parameters
+ @param main Depending on sid, will determine row or column to put page break (zero-based)
+ @param subFrom No user-interface to Set (defaults to minumum, 0)
+ @param subTo No user-interface to Set
+
+
+ Removes the break indicated by the parameter
+ @param main (zero-based)
+
+
+ Retrieves the region at the row/column indicated
+ @param main FIXME: Document this!
+ @return The Break or null if no break exists at the row/col specified.
+
+
+ PaletteRecord - Supports custom palettes.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Brian Sanders (bsanders at risklabs dot com) - custom palette editing
+ @version 2.0-pre
+
+
+ The standard size of an XLS palette
+
+
+ The byte index of the first color
+
+
+ Constructs a PaletteRecord record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+
+ Dangerous! Only call this if you intend to replace the colors!
+
+
+
+ Returns the color value at a given index
+
+ @return the RGB triplet for the color, or null if the specified index
+ does not exist
+
+
+ Sets the color value at a given index
+
+ If the given index Is greater than the current last color index,
+ then black Is Inserted at every index required to make the palette continuous.
+
+ @param byteIndex the index to Set; if this index Is less than 0x8 or greater than
+ 0x40, then no modification Is made
+
+
+ Creates the default palette as PaletteRecord binary data
+
+ @see org.apache.poi.hssf.model.Workbook#createPalette
+
+
+ PColor - element in the list of colors - consider it a "struct"
+
+
+ * Describes the frozen and Unfozen panes.
+ * NOTE: This source Is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Pane record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the x field for the Pane record.
+
+
+ Get the y field for the Pane record.
+
+
+ Get the top row field for the Pane record.
+
+
+ Get the left column field for the Pane record.
+
+
+ Get the active pane field for the Pane record.
+
+ @return One of
+ ACTIVE_PANE_LOWER_RIGHT
+ ACTIVE_PANE_UPPER_RIGHT
+ ACTIVE_PANE_LOWER_LEFT
+ ACTIVE_PANE_UPPER_LEFT
+
+
+ Title: Password Record
+ Description: stores the encrypted password for a sheet or workbook (HSSF doesn't support encryption)
+ REFERENCE: PG 371 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a Password record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the password
+
+ @return short representing the password
+
+
+ Clone this record.
+
+
+ Title: Protection Revision 4 password Record
+ Description: Stores the (2 byte??!!) encrypted password for a shared
+ workbook
+ REFERENCE: PG 374 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a PasswordRev4 (PROT4REVPASS) record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ set the password
+
+ @param pw representing the password
+
+
+ SXDI - Data Item (0x00C5)
+
+ @author Patrick Cheng
+
+
+ SXVDEX - Extended PivotTable View Fields (0x0100)
+
+ @author Patrick Cheng
+
+
+ the value of the cchSubName field when the subName is not present
+
+
+ SXPI - Page Item (0x00B6)
+
+ @author Patrick Cheng
+
+
+ Index to the View Item SXVI(0x00B2) record
+
+
+ Index to the {@link ViewFieldsRecord} SXVD(0x00B1) record
+
+
+ Object ID for the drop-down arrow
+
+
+ SXIDSTM - Stream ID (0x00D5)
+
+ @author Patrick Cheng
+
+
+ SXVIEW - View Definition (0x00B0)
+
+ @author Patrick Cheng
+
+
+ SXVD - View Fields (0x00B1)
+
+ @author Patrick Cheng
+
+
+ values for the {@link ViewFieldsRecord#sxaxis} field
+
+
+ the value of the cchName field when the name is not present
+
+
+ 5 shorts
+
+
+ SXVS - View Source (0x00E3)
+
+ @author Patrick Cheng
+
+
+ Title: Precision Record
+ Description: defines whether to store with full precision or what's Displayed by the gui
+ (meaning have really screwed up and skewed figures or only think you do!)
+ REFERENCE: PG 372 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a Precision record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether to use full precision or just skew all you figures all to hell.
+
+ @return fullprecision - or not
+
+
+ Title: Print Gridlines Record
+ Description: whether to print the gridlines when you enjoy you spReadsheet on paper.
+ REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a PrintGridlines record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether or not to print the gridlines (and make your spReadsheet ugly)
+
+ @return make spReadsheet ugly - Y/N
+
+
+ Title: Print Headers Record
+ Description: Whether or not to print the row/column headers when you
+ enjoy your spReadsheet in the physical form.
+ REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a PrintHeaders record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+
+ Get whether to print the headers - y/n
+
+ true if [print headers]; otherwise, false.
+
+
+ Title: Print Setup Record
+ Description: Stores print Setup options -- bogus for HSSF (and marked as such)
+ REFERENCE: PG 385 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a PrintSetup (SetUP) record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: Protection Revision 4 Record
+ Description: describes whether this is a protected shared/tracked workbook
+ ( HSSF does not support encryption because we don't feel like going to jail )
+ REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a ProtectionRev4 record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether the this is protected shared/tracked workbook or not
+ @return whether to protect the workbook or not
+
+
+ Title: Protect Record
+ Description: defines whether a sheet or workbook is protected (HSSF DOES NOT SUPPORT ENCRYPTION)
+ (kindly ask the US government to stop having arcane stupid encryption laws and we'll support it)
+ (after all terrorists will all use US-legal encrypton right??)
+ HSSF now supports the simple "protected" sheets (where they are not encrypted and open office et al
+ ignore the password record entirely).
+ REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+ Constructs a Protect record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether the sheet is protected or not
+ @return whether to protect the sheet or not
+
+
+ Title: Recalc Id Record
+ Description: This record Contains an ID that marks when a worksheet was last
+ recalculated. It's an optimization Excel uses to determine if it
+ needs to recalculate the spReadsheet when it's opened. So far, only
+ the two values 0xC1 0x01 0x00 0x00 0x80 0x38 0x01 0x00
+ (do not recalculate) and 0xC1 0x01 0x00 0x00 0x60 0x69 0x01
+ 0x00 have been seen. If the field isNeeded Is
+ Set to false (default), then this record Is swallowed during the
+ serialization Process
+ REFERENCE: http://chicago.sourceforge.net/devel/docs/excel/biff8.html
+ @author Luc Girardin (luc dot girardin at macrofocus dot com)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.model.Workbook
+
+
+ An unsigned integer that specifies the recalculation engine identifier
+ of the recalculation engine that performed the last recalculation.
+ If the value is less than the recalculation engine identifier associated with the application,
+ the application will recalculate the results of all formulas on
+ this workbook immediately after loading the file
+
+
+ Constructs a RECALCID record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: Record
+ Description: All HSSF Records inherit from this class. It
+ populates the fields common to all records (id, size and data).
+ Subclasses should be sure to validate the id,
+ Company:
+ @author Andrew C. Oliver
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ instantiates a blank record strictly for ID matching
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ @return byte array containing instance data
+
+
+ return the non static version of the id for this record.
+
+
+ Common base class of {@link Record} and {@link RecordAggregate}
+
+ @author Josh Micich
+
+
+ called by the class that is responsible for writing this sucker.
+ Subclasses should implement this so that their data is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ gives the current serialized size of the record. Should include the sid
+ and reclength (4 bytes).
+
+
+ Title: Record Factory
+ Description: Takes a stream and outputs an array of Record objects.
+
+ @deprecated use {@link org.apache.poi.hssf.eventmodel.EventRecordFactory} instead
+ @see org.apache.poi.hssf.eventmodel.EventRecordFactory
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Csaba Nagy (ncsaba at yahoo dot com)
+
+
+ A "create" method is used instead of the usual constructor if the created record might
+ be of a different class to the declaring class.
+
+
+ cache of the recordsToMap();
+
+
+ Debug / diagnosis method
+ Gets the POI implementation class for a given sid. Only a subset of the any BIFF
+ records are actually interpreted by POI. A few others are known but not interpreted
+ (see {@link UnknownRecord#getBiffName(int)}).
+ @return the POI implementation class for the specified record sid.
+ null if the specified record is not interpreted by POI.
+
+
+ Changes the default capacity (10000) to handle larger files
+
+
+ Create an array of records from an input stream
+
+ @param in the InputStream from which the records will be
+ obtained
+
+ @return an array of Records Created from the InputStream
+
+ @exception RecordFormatException on error Processing the
+ InputStream
+
+
+ Converts a {@link MulBlankRecord} into an equivalent array of {@link BlankRecord}s
+
+
+
+ RK record is a slightly smaller alternative to NumberRecord
+ POI likes NumberRecord better
+
+ The rk.
+
+
+
+
+ Converts a MulRKRecord into an equivalent array of NumberRecords
+
+ The MRK.
+
+
+
+ A stream based way to get at complete records, with
+ as low a memory footprint as possible.
+ This handles Reading from a RecordInputStream, turning
+ the data into full records, processing continue records
+ etc.
+ Most users should use {@link HSSFEventFactory} /
+ {@link HSSFListener} and have new records pushed to
+ them, but this does allow for a "pull" style of coding.
+
+
+ Keeps track of the sizes of the Initial records up to and including {@link FilePassRecord}
+ Needed for protected files because each byte is encrypted with respect to its absolute
+ position from the start of the stream.
+
+
+ @return last record scanned while looking for encryption info.
+ This will typically be the first or second record Read. Possibly null
+ if stream was empty
+
+
+ false in some test cases
+
+
+ Temporarily stores a group of {@link Record}s, for future return by {@link #nextRecord()}.
+ This is used at the start of the workbook stream, and also when the most recently read
+ underlying record is a {@link MulRKRecord}
+
+
+ used to help iterating over the unread records
+
+
+ The most recent record that we gave to the user
+
+
+ The most recent DrawingRecord seen
+
+
+ @param shouldIncludeContinueRecords caller can pass false if loose
+ {@link ContinueRecord}s should be skipped (this is sometimes useful in event based
+ processing).
+
+
+ Returns the next (complete) record from the
+ stream, or null if there are no more.
+
+
+ @return the next {@link Record} from the multiple record group as expanded from
+ a recently read {@link MulRKRecord}. null if not present.
+
+
+ @return the next available record, or null if
+ this pass didn't return a record that's
+ suitable for returning (eg was a continue record).
+
+
+ Title: Record Input Stream
+ Description: Wraps a stream and provides helper methods for the construction of records.
+
+ @author Jason Height (jheight @ apache dot org)
+
+
+ Maximum size of a single record (minus the 4 byte header) without a continue
+
+
+ Header {@link LittleEndianInput} facet of the wrapped {@link InputStream}
+
+
+ Data {@link LittleEndianInput} facet of the wrapped {@link InputStream}
+
+
+ the record identifier of the BIFF record currently being read
+
+
+ This method will Read a byte from the current record
+
+
+
+ @return the sid of the next record or {@link #INVALID_SID_VALUE} if at end of stream
+
+
+ Moves to the next record in the stream.
+
+ Note: The auto continue flag is Reset to true
+
+
+ Reads an 8 bit, signed value
+
+
+ Reads a 16 bit, signed value
+
+
+ Reads an 8 bit, Unsigned value
+
+
+ Reads a 16 bit,un- signed value.
+ @return
+
+
+ given a byte array of 16-bit Unicode Chars, compress to 8-bit and
+ return a string
+
+ { 0x16, 0x00 } -0x16
+
+ @param Length the Length of the string
+ @return the Converted string
+ @exception ArgumentException if len is too large (i.e.,
+ there is not enough data in string to Create a String of that
+ Length)
+
+
+ Returns the remaining bytes for the current record.
+
+ @return The remaining bytes of the current record.
+
+
+ Reads all byte data for the current record, including any
+ that overlaps into any following continue records.
+
+ @deprecated Best to write a input stream that wraps this one where there Is
+ special sub record that may overlap continue records.
+
+
+ The remaining number of bytes in the current record.
+
+ @return The number of bytes remaining in the current record
+
+
+ Returns true iif a Continue record is next in the excel stream _currentDataOffset
+
+ @return True when a ContinueRecord is next.
+
+
+ @return sid of next record. Can be called after hasNextRecord()
+
+
+ Title: RefMode Record
+ Description: Describes which reference mode to use
+ REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a RefMode record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the reference mode to use (HSSF uses/assumes A1)
+ @return mode to use
+ @see #USE_A1_MODE
+ @see #USE_R1C1_MODE
+
+
+ Title: Refresh All Record
+ Description: Flag whether to refresh all external data when loading a sheet.
+ (which hssf doesn't support anyhow so who really cares?)
+ REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a RefreshAll record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether to refresh all external data when loading a sheet
+ @return refreshall or not
+
+
+ Record for the right margin. * NOTE: This source was automatically generated. * @author Shawn Laubach (slaubach at apache dot org)
+
+
+ Constructs a RightMargin record and Sets its fields appropriately. * * @param id id must be 0x27 or an exception * will be throw upon validation * @param size size the size of the data area of the record * @param data data of the record (should not contain sid/len)
+
+
+ Get the margin field for the RightMargin record.
+
+
+ Title: RK Record
+ Description: An internal 32 bit number with the two most significant bits
+ storing the type. This is part of a bizarre scheme to save disk
+ space and memory (gee look at all the other whole records that
+ are in the file just "cause"..,far better to waste Processor
+ cycles on this then leave on of those "valuable" records out).
+ We support this in Read-ONLY mode. HSSF Converts these to NUMBER records
+
+
+
+ REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+ @see org.apache.poi.hssf.record.NumberRecord
+
+
+ Constructs a RK record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the type of the number
+
+ @return one of these values:
+
+
RK_IEEE_NUMBER
+
RK_IEEE_NUMBER_TIMES_100
+
RK_INTEGER
+
RK_INTEGER_TIMES_100
+
+
+
+ Extract the value of the number
+
+ The mechanism for determining the value is dependent on the two
+ low order bits of the raw number. If bit 1 is Set, the number
+ is an integer and can be cast directly as a double, otherwise,
+ it's apparently the exponent and mantissa of a double (and the
+ remaining low-order bits of the double's mantissa are 0's).
+
+ If bit 0 is Set, the result of the conversion to a double Is
+ divided by 100; otherwise, the value is left alone.
+
+ [Insert picture of Screwy Squirrel in full Napoleonic regalia]
+
+ @return the value as a proper double (hey, it could
+ happen)
+
+
+ Title: Row Record
+ Description: stores the row information for the sheet.
+ REFERENCE: PG 379 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ The maximum row number that excel can handle (zero based) ie 65536 rows Is
+ max number of rows.
+
+
+ 16 bit options flags
+
+
+ Constructs a Row record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the logical row number for this row (0 based index)
+ @return row - the row number
+
+
+ Get the logical col number for the first cell this row (0 based index)
+ @return col - the col number
+
+
+ Get the logical col number for the last cell this row plus one (0 based index)
+ @return col - the last col number + 1
+
+
+ Get the height of the row
+ @return height of the row
+
+
+ Get whether to optimize or not (Set to 0)
+ @return optimize (Set to 0)
+
+
+ Gets the option bitmask. (use the individual bit Setters that refer to this
+ method)
+ @return options - the bitmask
+
+
+ Get the outline level of this row
+ @return ol - the outline level
+ @see #GetOptionFlags()
+
+
+ Get whether or not to colapse this row
+ @return c - colapse or not
+ @see #GetOptionFlags()
+
+
+ Get whether or not to Display this row with 0 height
+ @return - z height is zero or not.
+ @see #GetOptionFlags()
+
+
+ Get whether the font and row height are not compatible
+ @return - f -true if they aren't compatible (damn not logic)
+ @see #GetOptionFlags()
+
+
+ Get whether the row has been formatted (even if its got all blank cells)
+ @return formatted or not
+ @see #GetOptionFlags()
+
+
+ if the row is formatted then this is the index to the extended format record
+ @see org.apache.poi.hssf.record.ExtendedFormatRecord
+ @return index to the XF record or bogus value (undefined) if Isn't formatted
+
+
+ bit that specifies whether any cell in the row has a thick top border, or any
+ cell in the row directly above the current row has a thick bottom border.
+ @param f has thick top border
+
+
+ A bit that specifies whether any cell in the row has a medium or thick
+ bottom border, or any cell in the row directly below the current row has
+ a medium or thick top border.
+ @param f has thick bottom border
+
+
+ A bit that specifies whether the phonetic guide feature is enabled for
+ any cell in this row.
+ @param f use phoenetic guide
+
+
+ Title: Save Recalc Record
+ Description: defines whether to recalculate before saving (Set to true)
+ REFERENCE: PG 381 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs an SaveRecalc record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether to recalculate formulas/etc before saving or not
+ @return recalc - whether to recalculate or not
+
+
+ Title: Scenario Protect Record
+ Description: I have no idea what a Scenario is or why on would want to
+ protect it with the lamest "security" ever invented. However this record tells
+ excel "I want to protect my scenarios" (0xAF) with lame security. It appears
+ in conjunction with the PASSWORD and PROTECT records as well as its object
+ protect cousin.
+ REFERENCE: PG 383 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+ Constructs a Protect record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether the sheet is protected or not
+ @return whether to protect the sheet or not
+
+
+ * Specifies the window's zoom magnification. If this record Isn't present then the windows zoom is 100%. see p384 Excel Dev Kit
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Andrew C. Oliver (acoliver at apache.org)
+
+
+ Constructs a SCL record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the numerator field for the SCL record.
+
+
+ Get the denominator field for the SCL record.
+
+
+ Title: Selection Record
+ Description: shows the user's selection on the sheet
+ for Write Set num refs to 0
+
+ TODO : Fully implement reference subrecords.
+ REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+ Constructs a Selection record and Sets its fields appropriately.
+
+ the RecordInputstream to Read the record from
+
+
+
+ Gets or sets the pane this is for.
+
+ The pane.
+
+
+
+ Gets or sets the active cell row.
+
+ row number of active cell
+
+
+
+ Gets or sets the active cell's col
+
+ number of active cell
+
+
+
+ Gets or sets the active cell's reference number
+
+ ref number of active cell
+
+
+ Title: SharedFormulaRecord
+ Description: Primarily used as an excel optimization so that multiple similar formulas
+ are not written out too many times. We should recognize this record and
+ Serialize as Is since this Is used when Reading templates.
+
+ Note: the documentation says that the SID Is BC where biffviewer reports 4BC. The hex dump shows
+ that the two byte sid representation to be 'BC 04' that Is consistent with the other high byte
+ record types.
+ @author Danny Mui at apache dot org
+
+
+ @param in the RecordInputstream to Read the record from
+
+
+ print a sort of string representation ([SHARED FORMULA RECORD] id = x [/SHARED FORMULA RECORD])
+
+
+ @return the equivalent {@link Ptg} array that the formula would have, were it not shared.
+
+
+ Common base class for {@link SharedFormulaRecord}, {@link ArrayRecord} and
+ {@link TableRecord} which are have similarities.
+
+ @author Josh Micich
+
+
+ reads only the range (1 {@link CellRangeAddress8Bit}) from the stream
+
+
+ @return true if (rowIx, colIx) is within the range ({@link #Range})
+ of this shared value object.
+
+
+ @return true if (rowIx, colIx) describes the first cell in this shared value
+ object's range ({@link #Range})
+
+
+ Handles the task of deserializing a SST string. The two main entry points are
+
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Jason Height (jheight at apache.org)
+
+
+ This Is the starting point where strings are constructed. Note that
+ strings may span across multiple continuations. Read the SST record
+ carefully before beginning to hack.
+
+
+ Title: Static String Table Record
+
+ Description: This holds all the strings for LabelSSTRecords.
+
+ REFERENCE: PG 389 Microsoft Excel 97 Developer's Kit (ISBN:
+ 1-57231-498-2)
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+
+ @see org.apache.poi.hssf.record.LabelSSTRecord
+ @see org.apache.poi.hssf.record.ContinueRecord
+
+
+ how big can an SST record be? As big as any record can be: 8228 bytes
+
+
+ standard record overhead: two shorts (record id plus data space size)
+
+
+ SST overhead: the standard record overhead, plus the number of strings and the number of Unique strings -- two ints
+
+
+ how much data can we stuff into an SST record? That would be _max minus the standard SST record overhead
+
+
+ Union of strings in the SST and EXTSST
+
+
+ according to docs ONLY SST
+
+
+ Offsets from the beginning of the SST record (even across continuations)
+
+
+ Offsets relative the start of the current SST or continue record
+
+
+ default constructor
+
+
+ Constructs an SST record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Add a string.
+
+ @param string string to be Added
+
+ @return the index of that string in the table
+
+
+ @return number of strings
+
+
+ @return number of Unique strings
+
+
+ Get a particular string by its index
+
+ @param id index into the array of strings
+
+ @return the desired string
+
+
+ Return a debugging string representation
+
+ @return string representation
+
+
+ @return sid
+
+
+ @return hashcode
+
+
+ @return an iterator of the strings we hold. All instances are
+ UnicodeStrings
+
+
+ @return count of the strings we hold.
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ byte array.
+
+ @return size
+
+
+ Creates an extended string record based on the current contents of
+ the current SST record. The offset within the stream to the SST record
+ Is required because the extended string record points directly to the
+ strings in the SST record.
+
+ NOTE: THIS FUNCTION MUST ONLY BE CALLED AFTER THE SST RECORD HAS BEEN
+ SERIALIZED.
+
+ @param sstOffset The offset in the stream to the start of the
+ SST record.
+ @return The new SST record.
+
+
+ Calculates the size in bytes of the EXTSST record as it would be if the
+ record was Serialized.
+
+ @return The size of the ExtSST record in bytes.
+
+
+ This class handles serialization of SST records. It utilizes the record processor
+ class write individual records. This has been refactored from the SSTRecord class.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ OffSets from the beginning of the SST record (even across continuations)
+
+
+ OffSets relative the start of the current SST or continue record
+
+
+ Subclasses of this class (the majority of BIFF records) are non-continuable. This allows for
+ some simplification of serialization logic
+
+ @author Josh Micich
+
+
+
+ Write the data content of this BIFF record including the sid and record length.
+ The subclass must write the exact number of bytes as reported by Record#getRecordSize()
+
+ offset
+ data
+
+
+
+ Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields
+ have already been written by the superclass.
+
+ The number of bytes written must equal the record size reported by
+ {@link Record#getDataSize()} minus four
+ ( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written
+ by thye superclass).
+
+
+ Supports the STRING record structure.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a String record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ called by the class that Is responsible for writing this sucker.
+ Subclasses should implement this so that their data Is passed back in a
+ byte array.
+
+ @param offset to begin writing at
+ @param data byte array containing instance data
+ @return number of bytes written
+
+
+ return the non static version of the id for this record.
+
+
+ @return The string represented by this record.
+
+
+ Title: Style Record
+ Description: Describes a builtin to the gui or user defined style
+ REFERENCE: PG 390 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author aviks : string fixes for UserDefined Style
+ @version 2.0-pre
+
+
+ Constructs a Style record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ if this is a builtin style set the number of the built in style
+ @param builtinStyleId style number (0-7)
+
+
+
+ Get the actual index of the style extended format record
+ @see #Index
+ @return index of the xf record
+
+
+ Get the style's name
+ @return name of the style
+ @see #NameLength
+
+
+ Get the row or column level of the style (if builtin 1||2)
+
+
+ * The common object data record is used to store all common preferences for an excel object.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a CommonObjectData record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ Get the object type field for the CommonObjectData record.
+
+
+ Get the object id field for the CommonObjectData record.
+
+
+ Get the option field for the CommonObjectData record.
+
+
+ Get the reserved1 field for the CommonObjectData record.
+
+
+ Get the reserved2 field for the CommonObjectData record.
+
+
+ Get the reserved3 field for the CommonObjectData record.
+
+
+ true if object is locked when sheet has been protected
+ @return the locked field value.
+
+
+ object appears when printed
+ @return the printable field value.
+
+
+ whether object uses an automatic Fill style
+ @return the autoFill field value.
+
+
+ whether object uses an automatic line style
+ @return the autoline field value.
+
+
+ A sub-record within the OBJ record which stores a reference to an object
+ stored in a Separate entry within the OLE2 compound file.
+
+ @author Daniel Noll
+
+
+ either an area or a cell ref
+
+
+ Formulas often have a single non-zero trailing byte.
+ This is in a similar position to he pre-streamId padding
+ It is unknown if the value is important (it seems to mirror a value a few bytes earlier)
+
+
+
+ Constructs an EmbeddedObjectRef record and Sets its fields appropriately.
+
+ @param in the record input stream.
+
+
+ Gets the stream ID containing the actual data. The data itself
+ can be found under a top-level directory entry in the OLE2 filesystem
+ under the name "MBDxxxxxxxx" where xxxxxxxx is
+ this ID converted into hex (in big endian order, funnily enough.)
+
+ @return the data stream ID. Possibly null
+
+
+ * The end data record is used to denote the end of the subrecords.
+ * NOTE: This source is automatically generated please do not modify this file. Either subclass or
+ * Remove the record in src/records/definitions.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a End record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ * The Group marker record is used as a position holder for Groups.
+
+ * @author Glen Stampoultzis (glens at apache.org)
+
+
+ Constructs a Group marker record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Size of record (exluding 4 byte header)
+
+
+ From [MS-XLS].pdf 2.5.147 FtLbsData:
+
+ An unsigned integer that indirectly specifies whether
+ some of the data in this structure appear in a subsequent Continue record.
+ If _cbFContinued is 0x00, all of the fields in this structure except sid and _cbFContinued
+ MUST NOT exist. If this entire structure is Contained within the same record,
+ then _cbFContinued MUST be greater than or equal to the size, in bytes,
+ of this structure, not including the four bytes for the ft and _cbFContinued fields
+
+
+ a formula that specifies the range of cell values that are the items in this list.
+
+
+ An unsigned integer that specifies the number of items in the list.
+
+
+ An unsigned integer that specifies the one-based index of the first selected item in this list.
+ A value of 0x00 specifies there is no currently selected item.
+
+
+ flags that tell what data follows
+
+
+ An ObjId that specifies the edit box associated with this list.
+ A value of 0x00 specifies that there is no edit box associated with this list.
+
+
+ An optional LbsDropData that specifies properties for this dropdown control.
+ This field MUST exist if and only if the Containing Obj?s cmo.ot is equal to 0x14.
+
+
+ An optional array of strings where each string specifies an item in the list.
+ The number of elements in this array, if it exists, MUST be {@link #_cLines}
+
+
+ An optional array of bools that specifies
+ which items in the list are part of a multiple selection
+
+
+ @param in the stream to read data from
+ @param cbFContinued the seconf short in the record header
+ @param cmoOt the Containing Obj's {@link CommonObjectDataSubRecord#field_1_objectType}
+
+
+
+ @return the formula that specifies the range of cell values that are the items in this list.
+
+
+ @return the number of items in the list
+
+
+
+ @return a new instance of LbsDataSubRecord to construct auto-filters
+ @see org.apache.poi.hssf.model.ComboboxShape#createObjRecord(org.apache.poi.hssf.usermodel.HSSFSimpleShape, int)
+
+
+ This structure specifies properties of the dropdown list control
+
+
+ Combo dropdown control
+
+
+ Combo Edit dropdown control
+
+
+ Simple dropdown control (just the dropdown button)
+
+
+ An unsigned integer that specifies the style of this dropdown.
+
+
+ An unsigned integer that specifies the number of lines to be displayed in the dropdown.
+
+
+ An unsigned integer that specifies the smallest width in pixels allowed for the dropdown window
+
+
+ a string that specifies the current string value in the dropdown
+
+
+ Optional, undefined and MUST be ignored.
+ This field MUST exist if and only if the size of str in bytes is an odd number
+
+
+ Represents a NoteStructure (0xD) sub record.
+
+
+ The docs say nothing about it. The Length of this record is always 26 bytes.
+
+
+ @author Yegor Kozlov
+
+
+ Construct a new NoteStructureSubRecord and
+ Fill its data with the default values
+
+
+ Constructs a NoteStructureSubRecord and Sets its fields appropriately.
+
+
+
+ Convert this record to string.
+ Used by BiffViewer and other utulities.
+
+
+ Serialize the record data into the supplied array of bytes
+
+ @param offset offset in the data
+ @param data the data to Serialize into
+
+ @return size of the record
+
+
+ Size of record
+
+
+ @return id of this record.
+
+
+
+ FtSbs structure
+
+
+
+ Subrecords are part of the OBJ class.
+
+
+ Wether this record terminates the sub-record stream.
+ There are two cases when this method must be overridden and return true
+ - EndSubRecord (sid = 0x00)
+ - LbsDataSubRecord (sid = 0x12)
+
+ @return whether this record is the last in the sub-record stream
+
+
+ Title: Sup Book (EXTERNALBOOK)
+ Description: A External Workbook Description (Suplemental Book)
+ Its only a dummy record for making new ExternSheet Record
+ REFERENCE: 5.38
+ @author Libin Roman (Vista Portal LDT. Developer)
+ @author Andrew C. Oliver (acoliver@apache.org)
+
+
+
+ Constructs a Extern Sheet record and Sets its fields appropriately.
+
+ @param id id must be 0x16 or an exception will be throw upon validation
+ @param size the size of the data area of the record
+ @param data data of the record (should not contain sid/len)
+
+
+ Title: Sheet Tab Index Array Record
+ Description: Contains an array of sheet id's. Sheets always keep their ID
+ regardless of what their name Is.
+ REFERENCE: PG 412 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a TabID record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Set the tab array. (0,1,2).
+ @param array of tab id's {0,1,2}
+
+
+ Get the tab array. (0,1,2).
+ @return array of tab id's {0,1,2}
+
+
+ DATATABLE (0x0236)
+
+ TableRecord - The record specifies a data table.
+ This record Is preceded by a single Formula record that
+ defines the first cell in the data table, which should
+ only contain a single Ptg, {@link TblPtg}.
+
+ See p536 of the June 08 binary docs
+
+
+ TABLESTYLES (0x088E)
+
+ @author Patrick Cheng
+
+
+ expect tRef, tRef3D, tArea, tArea3D or tName
+
+
+ Not clear if needed . Excel seems to be OK if this byte is not present.
+ Value is often the same as the earlier firstColumn byte.
+
+
+ Get the text orientation field for the TextObjectBase record.
+
+ @return a TextOrientation
+
+
+ @return the Horizontal text alignment field value.
+
+
+ @return the Vertical text alignment field value.
+
+
+ Text has been locked
+ @return the text locked field value.
+
+
+ Record for the top margin.
+ NOTE: This source was automatically generated.
+
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+ Constructs a TopMargin record and Sets its fields appropriately.
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the margin field for the TopMargin record.
+
+
+ Title: Uncalced Record
+
+ If this record occurs in the Worksheet Substream, it indicates that the formulas have not
+ been recalculated before the document was saved.
+
+ @author Olivier Leprince
+
+
+ Default constructor
+
+
+ Read constructor
+
+
+ Title: Unknown Record (for debugging)
+ Description: Unknown record just tells you the sid so you can figure out
+ what records you are missing. Also helps us Read/modify sheets we
+ don't know all the records to. (HSSF leaves these alone!)
+ Company: SuperLink Software, Inc.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ @param id id of the record -not Validated, just stored for serialization
+ @param data the data
+
+
+ construct an Unknown record. No fields are interperated and the record will
+ be Serialized in its original form more or less
+ @param in the RecordInputstream to Read the record from
+
+
+ spit the record out AS IS. no interpretation or identification
+
+
+ print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD])
+
+
+ These BIFF record types are known but still uninterpreted by POI
+
+ @return the documented name of this BIFF record type, null if unknown to POI
+
+
+ @return true if the unknown record id has been observed in POI unit tests
+
+
+ Unlike the other Record.Clone methods this Is a shallow Clone
+
+
+ The UserSViewBegin record specifies Settings for a custom view associated with the sheet.
+ This record also marks the start of custom view records, which save custom view Settings.
+ Records between {@link UserSViewBegin} and {@link UserSViewEnd} contain Settings for the custom view,
+ not Settings for the sheet itself.
+
+ @author Yegor Kozlov
+
+
+ construct an UserSViewBegin record. No fields are interpreted and the record will
+ be Serialized in its original form more or less
+ @param in the RecordInputstream to read the record from
+
+
+ spit the record out AS IS. no interpretation or identification
+
+
+ @return Globally unique identifier for the custom view
+
+
+ The UserSViewEnd record marks the end of the Settings for a custom view associated with the sheet
+
+ @author Yegor Kozlov
+
+
+ construct an UserSViewEnd record. No fields are interpreted and the record will
+ be Serialized in its original form more or less
+ @param in the RecordInputstream to read the record from
+
+
+ spit the record out AS IS. no interpretation or identification
+
+
+ Title: Use Natural Language Formulas Flag
+ Description: Tells the GUI if this was written by something that can use
+ "natural language" formulas. HSSF can't.
+ REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a UseSelFS record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: VCenter record
+ Description: tells whether to center the sheet between vertical margins
+ REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a VCENTER record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get whether to center vertically or not
+ @return vcenter or not
+
+
+ VerticalPageBreak record that stores page breaks at columns
+
+ This class Is just used so that SID Compares work properly in the RecordFactory
+ @see PageBreakRecord
+ @author Danny Mui (dmui at apache dot org)
+
+
+
+
+
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: Window1 Record
+ Description: Stores the attributes of the workbook window. This Is basically
+ so the gui knows how big to make the window holding the spReadsheet
+ document.
+ REFERENCE: PG 421 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a WindowOne record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the horizontal position of the window (in 1/20ths of a point)
+ @return h - horizontal location
+
+
+ Get the vertical position of the window (in 1/20ths of a point)
+ @return v - vertical location
+
+
+ Get the width of the window
+ @return width
+
+
+ Get the height of the window
+ @return height
+
+
+ Get the options bitmask (see bit Setters)
+
+ @return o - the bitmask
+
+
+ Get whether the window Is hidden or not
+ @return Ishidden or not
+
+
+ Get whether the window has been iconized or not
+ @return iconize or not
+
+
+ Get whether to Display the horizontal scrollbar or not
+ @return Display or not
+
+
+ Get whether to Display the vertical scrollbar or not
+ @return Display or not
+
+
+ Get whether to Display the tabs or not
+ @return Display or not
+
+
+ @return the index of the currently Displayed sheet
+
+
+ deprecated May 2008
+ @deprecated - Misleading name - use GetActiveSheetIndex()
+
+
+ @return the first visible sheet in the worksheet tab-bar.
+ I.E. the scroll position of the tab-bar.
+
+
+ deprecated May 2008
+ @deprecated - Misleading name - use GetFirstVisibleTab()
+
+
+ Get the number of selected tabs
+ @return number of tabs
+
+
+ ratio of the width of the tabs to the horizontal scrollbar
+ @return ratio
+
+
+ Title: Window Protect Record
+ Description: flags whether workbook windows are protected
+ REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ Constructs a WindowProtect record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Is this window protected or not
+
+ @return protected or not
+
+
+ Title: Window Two Record
+ Description: sheet window Settings
+ REFERENCE: PG 422 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a WindowTwo record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the options bitmask or just use the bit Setters.
+ @return options
+
+
+ Get whether the window should Display formulas
+ @return formulas or not
+
+
+ Get whether the window should Display gridlines
+ @return gridlines or not
+
+
+ Get whether the window should Display row and column headings
+ @return headings or not
+
+
+ Get whether the window should freeze panes
+ @return freeze panes or not
+
+
+ Get whether the window should Display zero values
+ @return zeros or not
+
+
+ Get whether the window should Display a default header
+ @return header or not
+
+
+ Is this arabic?
+ @return arabic or not
+
+
+ Get whether the outline symbols are displaed
+ @return symbols or not
+
+
+ freeze Unsplit panes or not
+ @return freeze or not
+
+
+ sheet tab Is selected
+ @return selected or not
+
+
+ Is the sheet currently Displayed in the window
+ @return Displayed or not
+
+
+ deprecated May 2008
+ @deprecated use IsActive()
+
+
+ was the sheet saved in page break view
+ @return pagebreaksaved or not
+
+
+ Get the top row visible in the window
+ @return toprow
+
+
+ Get the leftmost column Displayed in the window
+ @return leftmost
+
+
+ Get the palette index for the header color
+ @return color
+
+
+ zoom magification in page break view
+ @return zoom
+
+
+ Get the zoom magnification in normal view
+ @return zoom
+
+
+ Get the reserved bits - why would you do this?
+ @return reserved stuff -probably garbage
+
+
+ Title: Write Access Record
+ Description: Stores the username of that who owns the spReadsheet generator
+ (on Unix the user's login, on Windoze its the name you typed when
+ you installed the thing)
+ REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @version 2.0-pre
+
+
+ this record is always padded to a constant length
+
+
+ Constructs a WriteAccess record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get the username for the user that Created the report. HSSF uses the logged in user. On
+ natively Created M$ Excel sheet this would be the name you typed in when you installed it
+ in most cases.
+ @return username of the user who Is logged in (probably "tomcat" or "apache")
+
+
+ Title: Write Protect Record
+ Description: Indicated that the sheet/workbook Is Write protected.
+ REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @version 3.0-pre
+
+
+ Constructs a WriteAccess record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Title: WSBool Record.
+ Description: stores workbook Settings (aka its a big "everything we didn't
+ put somewhere else")
+ REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (gstamp@iprimus.com.au)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 2.0-pre
+
+
+ Constructs a WSBool record and Sets its fields appropriately.
+ @param in the RecordInputstream to Read the record from
+
+
+ Get first byte (see bit Getters)
+
+
+
+ Whether to show automatic page breaks or not
+
+
+
+
+ Whether sheet is a dialog sheet or not
+
+
+
+
+ Get if row summaries appear below detail in the outline
+
+
+
+
+ Get if col summaries appear right of the detail in the outline
+
+
+
+
+ Get the second byte (see bit Getters)
+
+
+
+
+ fit to page option is on
+
+
+
+
+ Whether to display the guts or not
+
+
+
+
+ whether alternate expression evaluation is on
+
+
+
+
+ whether alternative formula entry is on
+
+
+
+ @author Evgeniy Berlog
+ date: 05.06.12
+
+
+ build shape tree from escher container
+ @param container root escher container from which escher records must be taken
+ @param agg - EscherAggregate
+ @param out - shape container to which shapes must be added
+ @param root - node to create HSSFObjectData shapes
+
+
+
+ @author Josh Micich
+
+
+ Creates a list constraint
+
+
+ Creates a number based data validation constraint. The text values entered for expr1 and expr2
+ can be either standard Excel formulas or formatted number values. If the expression starts
+ with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted number.
+
+ @param validationType one of {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#ANY},
+ {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#DECIMAL},
+ {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#INTEGER},
+ {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#TEXT_LENGTH}
+ @param comparisonOperator any constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum
+ @param expr1 date formula (when first char is '=') or formatted number value
+ @param expr2 date formula (when first char is '=') or formatted number value
+
+
+ Creates a time based data validation constraint. The text values entered for expr1 and expr2
+ can be either standard Excel formulas or formatted time values. If the expression starts
+ with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted time. To parse
+ formatted times, two formats are supported: "HH:MM" or "HH:MM:SS". This is contrary to
+ Excel which uses the default time format from the OS.
+
+ @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum
+ @param expr1 date formula (when first char is '=') or formatted time value
+ @param expr2 date formula (when first char is '=') or formatted time value
+
+
+ Creates a date based data validation constraint. The text values entered for expr1 and expr2
+ can be either standard Excel formulas or formatted date values. If the expression starts
+ with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted date (Excel uses
+ the same convention). To parse formatted dates, a date format needs to be specified. This
+ is contrary to Excel which uses the default short date format from the OS.
+
+ @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum
+ @param expr1 date formula (when first char is '=') or formatted date value
+ @param expr2 date formula (when first char is '=') or formatted date value
+ @param dateFormat ignored if both expr1 and expr2 are formulas. Default value is "YYYY/MM/DD"
+ otherwise any other valid argument for SimpleDateFormat can be used
+ @see SimpleDateFormat
+
+
+ Distinguishes formula expressions from simple value expressions. This logic is only
+ required by a few factory methods in this class that create data validation constraints
+ from more or less the same parameters that would have been entered in the Excel UI. The
+ data validation dialog box uses the convention that formulas begin with '='. Other methods
+ in this class follow the POI convention (formulas and values are distinct), so the '='
+ convention is not used there.
+
+ @param textExpr a formula or value expression
+ @return all text After '=' if textExpr begins with '='. Otherwise null if textExpr does not begin with '='
+
+
+ @return null if numberStr is null
+
+
+ @return null if timeStr is null
+
+
+ @param dateFormat pass null for default YYYYMMDD
+ @return null if timeStr is null
+
+
+ Convenience method
+ @return true if this constraint is a 'list' validation
+
+
+ Convenience method
+ @return true if this constraint is a 'list' validation with explicit values
+
+
+ @return the numeric value for expression 1. May be null
+
+
+ @return the numeric value for expression 2. May be null
+
+
+ @return both Parsed formulas (for expression 1 and 2).
+
+
+ @return The Parsed token array representing the formula or value specified.
+ Empty array if both formula and value are null
+
+
+ HSSFDataFormatter contains methods for formatting the value stored in an
+ HSSFCell. This can be useful for reports and GUI presentations when you
+ need to display data exactly as it appears in Excel. Supported formats
+ include currency, SSN, percentages, decimals, dates, phone numbers, zip
+ codes, etc.
+
+ Internally, formats will be implemented using subclasses of
+ such as and . Therefore the
+ formats used by this class must obey the same pattern rules as these Format
+ subclasses. This means that only legal number pattern characters ("0", "#",
+ ".", "," etc.) may appear in number formats. Other characters can be
+ inserted before or after the number pattern to form a
+ prefix or suffix.
+
+ For example the Excel pattern "$#,##0.00 "USD"_);($#,##0.00 "USD")"
+ will be correctly formatted as "$1,000.00 USD" or "($1,000.00 USD)".
+ However the pattern "00-00-00" is incorrectly formatted by
+ DecimalFormat as "000000--". For Excel formats that are not compatible with
+ DecimalFormat, you can provide your own custom {@link Format} implementation
+ via HSSFDataFormatter.AddFormat(String,Format). The following
+ custom formats are already provided by this class:
+
+
+
SSN "000-00-0000"
+
Phone Number "(###) ###-####"
+
Zip plus 4 "00000-0000"
+
+
+
+ If the Excel format pattern cannot be parsed successfully, then a default
+ format will be used. The default number format will mimic the Excel General
+ format: "#" for whole numbers and "#.##########" for decimal numbers. You
+ can override the default format pattern with
+ HSSFDataFormatter.DefaultNumberFormat=(Format). Note: the
+ default format will only be used when a Format cannot be created from the
+ cell's data format string.
+
+ @author James May (james dot may at fmr dot com)
+
+
+ Creates a formatter using the given locale.
+
+
+ Creates a formatter using the {@link Locale#getDefault() default locale}.
+
+
+ Utility class for creating data validation cells
+
+ @author Dragos Buleandra (dragos.buleandra@trade2b.ro)
+
+
+ Constructor which Initializes the cell range on which this object will be
+ applied
+ @param constraint
+
+
+ @author Radhakrishnan J
+
+
+
+ Contains methods for dealing with Excel dates.
+
+ @author Michael Harhen
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Dan Sherman (dsherman at isisph.com)
+ @author Hack Kampbjorn (hak at 2mba.dk)
+ @author Alex Jacoby (ajacoby at gmail.com)
+ @author Pavel Krupets (pkrupets at palmtreebusiness dot com)
+
+
+ Has methods for construction of a chart object.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Creates a bar chart. API needs some work. :)
+
+ NOTE: Does not yet work... checking it in just so others
+ can take a look.
+
+
+ Returns all the charts for the given sheet.
+
+ NOTE: You won't be able to do very much with
+ these charts yet, as this is very limited support
+
+
+ Get the X offset of the chart
+
+
+ Get the Y offset of the chart
+
+
+ Get the width of the chart. {@link ChartRecord}
+
+
+ Get the height of the chart. {@link ChartRecord}
+
+
+ Returns the series of the chart
+
+
+ Returns the chart's title, if there is one,
+ or null if not
+
+
+ Set value range (basic Axis Options)
+ @param axisIndex 0 - primary axis, 1 - secondary axis
+ @param minimum minimum value; Double.NaN - automatic; null - no change
+ @param maximum maximum value; Double.NaN - automatic; null - no change
+ @param majorUnit major unit value; Double.NaN - automatic; null - no change
+ @param minorUnit minor unit value; Double.NaN - automatic; null - no change
+
+
+ A series in a chart
+
+
+ See {@link SeriesRecord}
+
+
+ Returns the series' title, if there is one,
+ or null if not
+
+
+ @return record with data names
+
+
+ @return record with data values
+
+
+ @return record with data category labels
+
+
+ @return record with data secondary category labels
+
+
+ @return record with series
+
+
+
+ Contains raw Excel error codes (as defined in OOO's excelfileformat.pdf (2.5.6)
+ @author Michael Harhen
+
+
+
+ #NULL! - Intersection of two cell ranges is empty
+
+
+ #DIV/0! - Division by zero
+
+
+ #VALUE! - Wrong type of operand
+
+
+ #REF! - Illegal or deleted cell reference
+
+
+ #NAME? - Wrong function or range name
+
+
+ #NUM! - Value range overflow
+
+
+ #N/A - Argument or function not available
+
+
+
+ Gets standard Excel error literal for the specified error code.
+ @throws ArgumentException if the specified error code is not one of the 7
+ standard error codes
+
+ The error code.
+
+
+
+
+ Determines whether [is valid code] [the specified error code].
+
+ The error code.
+
+ true if the specified error code is a standard Excel error code.; otherwise, false.
+
+
+
+ Translates Graphics calls into escher calls. The translation Is lossy so
+ many features are not supported and some just aren't implemented yet. If
+ in doubt test the specific calls you wish to make. Graphics calls are
+ always performed into an EscherGroup so one will need to be Created.
+
+ Important:
+
+ One important concept worth considering Is that of font size. One of the
+ difficulties in Converting Graphics calls into escher Drawing calls Is that
+ Excel does not have the concept of absolute pixel positions. It measures
+ it's cell widths in 'Chars' and the cell heights in points.
+ Unfortunately it's not defined exactly what a type of Char it's
+ measuring. Presumably this Is due to the fact that the Excel will be
+ using different fonts on different platforms or even within the same
+ platform.
+
+ Because of this constraint we've had to calculate the
+ verticalPointsPerPixel. This the amount the font should be scaled by when
+ you Issue commands such as DrawString(). A good way to calculate this
+ Is to use the follow formula:
+
+
+
+ The height of the Group Is calculated fairly simply by calculating the
+ difference between the y coordinates of the bounding box of the shape. The
+ height of the Group can be calculated by using a convenience called
+ HSSFClientAnchor.GetAnchorHeightInPoints().
+
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Construct an escher graphics object.
+
+ @param escherGroup The escher Group to Write the graphics calls into.
+ @param workbook The workbook we are using.
+ @param forecolor The foreground color to use as default.
+ @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.).
+
+
+ Constructs an escher graphics object.
+
+ @param escherGroup The escher Group to Write the graphics calls into.
+ @param workbook The workbook we are using.
+ @param foreground The foreground color to use as default.
+ @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.).
+ @param font The font to use.
+
+
+ Fills a (closed) polygon, as defined by a pair of arrays, which
+ hold the x and y coordinates.
+
+ This Draws the polygon, with nPoint line segments.
+ The first nPoint - 1 line segments are
+ Drawn between sequential points
+ (xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]).
+ The line segment Is a closing one, from the last point to
+ the first (assuming they are different).
+
+ The area inside of the polygon Is defined by using an
+ even-odd Fill rule (also known as the alternating rule), and
+ the area inside of it Is Filled.
+ @param xPoints array of the x coordinates.
+ @param yPoints array of the y coordinates.
+ @param nPoints the total number of points in the polygon.
+ @see java.awt.Graphics#DrawPolygon(int[], int[], int)
+
+
+ Instances of this class keep track of multiple dependent cell evaluations due
+ to recursive calls to HSSFFormulaEvaluator.internalEvaluate().
+ The main purpose of this class Is to detect an attempt to evaluate a cell
+ that Is alReady being evaluated. In other words, it detects circular
+ references in spReadsheet formulas.
+
+ @author Josh Micich
+
+
+ Stores the parameters that identify the evaluation of one cell.
+
+
+ @return human Readable string for debug purposes
+
+
+ Notifies this evaluation tracker that evaluation of the specified cell Is
+ about to start.
+
+ In the case of a true return code, the caller should
+ continue evaluation of the specified cell, and also be sure to call
+ endEvaluate() when complete.
+
+ In the case of a false return code, the caller should
+ return an evaluation result of
+ ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate().
+
+ @return true if the specified cell has not been visited yet in the current
+ evaluation. false if the specified cell Is alReady being evaluated.
+
+
+ Notifies this evaluation tracker that the evaluation of the specified
+ cell Is complete.
+
+ Every successful call to startEvaluate must be followed by a
+ call to endEvaluate (recommended in a finally block) to enable
+ proper tracking of which cells are being evaluated at any point in time.
+
+ Assuming a well behaved client, parameters to this method would not be
+ required. However, they have been included to assert correct behaviour,
+ and form more meaningful error messages.
+
+
+ This class makes an EvaluationCycleDetector instance available to
+ each thRead via a ThReadLocal in order to avoid Adding a parameter
+ to a few protected methods within HSSFFormulaEvaluator.
+
+ @author Josh Micich
+
+
+ @return
+
+
+
+ Stores width and height details about a font.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Construct the font details with the given name and height.
+
+ The font name.
+ The height of the font.
+
+
+
+ Gets the name of the font.
+
+
+
+
+
+ Gets the height.
+
+
+
+
+
+ Adds the char.
+
+ The c.
+ The width.
+
+
+
+ Retrieves the width of the specified Char. If the metrics for
+ a particular Char are not available it defaults to returning the
+ width for the 'W' Char.
+
+ The character.
+
+
+
+
+ Adds the chars.
+
+ The chars.
+ The widths.
+
+
+
+ Builds the font height property.
+
+ Name of the font.
+
+
+
+
+ Builds the font widths property.
+
+ Name of the font.
+
+
+
+
+ Builds the font chars property.
+
+ Name of the font.
+
+
+
+
+ Create an instance of
+ FontDetails
+ by loading them from the
+ provided property object.
+
+ the font name.
+ the property object holding the details of this
+ particular font.
+ a new FontDetails instance.
+
+
+
+ Gets the width of all Chars in a string.
+
+ The string to measure.
+ The width of the string for a 10 point font.
+
+
+
+ Split the given string into an array of strings using the given
+ delimiter.
+
+ The text.
+ The separator.
+ The max.
+
+
+
+
+ Common class for HSSFHeader and HSSFFooter
+
+
+
+ @return the internal text representation (combining center, left and right parts).
+ Possibly empty string if no header or footer is set. Never null.
+
+
+
+ Creates the complete footer string based on the left, center, and middle
+ strings.
+
+ The parts.
+
+
+
+ Sets the header footer text.
+
+ the new header footer text (contains mark-up tags). Possibly
+ empty string never
+
+
+
+ Get the left side of the header or footer.
+
+ The string representing the left side.
+
+
+
+ Get the center of the header or footer.
+
+ The string representing the center.
+
+
+
+ Get the right side of the header or footer.
+
+ The string representing the right side..
+
+
+
+ Returns the string that represents the change in font size.
+
+ the new font size.
+ The special string to represent a new font size
+
+
+
+ Returns the string that represents the change in font.
+
+ the new font.
+ the fonts style, one of regular, italic, bold, italic bold or bold italic.
+ The special string to represent a new font size
+
+
+
+ Returns the string representing the current page number
+
+ The special string for page number.
+
+
+
+ Returns the string representing the number of pages.
+
+ The special string for the number of pages.
+
+
+
+ Returns the string representing the current date
+
+ The special string for the date
+
+
+
+ Gets the time.
+
+ The time.
+ Returns the string representing the current time
+ @return The special string for the time
+
+
+
+ Returns the string representing the current file name
+
+ The special string for the file name.
+
+
+
+ Returns the string representing the current tab (sheet) name
+
+ The special string for tab name.
+
+
+
+ Returns the string representing the start bold
+
+ The special string for start bold
+
+
+
+ Returns the string representing the end bold
+
+ The special string for end bold.
+
+
+
+ Returns the string representing the start underline
+
+ The special string for start underline.
+
+
+
+ Returns the string representing the end underline
+
+ The special string for end underline.
+
+
+
+ Returns the string representing the start double underline
+
+ The special string for start double underline.
+
+
+
+ Returns the string representing the end double underline
+
+ The special string for end double underline.
+
+
+
+ Removes any fields (eg macros, page markers etc)
+ from the string.
+ Normally used to make some text suitable for showing
+ to humans, and the resultant text should not normally
+ be saved back into the document!
+
+ The text.
+
+
+
+
+ Are fields currently being Stripped from
+ the text that this {@link HeaderStories} returns?
+ Default is false, but can be changed
+
+ true if [are fields stripped]; otherwise, false.
+
+
+
+ Represents a special field in a header or footer,
+ eg the page number
+
+
+
+ The character sequence that marks this field
+
+
+
+ A special field that normally comes in a pair, eg
+ turn on underline / turn off underline
+
+
+
+
+ Instance to this class.
+
+
+
+
+ Explicit static constructor to tell C# compiler not to mark type as beforefieldinit.
+
+
+
+
+ Initialize AllFields.
+
+
+
+
+ Accessing the initialized instance.
+
+
+
+
+ An anchor Is what specifics the position of a shape within a client object
+ or within another containing shape.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The DX1.
+ The dy1.
+ The DX2.
+ The dy2.
+
+
+
+ Gets or sets the DX1.
+
+ The DX1.
+
+
+
+ Gets or sets the dy1.
+
+ The dy1.
+
+
+
+ Gets or sets the dy2.
+
+ The dy2.
+
+
+
+ Gets or sets the DX2.
+
+ The DX2.
+
+
+
+ Gets a value indicating whether this instance is horizontally flipped.
+
+
+ true if this instance is horizontally flipped; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is vertically flipped.
+
+
+ true if this instance is vertically flipped; otherwise, false.
+
+
+
+ High level representation for Border Formatting component
+ of Conditional Formatting Settings
+
+ @author Dmitriy Kumshayev
+
+
+
+
+ High level representation of a cell in a row of a spReadsheet.
+ Cells can be numeric, formula-based or string-based (text). The cell type
+ specifies this. String cells cannot conatin numbers and numeric cells cannot
+ contain strings (at least according to our model). Client apps should do the
+ conversions themselves. Formula cells have the formula string, as well as
+ the formula result, which can be numeric or string.
+ Cells should have their number (0 based) before being Added to a row. Only
+ cells that have values should be Added.
+
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Dan Sherman (dsherman at Isisph.com)
+ @author Brian Sanders (kestrel at burdell dot org) Active Cell support
+ @author Yegor Kozlov cell comments support
+
+
+
+
+ Creates new Cell - Should only be called by HSSFRow. This Creates a cell
+ from scratch.
+ When the cell is initially Created it is Set to CellType.Blank. Cell types
+ can be Changed/overwritten by calling SetCellValue with the appropriate
+ type as a parameter although conversions from one type to another may be
+ prohibited.
+
+ Workbook record of the workbook containing this cell
+ Sheet record of the sheet containing this cell
+ the row of this cell
+ the column for this cell
+
+
+
+ Creates new Cell - Should only be called by HSSFRow. This Creates a cell
+ from scratch.
+
+ Workbook record of the workbook containing this cell
+ Sheet record of the sheet containing this cell
+ the row of this cell
+ the column for this cell
+ CellType.Numeric, CellType.String, CellType.Formula, CellType.Blank,
+ CellType.Boolean, CellType.Error
+
+
+
+ Creates an Cell from a CellValueRecordInterface. HSSFSheet uses this when
+ reading in cells from an existing sheet.
+
+ Workbook record of the workbook containing this cell
+ Sheet record of the sheet containing this cell
+ the Cell Value Record we wish to represent
+
+
+ private constructor to prevent blank construction
+
+
+ used internally -- given a cell value record, figure out its type
+
+
+
+ the Workbook that this Cell is bound to
+
+
+
+
+ the HSSFRow this cell belongs to
+
+
+
+
+ Set the cells type (numeric, formula or string)
+
+ Type of the cell.
+
+
+
+ Sets the cell type. The SetValue flag indicates whether to bother about
+ trying to preserve the current value in the new record if one is Created.
+ The SetCellValue method will call this method with false in SetValue
+ since it will overWrite the cell value later
+
+ Type of the cell.
+ if set to true [set value].
+ The row.
+ The col.
+ Index of the style.
+
+
+
+ Get the cells type (numeric, formula or string)
+
+ The type of the cell.
+
+
+
+ Set a numeric value for the cell
+
+ the numeric value to Set this cell to. For formulas we'll Set the
+ precalculated value, for numerics we'll Set its value. For other types we
+ will Change the cell to a numeric cell and Set its value.
+
+
+
+ Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as
+ a date.
+
+ the date value to Set this cell to. For formulas we'll Set the
+ precalculated value, for numerics we'll Set its value. For other types we
+ will Change the cell to a numeric cell and Set its value.
+
+
+
+ Set a string value for the cell. Please note that if you are using
+ full 16 bit Unicode you should call SetEncoding() first.
+
+ value to Set the cell to. For formulas we'll Set the formula
+ string, for String cells we'll Set its value. For other types we will
+ Change the cell to a string cell and Set its value.
+ If value is null then we will Change the cell to a Blank cell.
+
+
+ set a error value for the cell
+
+ @param errorCode the error value to set this cell to. For formulas we'll set the
+ precalculated value , for errors we'll set
+ its value. For other types we will change the cell to an error
+ cell and set its value.
+
+
+
+ Set a string value for the cell. Please note that if you are using
+ full 16 bit Unicode you should call SetEncoding() first.
+
+ value to Set the cell to. For formulas we'll Set the formula
+ string, for String cells we'll Set its value. For other types we will
+ Change the cell to a string cell and Set its value.
+ If value is null then we will Change the cell to a Blank cell.
+
+
+ Should be called any time that a formula could potentially be deleted.
+ Does nothing if this cell currently does not hold a formula
+
+
+
+ Gets or sets the cell formula.
+
+ The cell formula.
+
+
+
+ Get the value of the cell as a number. For strings we throw an exception.
+ For blank cells we return a 0.
+
+ The numeric cell value.
+
+
+
+ Used to help format error messages
+
+ The cell type code.
+
+
+
+
+ Types the mismatch.
+
+ The expected type code.
+ The actual type code.
+ if set to true [is formula cell].
+
+
+
+
+ Checks the type of the formula cached value.
+
+ The expected type code.
+ The fr.
+
+
+
+ Get the value of the cell as a date. For strings we throw an exception.
+ For blank cells we return a null.
+
+ The date cell value.
+
+
+
+ Get the value of the cell as a string - for numeric cells we throw an exception.
+ For blank cells we return an empty string.
+ For formulaCells that are not string Formulas, we return empty String
+
+ The string cell value.
+
+
+
+ Get the value of the cell as a string - for numeric cells we throw an exception.
+ For blank cells we return an empty string.
+ For formulaCells that are not string Formulas, we return empty String
+
+ The rich string cell value.
+
+
+
+ Set a bool value for the cell
+
+ the bool value to Set this cell to. For formulas we'll Set the
+ precalculated value, for bools we'll Set its value. For other types we
+ will Change the cell to a bool cell and Set its value.
+
+
+
+ Chooses a new bool value for the cell when its type is changing.
+ Usually the caller is calling SetCellType() with the intention of calling
+ SetCellValue(bool) straight afterwards. This method only exists to give
+ the cell a somewhat reasonable value until the SetCellValue() call (if at all).
+ TODO - perhaps a method like SetCellTypeAndValue(int, Object) should be introduced to avoid this
+
+
+
+
+
+ Get the value of the cell as a bool. For strings, numbers, and errors, we throw an exception.
+ For blank cells we return a false.
+
+ true if [boolean cell value]; otherwise, false.
+
+
+
+ Get the value of the cell as an error code. For strings, numbers, and bools, we throw an exception.
+ For blank cells we return a 0.
+
+ The error cell value.
+
+
+
+ Get the style for the cell. This is a reference to a cell style contained in the workbook
+ object.
+
+ The cell style.
+
+
+ Applying a user-defined style (UDS) is special. Excel does not directly reference user-defined styles, but
+ instead create a 'proxy' ExtendedFormatRecord referencing the UDS as parent.
+
+ The proceudre to apply a UDS is as follows:
+
+ 1. search for a ExtendedFormatRecord with parentIndex == style.getIndex()
+ and xfType == ExtendedFormatRecord.XF_CELL.
+ 2. if not found then create a new ExtendedFormatRecord and copy all attributes from the user-defined style
+ and set the parentIndex to be style.getIndex()
+ 3. return the index of the ExtendedFormatRecord, this will be assigned to the parent cell record
+
+ @param style the user style to apply
+
+ @return the index of a ExtendedFormatRecord record that will be referenced by the cell
+
+
+
+ Should only be used by HSSFSheet and friends. Returns the low level CellValueRecordInterface record
+
+ the cell via the low level api.
+
+
+
+ Checks the bounds.
+
+ The cell num.
+ if the bounds are exceeded.
+
+
+
+ Sets this cell as the active cell for the worksheet
+
+
+
+
+ Returns a string representation of the cell
+ This method returns a simple representation,
+ anthing more complex should be in user code, with
+ knowledge of the semantics of the sheet being Processed.
+ Formula cells return the formula string,
+ rather than the formula result.
+ Dates are Displayed in dd-MMM-yyyy format
+ Errors are Displayed as #ERR<errIdx>
+
+
+
+
+ Returns comment associated with this cell
+
+ The cell comment associated with this cell.
+
+
+
+ Removes the comment for this cell, if
+ there is one.
+
+ WARNING - some versions of excel will loose
+ all comments after performing this action!
+
+
+
+ Gets the index of the column.
+
+ The index of the column.
+
+
+ Updates the cell record's idea of what
+ column it belongs in (0 based)
+ @param num the new cell number
+
+
+
+ Gets the (zero based) index of the row containing this cell
+
+ The index of the row.
+
+
+
+ Get or set hyperlink associated with this cell
+ If the supplied hyperlink is null on setting, the hyperlink for this cell will be removed.
+
+ The hyperlink associated with this cell or null if not found
+
+
+
+ Removes the hyperlink for this cell, if there is one.
+
+
+
+
+ Only valid for formula cells
+
+ one of (CellType.Numeric,CellType.String, CellType.Boolean, CellType.Error) depending
+ on the cached value of the formula
+
+
+
+ The purpose of this method is to validate the cell state prior to modification
+
+
+
+
+
+ Called when this cell is modified.
+ The purpose of this method is to validate the cell state prior to modification.
+
+
+
+
+ High level representation of the style of a cell in a sheet of a workbook.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The index.
+ The record.
+ The workbook.
+
+
+
+ Initializes a new instance of the class.
+
+ The index.
+ The record.
+ The workbook.
+
+
+
+ Get the index within the HSSFWorkbook (sequence within the collection of ExtnededFormat objects)
+
+ Unique index number of the Underlying record this style represents (probably you don't care
+ Unless you're comparing which one is which)
+
+
+
+ Gets the parent style.
+
+ the parent style for this cell style.
+ In most cases this will be null, but in a few
+ cases there'll be a fully defined parent.
+
+
+
+ Get the index of the format
+
+ The data format.
+
+
+
+ Get the contents of the format string, by looking up
+ the DataFormat against the bound workbook
+
+
+
+
+
+ Get the contents of the format string, by looking up the DataFormat against the supplied workbook
+
+ The workbook
+ the format string or "General" if not found
+
+
+
+ Get the contents of the format string, by looking up
+ the DataFormat against the supplied workbook
+
+ The internal workbook.
+
+
+
+
+ Set the font for this style
+
+ a font object Created or retreived from the HSSFWorkbook object
+
+
+
+ Gets the index of the font for this style.
+
+ The index of the font.
+
+
+
+ Gets the font for this style
+
+ The parent workbook that this style belongs to.
+
+
+
+
+ Get whether the cell's using this style are to be hidden
+
+ whether the cell using this style should be hidden
+
+
+
+ Get whether the cell's using this style are to be locked
+
+ whether the cell using this style should be locked
+
+
+
+ Get the type of horizontal alignment for the cell
+
+ the type of alignment
+
+
+
+ Gets or sets a value indicating whether the text should be wrapped
+
+ true if [wrap text]; otherwise, false.
+
+
+
+ Gets or sets the vertical alignment for the cell.
+
+ the type of alignment
+
+
+
+ Gets or sets the degree of rotation for the text in the cell
+
+ The rotation degrees (between -90 and 90 degrees).
+
+
+
+ Verifies that this style belongs to the supplied Workbook.
+ Will throw an exception if it belongs to a different one.
+ This is normally called when trying to assign a style to a
+ cell, to ensure the cell and the style are from the same
+ workbook (if they're not, it won't work)
+
+ The workbook.
+
+
+
+ Gets or sets the number of spaces to indent the text in the cell
+
+ number of spaces
+
+
+
+ Gets or sets the type of border to use for the left border of the cell
+
+ The border type.
+
+
+
+ Gets or sets the type of border to use for the right border of the cell
+
+ The border type.
+
+
+
+ Gets or sets the type of border to use for the top border of the cell
+
+ The border type.
+
+
+
+ Gets or sets the type of border to use for the bottom border of the cell
+
+ The border type.
+
+
+
+ Gets or sets the color to use for the left border
+
+ The index of the color definition
+
+
+
+ Gets or sets the color to use for the left border.
+
+ The index of the color definition
+
+
+
+ Gets or sets the color to use for the top border
+
+ The index of the color definition.
+
+
+
+ Gets or sets the color to use for the left border
+
+ The index of the color definition.
+
+
+
+ Gets or sets the color to use for the diagional border
+
+ The index of the color definition.
+
+
+
+ Gets or sets the line type to use for the diagional border
+
+ The line type.
+
+
+
+ Gets or sets the type of diagional border
+ .
+ The border diagional type.
+
+
+
+ Gets or sets whether the cell is shrink-to-fit
+
+
+
+ Get or set the reading order, for RTL/LTR ordering of
+ the text.
+
0 means Context (Default), 1 means Left To Right,
+ and 2 means Right to Left
+
+ @return order - the reading order (0,1,2)
+
+
+
+ Gets or sets the fill pattern. - Set to 1 to Fill with foreground color
+
+ The fill pattern.
+
+
+
+ Checks if the background and foreground Fills are Set correctly when one
+ or the other is Set to the default color.
+ Works like the logic table below:
+ BACKGROUND FOREGROUND
+ NONE AUTOMATIC
+ 0x41 0x40
+ NONE RED/ANYTHING
+ 0x40 0xSOMETHING
+
+
+
+ Clones all the style information from another
+ HSSFCellStyle, onto this one. This
+ HSSFCellStyle will then have all the same
+ properties as the source, but the two may
+ be edited independently.
+ Any stylings on this HSSFCellStyle will be lost!
+
+ The source HSSFCellStyle could be from another
+ HSSFWorkbook if you like. This allows you to
+ copy styles from one HSSFWorkbook to another.
+
+
+
+ Clones all the style information from another
+ HSSFCellStyle, onto this one. This
+ HSSFCellStyle will then have all the same
+ properties as the source, but the two may
+ be edited independently.
+ Any stylings on this HSSFCellStyle will be lost!
+ The source HSSFCellStyle could be from another
+ HSSFWorkbook if you like. This allows you to
+ copy styles from one HSSFWorkbook to another.
+
+ The source.
+
+
+
+ Gets or sets the color of the fill background.
+
+ The color of the fill background.
+ Set the background Fill color.
+
+ cs.SetFillPattern(HSSFCellStyle.FINE_DOTS );
+ cs.SetFillBackgroundColor(new HSSFColor.RED().Index);
+ optionally a Foreground and background Fill can be applied:
+ Note: Ensure Foreground color is Set prior to background
+ cs.SetFillPattern(HSSFCellStyle.FINE_DOTS );
+ cs.SetFillForegroundColor(new HSSFColor.BLUE().Index);
+ cs.SetFillBackgroundColor(new HSSFColor.RED().Index);
+ or, for the special case of SOLID_Fill:
+ cs.SetFillPattern(HSSFCellStyle.SOLID_FOREGROUND );
+ cs.SetFillForegroundColor(new HSSFColor.RED().Index);
+ It is necessary to Set the Fill style in order
+ for the color to be shown in the cell.
+
+
+
+
+ Gets or sets the foreground Fill color
+
+ Fill color.
+ @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short)
+
+
+ Gets the name of the user defined style.
+ Returns null for built in styles, and
+ styles where no name has been defined
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+ The parameter is null.
+
+
+
+ create anchor from existing file
+ @param escherChildAnchorRecord
+
+
+ create anchor from scratch
+ @param dx1 x coordinate of the left up corner
+ @param dy1 y coordinate of the left up corner
+ @param dx2 x coordinate of the right down corner
+ @param dy2 y coordinate of the right down corner
+
+
+ @param dx1 x coordinate of the left up corner
+ @param dy1 y coordinate of the left up corner
+ @param dx2 x coordinate of the right down corner
+ @param dy2 y coordinate of the right down corner
+
+
+
+ A client anchor Is attached to an excel worksheet. It anchors against a
+ top-left and buttom-right cell.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Creates a new client anchor and defaults all the anchor positions to 0.
+
+
+
+
+ Creates a new client anchor and Sets the top-left and bottom-right
+ coordinates of the anchor.
+
+ Note: Microsoft Excel seems to sometimes disallow
+ higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ reverse them and draw shapes vertically or horizontally flipped!
+
+ the x coordinate within the first cell.
+ the y coordinate within the first cell.
+ the x coordinate within the second cell.
+ the y coordinate within the second cell.
+ the column (0 based) of the first cell.
+ the row (0 based) of the first cell.
+ the column (0 based) of the second cell.
+ the row (0 based) of the second cell.
+
+
+
+ Calculates the height of a client anchor in points.
+
+ the sheet the anchor will be attached to
+ the shape height.
+
+
+
+ Gets the row height in points.
+
+ The sheet.
+ The row num.
+
+
+
+
+ Gets or sets the col1.
+
+ The col1.
+
+
+
+ Gets or sets the col2.
+
+ The col2.
+
+
+
+ Gets or sets the row1.
+
+ The row1.
+
+
+
+ Gets or sets the row2.
+
+ The row2.
+
+
+
+ Sets the top-left and bottom-right
+ coordinates of the anchor
+
+ Note: Microsoft Excel seems to sometimes disallow
+ higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ reverse them and draw shapes vertically or horizontally flipped!
+
+ the column (0 based) of the first cell.
+ the row (0 based) of the first cell.
+ the x coordinate within the first cell.
+ the y coordinate within the first cell.
+ the column (0 based) of the second cell.
+ the row (0 based) of the second cell.
+ the x coordinate within the second cell.
+ the y coordinate within the second cell.
+
+
+
+ Gets a value indicating whether this instance is horizontally flipped.
+
+
+ true if the anchor goes from right to left; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is vertically flipped.
+
+
+ true if the anchor goes from bottom to top.; otherwise, false.
+
+
+
+
+ Gets the anchor type
+ 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
+
+ The type of the anchor.
+
+
+
+ Checks the range.
+
+ The value.
+ The min range.
+ The max range.
+ Name of the variable.
+
+
+
+ Represents a cell comment - a sticky note associated with a cell.
+ @author Yegor Kozlov
+
+
+
+
+ Construct a new comment with the given parent and anchor.
+
+
+ defines position of this anchor in the sheet
+
+
+
+ Initializes a new instance of the class.
+
+ The note.
+ The txo.
+
+
+
+ Gets or sets a value indicating whether this is visible.
+
+ true if visible; otherwise, false.
+ Sets whether this comment Is visible.
+ @return
+ true
+ if the comment Is visible,
+ false
+ otherwise
+
+
+
+ Gets or sets the row of the cell that Contains the comment
+
+ the 0-based row of the cell that Contains the comment
+
+
+
+ Gets or sets the column of the cell that Contains the comment
+
+ the 0-based column of the cell that Contains the comment
+
+
+
+ Gets or sets the name of the original comment author
+
+ the name of the original author of the comment
+
+
+
+ Gets the note record.
+
+ the underlying Note record.
+
+
+ Do we know which cell this comment belongs to?
+
+
+
+ HSSFConditionalFormatting class encapsulates all Settings of Conditional Formatting.
+ The class can be used to make a copy HSSFConditionalFormatting Settings
+
+
+ HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index);
+ newSheet.AddConditionalFormatting(cf);
+ or to modify existing Conditional Formatting Settings (formatting regions and/or rules).
+ Use {@link HSSFSheet#GetConditionalFormattingAt(int)} to Get access to an instance of this class.
+ To Create a new Conditional Formatting Set use the following approach:
+
+ // Define a Conditional Formatting rule, which triggers formatting
+ // when cell's value Is greater or equal than 100.0 and
+ // applies patternFormatting defined below.
+ HSSFConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule(
+ ComparisonOperator.GE,
+ "100.0", // 1st formula
+ null // 2nd formula Is not used for comparison operator GE
+ );
+ // Create pattern with red background
+ HSSFPatternFormatting patternFmt = rule.cretePatternFormatting();
+ patternFormatting.SetFillBackgroundColor(HSSFColor.RED.index);
+ // Define a region containing first column
+ Region [] regions =
+ {
+ new Region(1,(short)1,-1,(short)1)
+ };
+ // Apply Conditional Formatting rule defined above to the regions
+ sheet.AddConditionalFormatting(regions, rule);
+
+ @author Dmitriy Kumshayev
+
+
+
+ Initializes a new instance of the class.
+
+ The workbook.
+ The cf aggregate.
+
+
+
+ Gets the CF records aggregate.
+
+
+
+
+
+ Gets the array of Regions
+
+
+
+
+
+ Gets array of CellRangeAddresses
+
+
+
+
+
+ Replaces an existing Conditional Formatting rule at position idx.
+ Excel allows to Create up to 3 Conditional Formatting rules.
+ This method can be useful to modify existing Conditional Formatting rules.
+
+ position of the rule. Should be between 0 and 2.
+ Conditional Formatting rule
+
+
+
+ Add a Conditional Formatting rule.
+ Excel allows to Create up to 3 Conditional Formatting rules.
+
+ Conditional Formatting rule
+
+
+
+ Gets the Conditional Formatting rule at position idx
+
+ The index.
+
+
+
+
+ Gets the number of Conditional Formatting rules.
+
+ The number of rules.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ High level representation of Conditional Formatting Rule.
+ It allows to specify formula based conditions for the Conditional Formatting
+ and the formatting Settings such as font, border and pattern.
+
+ @author Dmitriy Kumshayev
+
+
+ @return - font formatting object if defined, null otherwise
+
+
+ Create a new font formatting structure if it does not exist,
+ otherwise just return existing object.
+ @return - font formatting object, never returns null.
+
+
+ @return - border formatting object if defined, null otherwise
+
+
+ Create a new border formatting structure if it does not exist,
+ otherwise just return existing object.
+ @return - border formatting object, never returns null.
+
+
+ @return - pattern formatting object if defined, null otherwise
+
+
+ Create a new pattern formatting structure if it does not exist,
+ otherwise just return existing object.
+ @return - pattern formatting object, never returns null.
+
+
+ @return - the conditiontype for the cfrule
+
+
+ @return - the comparisionoperatation for the cfrule
+
+
+ Creates a HSSFFormulaEvaluator, the object that Evaluates formula cells.
+
+ @return a HSSFFormulaEvaluator instance
+
+
+ Creates a HSSFClientAnchor. Use this object to position drawing object in a sheet
+
+ @return a HSSFClientAnchor instance
+ @see NPOI.SS.usermodel.Drawing
+
+
+ The first user-defined format starts at 164.
+
+
+
+ Construncts a new data formatter. It takes a workbook to have
+ access to the workbooks format records.
+
+ the workbook the formats are tied to.
+
+
+
+ Get the format index that matches the given format string
+ Automatically Converts "text" to excel's format string to represent text.
+
+ The format string matching a built in format.
+ index of format or -1 if Undefined.
+
+
+
+ Get the format index that matches the given format
+ string, creating a new format entry if required.
+ Aliases text to the proper format as required.
+
+ The format string matching a built in format.
+ index of format.
+
+
+
+ Get the format string that matches the given format index
+
+ The index of a format.
+ string represented at index of format or null if there Is not a format at that index
+
+
+
+ Get the format string that matches the given format index
+
+ The index of a built in format.
+ string represented at index of format or null if there Is not a builtin format at that index
+
+
+
+ Get the number of builtin and reserved builtinFormats
+
+ number of builtin and reserved builtinFormats
+
+
+ Ensures that the formats list can hold entries
+ up to and including the entry with this index
+
+
+
+ HSSF wrapper for a cell under evaluation
+ @author Josh Micich
+
+
+
+ HSSF wrapper for a sheet under evaluation
+
+ @author Josh Micich
+
+
+ Internal POI use only
+
+ @author Josh Micich
+
+
+
+ Represents a Font used in a workbook.
+ @version 1.0-pre
+ @author Andrew C. Oliver
+
+
+
+
+ Initializes a new instance of the class.
+
+ The index.
+ The record.
+
+
+
+ Get the name for the font (i.e. Arial)
+
+ the name of the font to use
+
+
+
+ Get the index within the HSSFWorkbook (sequence within the collection of Font objects)
+
+ Unique index number of the Underlying record this Font represents (probably you don't care
+ Unless you're comparing which one is which)
+
+
+
+ Get or sets the font height in Unit's of 1/20th of a point. Maybe you might want to
+ use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
+
+ height in 1/20ths of a point.
+
+
+
+ Gets or sets the font height in points.
+
+ height in the familiar Unit of measure - points.
+
+
+
+ Gets or sets whether to use italics or not
+
+ true if this instance is italic; otherwise, false.
+
+
+
+ Get whether to use a strikeout horizontal line through the text or not
+
+
+ strikeout or not
+
+
+
+
+ Gets or sets the color for the font.
+
+ The color to use.
+
+
+
+ get the color value for the font
+
+ HSSFWorkbook
+
+
+
+
+ Gets or sets the boldness to use
+
+ The boldweight.
+
+
+ get or set if the font bold style
+
+
+
+ Gets or sets normal,base or subscript.
+
+ offset type to use (none,base,sub)
+
+
+
+ Gets or sets the type of text Underlining to use
+
+ The Underlining type.
+
+
+
+ Gets or sets the char set to use.
+
+ The char set.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+ The parameter is null.
+
+
+
+ High level representation for Font Formatting component
+ of Conditional Formatting Settings
+
+ @author Dmitriy Kumshayev
+
+
+
+ Get the type of base or subscript for the font
+
+ @return base or subscript option
+
+
+ @return font color index
+
+
+ Gets the height of the font in 1/20th point Units
+
+ @return fontheight (in points/20); or -1 if not modified
+
+
+ Get the font weight for this font (100-1000dec or 0x64-0x3e8). Default Is
+ 0x190 for normal and 0x2bc for bold
+
+ @return bw - a number between 100-1000 for the fonts "boldness"
+
+
+ @return
+ @see org.apache.poi.hssf.record.cf.FontFormatting#GetRawRecord()
+
+
+ Get the type of Underlining for the font
+
+ @return font Underlining type
+
+ @see #U_NONE
+ @see #U_SINGLE
+ @see #U_DOUBLE
+ @see #U_SINGLE_ACCOUNTING
+ @see #U_DOUBLE_ACCOUNTING
+
+
+ Get whether the font weight Is Set to bold or not
+
+ @return bold - whether the font Is bold or not
+
+
+ @return true if escapement type was modified from default
+
+
+ @return true if font cancellation was modified from default
+
+
+ @return true if font outline type was modified from default
+
+
+ @return true if font shadow type was modified from default
+
+
+ @return true if font style was modified from default
+
+
+ @return true if font style was Set to italic
+
+
+ @return true if font outline Is on
+
+
+ @return true if font shadow Is on
+
+
+ @return true if font strikeout Is on
+
+
+ @return true if font Underline type was modified from default
+
+
+ @return true if font weight was modified from default
+
+
+ Set font style options.
+
+ @param italic - if true, Set posture style to italic, otherwise to normal
+ @param bold- if true, Set font weight to bold, otherwise to normal
+
+
+ Set font style options to default values (non-italic, non-bold)
+
+
+
+ Class to Read and manipulate the footer.
+ The footer works by having a left, center, and right side. The total cannot
+ be more that 255 bytes long. One uses this class by Getting the HSSFFooter
+ from HSSFSheet and then Getting or Setting the left, center, and right side.
+ For special things (such as page numbers and date), one can use a the methods
+ that return the Chars used to represent these. One can also Change the
+ fonts by using similar methods.
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ Footer record to create the footer with
+
+
+
+ Gets the raw footer.
+
+ The raw footer.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @param stabilityClassifier used to optimise caching performance. Pass null
+ for the (conservative) assumption that any cell may have its definition changed after
+ evaluation begins.
+
+
+ @param udfFinder pass null for default (AnalysisToolPak only)
+
+
+ @param stabilityClassifier used to optimise caching performance. Pass null
+ for the (conservative) assumption that any cell may have its definition changed after
+ evaluation begins.
+ @param udfFinder pass null for default (AnalysisToolPak only)
+
+
+ Coordinates several formula evaluators together so that formulas that involve external
+ references can be evaluated.
+ @param workbookNames the simple file names used to identify the workbooks in formulas
+ with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1")
+ @param evaluators all evaluators for the full set of workbooks required by the formulas.
+
+
+ If cell Contains a formula, the formula is Evaluated and returned,
+ else the CellValue simply copies the appropriate cell value from
+ the cell and also its cell type. This method should be preferred over
+ EvaluateInCell() when the call should not modify the contents of the
+ original cell.
+ @param cell
+ If cell contains a formula, the formula is evaluated and returned,
+ else the CellValue simply copies the appropriate cell value from
+ the cell and also its cell type. This method should be preferred over
+ evaluateInCell() when the call should not modify the contents of the
+ original cell.
+
+ @param cell may be null signifying that the cell is not present (or blank)
+ @return null if the supplied cell is null or blank
+
+
+ Should be called whenever there are major changes (e.g. moving sheets) to input cells
+ in the evaluated workbook. If performance is not critical, a single call to this method
+ may be used instead of many specific calls to the notify~ methods.
+
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ Should be called to tell the cell value cache that the specified (value or formula) cell
+ has changed.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ Should be called to tell the cell value cache that the specified cell has just been
+ deleted.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ Should be called to tell the cell value cache that the specified (value or formula) cell
+ has changed.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ If cell Contains formula, it Evaluates the formula,
+ and saves the result of the formula. The cell
+ remains as a formula cell.
+ Else if cell does not contain formula, this method leaves
+ the cell UnChanged.
+ Note that the type of the formula result is returned,
+ so you know what kind of value is also stored with
+ the formula.
+
+ int EvaluatedCellType = evaluator.EvaluateFormulaCell(cell);
+
+ Be aware that your cell will hold both the formula,
+ and the result. If you want the cell Replaced with
+ the result of the formula, use {@link #EvaluateInCell(HSSFCell)}
+ @param cell The cell to Evaluate
+ @return The type of the formula result (the cell's type remains as CellType.Formula however)
+
+
+ Returns a CellValue wrapper around the supplied ValueEval instance.
+ @param cell
+
+
+ If cell Contains formula, it Evaluates the formula, and
+ puts the formula result back into the cell, in place
+ of the old formula.
+ Else if cell does not contain formula, this method leaves
+ the cell UnChanged.
+ Note that the same instance of Cell is returned to
+ allow chained calls like:
+
+ int EvaluatedCellType = evaluator.EvaluateInCell(cell).CellType;
+
+ Be aware that your cell value will be Changed to hold the
+ result of the formula. If you simply want the formula
+ value computed for you, use {@link #EvaluateFormulaCell(HSSFCell)}
+ @param cell
+
+
+ Loops over all cells in all sheets of the supplied
+ workbook.
+ For cells that contain formulas, their formulas are
+ Evaluated, and the results are saved. These cells
+ remain as formula cells.
+ For cells that do not contain formulas, no Changes
+ are made.
+ This is a helpful wrapper around looping over all
+ cells, and calling EvaluateFormulaCell on each one.
+
+
+ Loops over all cells in all sheets of the supplied
+ workbook.
+ For cells that contain formulas, their formulas are
+ evaluated, and the results are saved. These cells
+ remain as formula cells.
+ For cells that do not contain formulas, no changes
+ are made.
+ This is a helpful wrapper around looping over all
+ cells, and calling evaluateFormulaCell on each one.
+
+
+ Whether to ignore missing references to external workbooks and
+ use cached formula results in the main workbook instead.
+
+ In some cases exetrnal workbooks referenced by formulas in the main workbook are not avaiable.
+ With this method you can control how POI handles such missing references:
+
+
by default ignoreMissingWorkbooks=false and POI throws {@link org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException}
+ if an external reference cannot be resolved
+
if ignoreMissingWorkbooks=true then POI uses cached formula result
+ that already exists in the main workbook
+
+
+ @param ignore whether to ignore missing references to external workbooks
+
+
+ {@inheritDoc}
+
+
+
+ Class to Read and manipulate the header.
+ The header works by having a left, center, and right side. The total cannot
+ be more that 255 bytes long. One uses this class by Getting the HSSFHeader
+ from HSSFSheet and then Getting or Setting the left, center, and right side.
+ For special things (such as page numbers and date), one can use a the methods
+ that return the Chars used to represent these. One can also Change the
+ fonts by using similar methods.
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ Footer record to Create the footer with
+
+
+
+ Gets the raw footer.
+
+ The raw footer.
+
+
+
+ Represents an Excel hyperlink.
+
+ @author Yegor Kozlov (yegor at apache dot org)
+
+
+ Low-level record object that stores the actual hyperlink data
+
+
+ If we Create a new hypelrink remember its type
+
+
+
+ Initializes a new instance of the class.
+
+ The type of hyperlink to Create.
+
+
+
+ Initializes a new instance of the class.
+
+ The record.
+
+
+
+ Gets or sets the row of the first cell that Contains the hyperlink
+
+ the 0-based row of the cell that Contains the hyperlink.
+
+
+
+ Gets or sets the row of the last cell that Contains the hyperlink
+
+ the 0-based row of the last cell that Contains the hyperlink
+
+
+
+ Gets or sets the column of the first cell that Contains the hyperlink
+
+ the 0-based column of the first cell that Contains the hyperlink
+
+
+
+ Gets or sets the column of the last cell that Contains the hyperlink
+
+ the 0-based column of the last cell that Contains the hyperlink
+
+
+
+ Gets or sets Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+
+ the Address of this hyperlink
+
+
+
+ Gets or sets the text mark.
+
+ The text mark.
+
+
+
+ Gets or sets the short filename.
+
+ The short filename.
+
+
+
+ Gets or sets the text label for this hyperlink
+
+ text to Display
+
+
+
+ Gets the type of this hyperlink
+
+ the type of this hyperlink
+
+
+
+ High Level Represantion of Named Range
+
+ @author Libin Roman (Vista Portal LDT. Developer)
+
+
+
+ Creates new HSSFName - called by HSSFWorkbook to Create a sheet from
+ scratch.
+
+ lowlevel Workbook object associated with the sheet.
+ the Name Record
+
+
+
+
+ Gets or sets the sheets name which this named range is referenced to
+
+ sheet name, which this named range refered to
+
+
+
+ Gets or sets the name of the named range
+
+ named range name
+
+
+ Returns the sheet index this name applies to.
+
+ @return the sheet index this name applies to, -1 if this name applies to the entire workbook
+
+
+
+ Sets the NameParsedFormula structure that specifies the formula for the defined name.
+
+ the sequence of {@link Ptg}s for the formula.
+
+
+
+ Tests if this name points to a cell that no longer exists
+
+
+ true if the name refers to a deleted cell; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is function name.
+
+
+ true if this instance is function name; otherwise, false.
+
+
+
+ Indicates that the defined name refers to a user-defined function.
+ This attribute is used when there is an add-in or other code project associated with the file.
+
+ @param value true indicates the name refers to a function.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+ Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc...
+
+ @author Daniel Noll
+
+
+ Reference to the filesystem root, required for retrieving the object data.
+
+
+ Returns the OLE2 Class Name of the object
+
+
+ Gets the object data. Only call for ones that have
+ data though. See {@link #hasDirectoryEntry()}
+
+ @return the object data as an OLE2 directory.
+ @ if there was an error Reading the data.
+
+
+ Returns the data portion, for an ObjectData
+ that doesn't have an associated POIFS Directory
+ Entry
+
+
+ Does this ObjectData have an associated POIFS
+ Directory Entry?
+ (Not all do, those that don't have a data portion)
+
+
+ Finds the EmbeddedObjectRefSubRecord, or throws an
+ Exception if there wasn't one
+
+
+
+ Excel can Get cranky if you give it files containing too
+ many (especially duplicate) objects, and this class can
+ help to avoid those.
+ In general, it's much better to make sure you don't
+ duplicate the objects in your code, as this is likely
+ to be much faster than creating lots and lots of
+ excel objects+records, only to optimise them down to
+ many fewer at a later stage.
+ However, sometimes this is too hard / tricky to do, which
+ is where the use of this class comes in.
+
+
+
+
+ Goes through the Workbook, optimising the fonts by
+ removing duplicate ones.
+ For now, only works on fonts used in HSSFCellStyle
+ and HSSFRichTextString. Any other font uses
+ (eg charts, pictures) may well end up broken!
+ This can be a slow operation, especially if you have
+ lots of cells, cell styles or rich text strings
+
+ The workbook in which to optimise the fonts
+
+
+
+ Goes through the Wokrbook, optimising the cell styles
+ by removing duplicate ones and ones that aren't used.
+ For best results, optimise the fonts via a call to
+ OptimiseFonts(HSSFWorkbook) first
+
+ The workbook in which to optimise the cell styles
+
+
+
+ Represents a workbook color palette.
+ Internally, the XLS format refers to colors using an offset into the palette
+ record. Thus, the first color in the palette has the index 0x8, the second
+ has the index 0x9, etc. through 0x40
+ @author Brian Sanders (bsanders at risklabs dot com)
+
+
+
+
+ Retrieves the color at a given index
+
+ the palette index, between 0x8 to 0x40 inclusive.
+ the color, or null if the index Is not populated
+
+
+
+ Finds the first occurance of a given color
+
+ the RGB red component, between 0 and 255 inclusive
+ the RGB green component, between 0 and 255 inclusive
+ the RGB blue component, between 0 and 255 inclusive
+ the color, or null if the color does not exist in this palette
+
+
+
+ Finds the closest matching color in the custom palette. The
+ method for Finding the distance between the colors Is fairly
+ primative.
+
+ The red component of the color to match.
+ The green component of the color to match.
+ The blue component of the color to match.
+ The closest color or null if there are no custom
+ colors currently defined.
+
+
+
+ Sets the color at the given offset
+
+ the palette index, between 0x8 to 0x40 inclusive
+ the RGB red component, between 0 and 255 inclusive
+ the RGB green component, between 0 and 255 inclusive
+ the RGB blue component, between 0 and 255 inclusive
+
+
+
+ Adds a new color into an empty color slot.
+
+ The red component
+ The green component
+ The blue component
+ The new custom color.
+
+
+
+ user custom color
+
+
+
+
+ Initializes a new instance of the class.
+
+ The byte offset.
+ The colors.
+
+
+
+ Initializes a new instance of the class.
+
+ The byte offset.
+ The red.
+ The green.
+ The blue.
+
+
+
+ Gets index to the standard palette
+
+
+
+
+
+ Gets triplet representation like that in Excel
+
+
+
+
+
+ Gets a hex string exactly like a gnumeric triplet
+
+
+
+
+
+ Gets the gnumeric part.
+
+ The color.
+
+
+
+
+ The patriarch is the toplevel container for shapes in a sheet. It does
+ little other than act as a container for other shapes and Groups.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+ The EscherAggregate we have been bound to.
+ (This will handle writing us out into records,
+ and building up our shapes from the records)
+
+
+
+ Creates the patriarch.
+
+ the sheet this patriarch is stored in.
+ The bound aggregate.
+
+
+ check if any shapes contain wrong data
+ At now(13.08.2010) check if patriarch contains 2 or more comments with same coordinates
+
+
+ @param shape to be removed
+ @return true of shape is removed
+
+
+
+ Creates a new Group record stored Under this patriarch.
+
+ the client anchor describes how this Group is attached
+ to the sheet.
+ the newly created Group.
+
+
+
+ Creates a simple shape. This includes such shapes as lines, rectangles,
+ and ovals.
+ Note: Microsoft Excel seems to sometimes disallow
+ higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ reverse them and draw shapes vertically or horizontally flipped!
+
+ the client anchor describes how this Group is attached
+ to the sheet.
+ the newly created shape.
+
+
+
+ Creates a picture.
+
+ the client anchor describes how this Group is attached
+ to the sheet.
+ Index of the picture.
+ the newly created shape.
+
+
+
+ CreatePicture
+
+ the client anchor describes how this picture is attached to the sheet.
+ the index of the picture in the workbook collection of pictures.
+ return newly created shape
+
+
+ Adds a new OLE Package Shape
+
+ @param anchor the client anchor describes how this picture is
+ attached to the sheet.
+ @param storageId the storageId returned by {@Link HSSFWorkbook.AddOlePackage}
+ @param pictureIndex the index of the picture (used as preview image) in the
+ workbook collection of pictures.
+
+ @return newly Created shape
+
+
+
+ Creates a polygon
+
+ the client anchor describes how this Group is attached
+ to the sheet.
+ the newly Created shape.
+
+
+
+ Constructs a textbox Under the patriarch.
+
+ the client anchor describes how this Group is attached
+ to the sheet.
+ the newly Created textbox.
+
+
+ Constructs a cell comment.
+
+ @param anchor the client anchor describes how this comment is attached
+ to the sheet.
+ @return the newly created comment.
+
+
+ YK: used to create autofilters
+
+ @see org.apache.poi.hssf.usermodel.HSSFSheet#setAutoFilter(int, int, int, int)
+
+
+
+ Constructs a cell comment.
+
+ the client anchor describes how this comment is attached
+ to the sheet.
+ the newly created comment.
+
+
+
+ Returns a list of all shapes contained by the patriarch.
+
+ The children.
+
+
+ add a shape to this drawing
+
+
+
+ Total count of all children and their children's children.
+
+ The count of all children.
+
+
+
+ Sets the coordinate space of this Group. All children are contrained
+ to these coordinates.
+
+ The x1.
+ The y1.
+ The x2.
+ The y2.
+
+
+
+ Does this HSSFPatriarch contain a chart?
+ (Technically a reference to a chart, since they
+ Get stored in a different block of records)
+ FIXME - detect chart in all cases (only seems
+ to work on some charts so far)
+
+
+ true if this instance contains chart; otherwise, false.
+
+
+
+
+ The top left x coordinate of this Group.
+
+ The x1.
+
+
+
+ The top left y coordinate of this Group.
+
+ The y1.
+
+
+
+ The bottom right x coordinate of this Group.
+
+ The x2.
+
+
+
+ The bottom right y coordinate of this Group.
+
+ The y2.
+
+
+
+ Returns the aggregate escher record we're bound to
+
+
+
+
+ Creates a new client anchor and sets the top-left and bottom-right
+ coordinates of the anchor.
+
+ @param dx1 the x coordinate in EMU within the first cell.
+ @param dy1 the y coordinate in EMU within the first cell.
+ @param dx2 the x coordinate in EMU within the second cell.
+ @param dy2 the y coordinate in EMU within the second cell.
+ @param col1 the column (0 based) of the first cell.
+ @param row1 the row (0 based) of the first cell.
+ @param col2 the column (0 based) of the second cell.
+ @param row2 the row (0 based) of the second cell.
+ @return the newly created client anchor
+
+
+ create shape tree from existing escher records tree
+
+
+
+ High level representation for Conditional Formatting Settings
+ @author Dmitriy Kumshayev
+
+
+
+
+ Initializes a new instance of the class.
+
+ The cf rule record.
+
+
+
+ Gets the pattern formatting block.
+
+ The pattern formatting block.
+
+
+
+ Gets or sets the color of the fill background.
+
+ The color of the fill background.
+
+
+
+ Gets or sets the color of the fill foreground.
+
+ The color of the fill foreground.
+
+
+
+ Gets or sets the fill pattern.
+
+ The fill pattern.
+
+
+
+ Represents a escher picture. Eg. A GIF, JPEG etc...
+ @author Glen Stampoultzis
+ @author Yegor Kozlov (yegor at apache.org)
+
+
+
+
+ Constructs a picture object.
+
+ The parent.
+ The anchor.
+
+
+
+ Reset the image to the dimension of the embedded image
+
+
+ Please note, that this method works correctly only for workbooks
+ with default font size (Arial 10pt for .xls).
+ If the default font is changed the resized image can be streched vertically or horizontally.
+
+
+
+
+ Resize the image proportionally.
+
+ scale
+
+
+
+ Resize the image
+
+ Please note, that this method works correctly only for workbooks
+ with default font size (Arial 10pt for .xls).
+ If the default font is changed the resized image can be streched vertically or horizontally.
+
+
+ resize(1.0,1.0) keeps the original size,
+ resize(0.5,0.5) resize to 50% of the original,
+ resize(2.0,2.0) resizes to 200% of the original.
+ resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image.
+
+
+ @param scaleX the amount by which the image width is multiplied relative to the original width.
+ @param scaleY the amount by which the image height is multiplied relative to the original height.
+
+
+
+ Gets or sets the index of the picture.
+
+ The index of the picture.
+
+
+ Calculate the preferred size for this picture.
+
+ @param scale the amount by which image dimensions are multiplied relative to the original size.
+ @return HSSFClientAnchor with the preferred size for this image
+ @since POI 3.0.2
+
+
+
+ Calculate the preferred size for this picture.
+
+ the amount by which image width is multiplied relative to the original width.
+ the amount by which image height is multiplied relative to the original height.
+ HSSFClientAnchor with the preferred size for this image
+
+
+
+ Calculate the preferred size for this picture.
+
+ HSSFClientAnchor with the preferred size for this image
+
+
+
+ The metadata of PNG and JPEG can contain the width of a pixel in millimeters.
+ Return the the "effective" dpi calculated as
+ 25.4/HorizontalPixelSize
+ and
+ 25.4/VerticalPixelSize
+ . Where 25.4 is the number of mm in inch.
+
+ The image.
+ the resolution
+
+
+
+ Return the dimension of the embedded image in pixel
+
+ image dimension
+
+
+ Return picture data for this shape
+
+ @return picture data for this shape
+
+
+ The color applied to the lines of this shape.
+
+
+ @return the anchor that is used by this picture.
+
+
+ @return the sheet which contains the picture shape
+
+
+
+ Represents binary data stored in the file. Eg. A GIF, JPEG etc...
+ @author Daniel Noll
+
+
+
+ Underlying escher blip record containing the bitmap data.
+
+
+
+ Constructs a picture object.
+
+ the underlying blip record containing the bitmap data.
+
+
+
+ Gets the picture data.
+
+ the picture data.
+
+
+
+ gets format of the picture.
+
+ The format.
+
+
+
+ Suggests a file extension for this image.
+
+ the file extension.
+
+
+ Returns the mime type for the image
+
+
+ @return the POI internal image type, -1 if not unknown image type
+
+ @see Workbook#PICTURE_TYPE_DIB
+ @see Workbook#PICTURE_TYPE_EMF
+ @see Workbook#PICTURE_TYPE_JPEG
+ @see Workbook#PICTURE_TYPE_PICT
+ @see Workbook#PICTURE_TYPE_PNG
+ @see Workbook#PICTURE_TYPE_WMF
+
+
+
+ @author Glen Stampoultzis (glens at baselinksoftware.com)
+
+
+
+ Generates the shape records for this shape.
+
+
+ Creates the low level OBJ record for this shape.
+
+
+ @return array of x coordinates
+
+
+ @return array of y coordinates
+
+
+ @param xPoints - array of x coordinates
+ @param yPoints - array of y coordinates
+
+
+ Defines the width and height of the points in the polygon
+ @param width
+ @param height
+
+
+ @return shape width
+
+
+ @return shape height
+
+
+
+ Used to modify the print Setup.
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ Takes the low level print Setup record.
+
+
+
+ Gets or sets the size of the paper.
+
+ The size of the paper.
+
+
+
+ Gets or sets the scale.
+
+ The scale.
+
+
+
+ Gets or sets the page start.
+
+ The page start.
+
+
+
+ Gets or sets the number of pages wide to fit sheet in.
+
+ the number of pages wide to fit sheet in
+
+
+
+ Gets or sets number of pages high to fit the sheet in
+
+ number of pages high to fit the sheet in.
+
+
+
+ Gets or sets the bit flags for the options.
+
+ the bit flags for the options.
+
+
+
+ Gets or sets the left to right print order.
+
+ the left to right print order.
+
+
+
+ Gets or sets the landscape mode.
+
+ the landscape mode.
+
+
+
+ Gets or sets the valid Settings.
+
+ the valid Settings.
+
+
+
+ Gets or sets the black and white Setting.
+
+ black and white Setting
+
+
+
+ Gets or sets the draft mode.
+
+ the draft mode.
+
+
+
+ Gets or sets the print notes.
+
+ the print notes.
+
+
+
+ Gets or sets a value indicating whether [no orientation].
+
+ true if [no orientation]; otherwise, false.
+
+
+
+ Gets or sets the use page numbers.
+
+ use page numbers.
+
+
+
+ Gets or sets the horizontal resolution.
+
+ the horizontal resolution.
+
+
+
+ Gets or sets the vertical resolution.
+
+ the vertical resolution.
+
+
+
+ Gets or sets the header margin.
+
+ The header margin.
+
+
+
+ Gets or sets the footer margin.
+
+ The footer margin.
+
+
+
+ Gets or sets the number of copies.
+
+ the number of copies.
+
+
+
+ Rich text Unicode string. These strings can have fonts applied to
+ arbitary parts of the string.
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Jason Height (jheight at apache.org)
+
+
+
+ Place holder for indicating that NO_FONT has been applied here
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The string.
+
+
+
+ Initializes a new instance of the class.
+
+ The workbook.
+ The record.
+
+
+
+ This must be called to Setup the internal work book references whenever
+ a RichTextString Is Added to a cell
+
+ The workbook.
+ The record.
+
+
+
+ Called whenever the Unicode string Is modified. When it Is modified
+ we need to Create a new SST index, so that other LabelSSTRecords will not
+ be affected by Changes tat we make to this string.
+
+
+
+
+
+ Adds to SST if required.
+
+
+
+
+ Applies a font to the specified Chars of a string.
+
+ The start index to apply the font to (inclusive).
+ The end index to apply the font to (exclusive).
+ The font to use.
+
+
+
+ Applies a font to the specified Chars of a string.
+
+ The start index to apply the font to (inclusive).
+ The end index to apply to font to (exclusive).
+ The index of the font to use.
+
+
+
+ Sets the font of the entire string.
+
+ The font to use.
+
+
+
+ Removes any formatting that may have been applied to the string.
+
+
+
+
+ Returns the plain string representation.
+
+ The string.
+
+
+
+ Returns the raw, probably shared Unicode String.
+ Used when tweaking the styles, eg updating font
+ positions.
+ Changes to this string may well effect
+ other RichTextStrings too!
+
+ The raw unicode string.
+
+
+
+ Gets or sets the unicode string.
+
+ The unicode string.
+
+
+
+ Gets the number of Chars in the font..
+
+ The length.
+
+
+
+ Returns the font in use at a particular index.
+
+ The index.
+ The font that's currently being applied at that
+ index or null if no font Is being applied or the
+ index Is out of range.
+
+
+
+ Gets the number of formatting runs used. There will always be at
+ least one of font NO_FONT.
+
+ The num formatting runs.
+
+
+
+ The index within the string to which the specified formatting run applies.
+
+ the index of the formatting run
+ the index within the string.
+
+
+
+ Gets the font used in a particular formatting run.
+
+ the index of the formatting run.
+ the font number used.
+
+
+
+ Compares one rich text string to another.
+
+ The other rich text string.
+
+
+
+
+ Equalses the specified o.
+
+ The o.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Applies the specified font to the entire string.
+
+ Index of the font to apply.
+
+
+
+ High level representation of a row of a spReadsheet.
+ Only rows that have cells should be Added to a Sheet.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ used for collections
+
+
+
+ reference to low level representation
+
+
+ reference to containing low level Workbook
+
+
+ reference to containing Sheet
+
+
+
+ Creates new HSSFRow from scratch. Only HSSFSheet should do this.
+
+ low-level Workbook object containing the sheet that Contains this row
+ low-level Sheet object that Contains this Row
+ the row number of this row (0 based)
+
+
+
+
+ Creates an HSSFRow from a low level RowRecord object. Only HSSFSheet should do
+ this. HSSFSheet uses this when an existing file is Read in.
+
+ low-level Workbook object containing the sheet that Contains this row
+ low-level Sheet object that Contains this Row
+ the low level api object this row should represent
+
+
+
+
+ Use this to create new cells within the row and return it.
+ The cell that is returned is a CELL_TYPE_BLANK (/).
+ The type can be changed either through calling SetCellValue or SetCellType.
+
+ the column number this cell represents
+ a high level representation of the created cell.
+
+
+
+ Use this to create new cells within the row and return it.
+ The cell that is returned is a CELL_TYPE_BLANK. The type can be changed
+ either through calling setCellValue or setCellType.
+
+ the column number this cell represents
+ a high level representation of the created cell.
+
+
+
+
+ Remove the Cell from this row.
+
+ The cell to Remove.
+
+
+
+ Removes the cell.
+
+ The cell.
+ if set to true [also remove records].
+
+
+ used internally to refresh the "last cell plus one" when the last cell is removed.
+ @return 0 when row contains no cells
+
+
+ used internally to refresh the "first cell" when the first cell is removed.
+ @return 0 when row contains no cells (also when first cell is occupied)
+
+
+
+ Create a high level Cell object from an existing low level record. Should
+ only be called from HSSFSheet or HSSFRow itself.
+
+ The low level cell to Create the high level representation from
+ the low level record passed in
+
+
+
+ true, when the row is invisible. This is the case when the height is zero.
+
+
+
+
+ Removes all the cells from the row, and their
+ records too.
+
+
+
+
+ Get row number this row represents
+
+ the row number (0 based)
+
+
+
+ Returns the rows outline level. Increased as you
+ put it into more Groups (outlines), reduced as
+ you take it out of them.
+
+ The outline level.
+
+
+
+ Moves the supplied cell to a new column, which
+ must not already have a cell there!
+
+ The cell to move
+ The new column number (0 based)
+
+
+ Returns the HSSFSheet this row belongs to
+
+ @return the HSSFSheet that owns this row
+
+
+
+ used internally to Add a cell.
+
+ The cell.
+
+
+
+ Get the hssfcell representing a given column (logical cell)
+ 0-based. If you ask for a cell that is not defined, then
+ you Get a null.
+ This is the basic call, with no policies applied
+
+ 0 based column number
+ Cell representing that column or null if Undefined.
+
+
+
+ Get the hssfcell representing a given column (logical cell)
+ 0-based. If you ask for a cell that is not defined then
+ you get a null, unless you have set a different
+ MissingCellPolicy on the base workbook.
+
+ Short method signature provided to retain binary
+ compatibility.
+
+ 0 based column number
+ Cell representing that column or null if undefined.
+
+
+
+ Get the hssfcell representing a given column (logical cell)
+ 0-based. If you ask for a cell that is not defined then
+ you get a null, unless you have set a different
+ MissingCellPolicy on the base workbook.
+
+ 0 based column number
+ Cell representing that column or null if undefined.
+
+
+
+ Get the hssfcell representing a given column (logical cell)
+ 0-based. If you ask for a cell that is not defined, then
+ your supplied policy says what to do
+
+ 0 based column number
+ Policy on blank / missing cells
+ that column or null if Undefined + policy allows.
+
+
+
+ Get the number of the first cell contained in this row.
+
+ the first logical cell in the row, or -1 if the row does not contain any cells.
+
+
+
+ Gets the index of the last cell contained in this row PLUS ONE
+ . The result also happens to be the 1-based column number of the last cell. This value can be used as a
+ standard upper bound when iterating over cells:
+
+
+ short representing the last logical cell in the row PLUS ONE, or -1 if the
+ row does not contain any cells.
+
+
+ short minColIx = row.GetFirstCellNum();
+ short maxColIx = row.GetLastCellNum();
+ for(short colIx=minColIx; colIx<maxColIx; colIx++) {
+ Cell cell = row.GetCell(colIx);
+ if(cell == null) {
+ continue;
+ }
+ //... do something with cell
+ }
+
+
+
+
+ Gets the number of defined cells (NOT number of cells in the actual row!).
+ That is to say if only columns 0,4,5 have values then there would be 3.
+
+ the number of defined cells in the row.
+
+
+
+ Gets or sets whether or not to Display this row with 0 height
+
+ height is zero or not.
+
+
+
+ Get or sets the row's height or ff (-1) for undefined/default-height in twips (1/20th of a point)
+
+ rowheight or 0xff for Undefined (use sheet default)
+
+
+
+ is this row formatted? Most aren't, but some rows
+ do have whole-row styles. For those that do, you
+ can get the formatting from {@link #getRowStyle()}
+
+
+ true if this instance is formatted; otherwise, false.
+
+
+
+
+ Returns the whole-row cell styles. Most rows won't
+ have one of these, so will return null. Call IsFormmated to check first
+
+ The row style.
+
+
+
+ Get the row's height or ff (-1) for Undefined/default-height in points (20*Height)
+
+ row height or 0xff for Undefined (use sheet default).
+
+
+
+ Get the lowlevel RowRecord represented by this object - should only be called
+ by other parts of the high level API
+
+ RowRecord this row represents
+
+
+
+ used internally to refresh the "first cell" when the first cell is Removed.
+
+ The first cell index.
+
+
+
+
+ Get cells in the row (existing cells only, no blanks)
+
+
+
+
+ Gets the cell enumerator of the physically defined cells.
+
+
+ Note that the 4th element might well not be cell 4, as the iterator
+ will not return Un-defined (null) cells.
+ Call CellNum on the returned cells to know which cell they are.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not the same type as this instance.
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+ The parameter is null.
+
+
+
+
+ Returns a hash code. In this case it is the number of the row.
+
+
+
+
+ An abstract shape.
+
+ Note: Microsoft Excel seems to sometimes disallow
+ higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ reverse them and draw shapes vertically or horizontally flipped!
+
+
+
+ creates shapes from existing file
+ @param spContainer
+ @param objRecord
+
+
+
+ Create a new shape with the specified parent and anchor.
+
+ The parent.
+ The anchor.
+
+
+
+ Gets the parent shape.
+
+ The parent.
+
+
+
+ Gets or sets the anchor that is used by this shape.
+
+ The anchor.
+
+
+
+ The color applied to the lines of this shape.
+
+ The color of the line style.
+
+
+
+ Sets the color applied to the lines of this shape
+
+ The red.
+ The green.
+ The blue.
+
+
+
+ Gets or sets the color used to fill this shape.
+
+ The color of the fill.
+
+
+
+ Sets the color used to fill this shape.
+
+ The red.
+ The green.
+ The blue.
+
+
+
+ Gets or sets with width of the line in EMUs. 12700 = 1 pt.
+
+ The width of the line.
+
+
+
+ Gets or sets One of the constants in LINESTYLE_*
+
+ The line style.
+
+
+
+ Gets or sets a value indicating whether this instance is no fill.
+
+
+ true if this shape Is not filled with a color; otherwise, false.
+
+
+
+
+ whether this shape is vertically flipped.
+
+
+
+
+ whether this shape is horizontally flipped.
+
+
+
+
+ get or set the rotation, in degrees, that is applied to a shape.
+ Negative values specify rotation in the counterclockwise direction.
+ Rotation occurs around the center of the shape.
+ The default value for this property is 0x00000000
+
+
+
+
+ Count of all children and their childrens children.
+
+ The count of all children.
+
+
+
+ An interface that indicates whether a class can contain children.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Gets Any children contained by this shape.
+
+ The children.
+
+
+
+ dd shape to the list of child records
+
+ shape
+
+
+
+ set coordinates of this group relative to the parent
+
+ x1
+ y1
+ x2
+ y2
+
+
+
+ Get the top left x coordinate of this group.
+
+
+
+
+ Get the top left y coordinate of this group.
+
+
+
+
+ Get the bottom right x coordinate of this group.
+
+
+
+
+ Get the bottom right y coordinate of this group.
+
+
+
+ remove first level shapes
+ @param shape to be removed
+ @return true if shape is removed else return false
+
+
+
+ A shape Group may contain other shapes. It was no actual form on the
+ sheet.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Create another Group Under this Group.
+
+ the position of the new Group.
+ the Group
+
+
+
+ Create a new simple shape Under this Group.
+
+ the position of the shape.
+ the shape
+
+
+
+ Create a new textbox Under this Group.
+
+ the position of the shape.
+ the textbox
+
+
+
+ Creates a polygon
+
+ the client anchor describes how this Group Is attached
+ to the sheet.
+ the newly Created shape.
+
+
+
+ Creates a picture.
+
+ the client anchor describes how this Group Is attached
+ to the sheet.
+ Index of the picture.
+ the newly Created shape.
+
+
+
+ Return all children contained by this shape.
+
+
+
+
+
+ Sets the coordinate space of this Group. All children are constrained
+ to these coordinates.
+
+ The x1.
+ The y1.
+ The x2.
+ The y2.
+
+
+
+ Gets The top left x coordinate of this Group.
+
+ The x1.
+
+
+
+ Gets The top left y coordinate of this Group.
+
+ The y1.
+
+
+
+ Gets The bottom right x coordinate of this Group.
+
+ The x2.
+
+
+
+ Gets the bottom right y coordinate of this Group.
+
+ The y2.
+
+
+
+ Count of all children and their childrens children.
+
+
+
+
+
+ High level representation of a worksheet.
+
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Libin Roman (romal at vistaportal.com)
+ @author Shawn Laubach (slaubach at apache dot org) (Just a little)
+ @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little, too)
+ @author Yegor Kozlov (yegor at apache.org) (Autosizing columns)
+
+
+
+ width of 1px in columns with default width in units of 1/256 of a character width
+
+
+ width of 1px in columns with overridden width in units of 1/256 of a character width
+
+
+ Used for compile-time optimization. This is the initial size for the collection of
+ rows. It is currently Set to 20. If you generate larger sheets you may benefit
+ by Setting this to a higher number and recompiling a custom edition of HSSFSheet.
+
+
+ reference to the low level Sheet object
+
+
+
+ Creates new HSSFSheet - called by HSSFWorkbook to create a _sheet from
+ scratch. You should not be calling this from application code (its protected anyhow).
+
+ The HSSF Workbook object associated with the _sheet.
+
+
+
+
+ Creates an HSSFSheet representing the given Sheet object. Should only be
+ called by HSSFWorkbook when reading in an exisiting file.
+
+ The HSSF Workbook object associated with the _sheet.
+ lowlevel Sheet object this _sheet will represent
+
+
+
+
+ Clones the _sheet.
+
+ The _workbook.
+ the cloned sheet
+
+
+
+ Copy one row to the target row
+
+ index of the source row
+ index of the target row
+
+
+
+ used internally to Set the properties given a Sheet object
+
+ The _sheet.
+
+
+ Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
+ When false, cells with zero value appear blank instead of showing the number zero.
+ In Excel 2003 this option can be changed in the Options dialog on the View tab.
+ @return whether all zero values on the worksheet are displayed
+
+
+
+ Create a new row within the _sheet and return the high level representation
+
+ The row number.
+
+ @see org.apache.poi.hssf.usermodel.HSSFRow
+ @see #RemoveRow(HSSFRow)
+
+
+
+ Used internally to Create a high level Row object from a low level row object.
+ USed when Reading an existing file
+
+ low level record to represent as a high level Row and Add to _sheet.
+ HSSFRow high level representation
+
+
+
+ Remove a row from this _sheet. All cells contained in the row are Removed as well
+
+ the row to Remove.
+
+
+
+ used internally to refresh the "last row" when the last row is Removed.
+
+ The last row.
+
+
+
+
+ used internally to refresh the "first row" when the first row is Removed.
+
+ The first row.
+
+
+
+ Add a row to the _sheet
+
+ @param AddLow whether to Add the row to the low level model - false if its already there
+
+
+
+ Returns the HSSFCellStyle that applies to the given
+ (0 based) column, or null if no style has been
+ set for that column
+
+ The column.
+
+
+
+
+ Returns the logical row (not physical) 0-based. If you ask for a row that is not
+ defined you get a null. This is to say row 4 represents the fifth row on a _sheet.
+
+ Index of the row to get.
+ the row number or null if its not defined on the _sheet
+
+
+
+ Returns the number of phsyically defined rows (NOT the number of rows in the _sheet)
+
+ The physical number of rows.
+
+
+
+ Gets the first row on the _sheet
+
+ the number of the first logical row on the _sheet
+
+
+
+ Gets the last row on the _sheet
+
+ last row contained n this _sheet.
+
+
+
+ Creates a data validation object
+
+ The data validation object settings
+
+
+
+ Get the visibility state for a given column.F:\Gloria\�о�\�ļ���ʽ\NPOI\src\NPOI\HSSF\Util\HSSFDataValidation.cs
+
+ the column to Get (0-based).
+ the visiblity state of the column.
+
+
+
+ Get the hidden state for a given column.
+
+ the column to Set (0-based)
+ the visiblity state of the column;
+
+
+
+
+ Set the width (in Units of 1/256th of a Char width)
+
+ the column to Set (0-based)
+ the width in Units of 1/256th of a Char width
+
+
+
+ Get the width (in Units of 1/256th of a Char width )
+
+ the column to Set (0-based)
+ the width in Units of 1/256th of a Char width
+
+
+
+ Gets or sets the default width of the column.
+
+ The default width of the column.
+
+
+
+ Get the default row height for the _sheet (if the rows do not define their own height) in
+ twips (1/20 of a point)
+
+ The default height of the row.
+
+
+
+ Get the default row height for the _sheet (if the rows do not define their own height) in
+ points.
+
+ The default row height in points.
+
+
+
+ Get whether gridlines are printed.
+
+
+ true if printed; otherwise, false.
+
+
+
+
+ Adds a merged region of cells (hence those cells form one)
+
+ The region (rowfrom/colfrom-rowto/colto) to merge.
+ index of this region
+
+
+
+ adds a merged region of cells (hence those cells form one)
+
+ region (rowfrom/colfrom-rowto/colto) to merge
+ index of this region
+
+
+
+ Whether a record must be Inserted or not at generation to indicate that
+ formula must be recalculated when _workbook is opened.
+
+
+ true if [force formula recalculation]; otherwise, false.
+
+ @return true if an Uncalced record must be Inserted or not at generation
+
+
+
+ Determine whether printed output for this _sheet will be vertically centered.
+
+ true if [vertically center]; otherwise, false.
+
+
+
+ Determine whether printed output for this _sheet will be horizontally centered.
+
+ true if [horizontally center]; otherwise, false.
+
+
+
+ Removes a merged region of cells (hence letting them free)
+
+ index of the region to Unmerge
+
+
+
+ returns the number of merged regions
+
+ The number of merged regions
+
+
+
+ Gets the row enumerator.
+
+
+ an iterator of the PHYSICAL rows. Meaning the 3rd element may not
+ be the third row if say for instance the second row is undefined.
+ Call on each row
+ if you care which one it is.
+
+
+
+
+ Alias for GetRowEnumerator() to allow foreach loops.
+
+
+ an iterator of the PHYSICAL rows. Meaning the 3rd element may not
+ be the third row if say for instance the second row is undefined.
+ Call on each row
+ if you care which one it is.
+
+
+
+
+ used internally in the API to Get the low level Sheet record represented by this
+ Object.
+
+ low level representation of this HSSFSheet.
+
+
+
+ Sets the active cell.
+
+ The row.
+ The column.
+
+
+
+ Sets the active cell range.
+
+ The first row.
+ The last row.
+ The first column.
+ The last column.
+
+
+
+ Sets the active cell range.
+
+ The cellranges.
+ The index of the active range.
+ The active row in the active range
+ The active column in the active range
+
+
+
+ Gets or sets whether alternate expression evaluation is on
+
+
+ true if [alternative expression]; otherwise, false.
+
+
+
+
+ whether alternative formula entry is on
+
+ true alternative formulas or not; otherwise, false.
+
+
+
+ show automatic page breaks or not
+
+ whether to show auto page breaks
+
+
+
+ Gets or sets a value indicating whether _sheet is a dialog _sheet
+
+ true if is dialog; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to Display the guts or not.
+
+ true if guts or no guts (or glory); otherwise, false.
+
+
+
+ Gets or sets a value indicating whether fit to page option is on
+
+ true if [fit to page]; otherwise, false.
+
+
+
+ Get if row summaries appear below detail in the outline
+
+ true if below or not; otherwise, false.
+
+
+
+ Get if col summaries appear right of the detail in the outline
+
+ true right or not; otherwise, false.
+
+
+
+ Gets or sets whether gridlines are printed.
+
+
+ true Gridlines are printed; otherwise, false.
+
+
+
+
+ Gets the print setup object.
+
+ The user model for the print setup object.
+
+
+
+ Gets the user model for the document header.
+
+ The Document header.
+
+
+
+ Gets the user model for the document footer.
+
+ The Document footer.
+
+
+
+ Gets or sets whether the worksheet is displayed from right to left instead of from left to right.
+
+ true for right to left, false otherwise
+ poi bug 47970
+
+
+
+ Note - this is not the same as whether the _sheet is focused (isActive)
+
+
+ true if this _sheet is currently selected; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating if this _sheet is currently focused.
+
+ true if this _sheet is currently focused; otherwise, false.
+
+
+
+ Sets whether sheet is selected.
+
+ Whether to select the sheet or deselect the sheet.
+
+
+
+ Answer whether protection is enabled or disabled
+
+ true if protection enabled; otherwise, false.
+
+
+
+ Gets the hashed password
+
+ The password.
+
+
+
+ Answer whether object protection is enabled or disabled
+
+ true if protection enabled; otherwise, false.
+
+
+
+ Answer whether scenario protection is enabled or disabled
+
+ true if protection enabled; otherwise, false.
+
+
+
+ Sets the protection enabled as well as the password
+
+ password to set for protection, pass null to remove protection
+
+
+
+ Sets the zoom magnication for the _sheet. The zoom is expressed as a
+ fraction. For example to express a zoom of 75% use 3 for the numerator
+ and 4 for the denominator.
+
+ The numerator for the zoom magnification.
+ The denominator for the zoom magnification.
+
+
+
+ Sets the enclosed border of region.
+
+ The region.
+ Type of the border.
+ The color.
+
+
+
+ Sets the right border of region.
+
+ The region.
+ Type of the border.
+ The color.
+
+
+
+ Sets the left border of region.
+
+ The region.
+ Type of the border.
+ The color.
+
+
+
+ Sets the top border of region.
+
+ The region.
+ Type of the border.
+ The color.
+
+
+
+ Sets the bottom border of region.
+
+ The region.
+ Type of the border.
+ The color.
+
+
+
+ The top row in the visible view when the _sheet is
+ first viewed after opening it in a viewer
+
+ the rownum (0 based) of the top row
+
+
+
+ The left col in the visible view when the _sheet Is
+ first viewed after opening it in a viewer
+
+ the rownum (0 based) of the top row
+
+
+ Sets desktop window pane display area, when the
+ file is first opened in a viewer.
+
+ @param toprow the top row to show in desktop window pane
+ @param leftcol the left column to show in desktop window pane
+
+
+
+ Sets desktop window pane display area, when the
+ file is first opened in a viewer.
+
+ the top row to show in desktop window pane
+ the left column to show in desktop window pane
+
+
+
+ Shifts the merged regions left or right depending on mode
+ TODO: MODE , this is only row specific
+
+ The start row.
+ The end row.
+ The n.
+ if set to true [is row].
+
+
+
+ Shifts rows between startRow and endRow n number of rows.
+ If you use a negative number, it will Shift rows up.
+ Code Ensures that rows don't wrap around.
+ Calls ShiftRows(startRow, endRow, n, false, false);
+ Additionally Shifts merged regions that are completely defined in these
+ rows (ie. merged 2 cells on a row to be Shifted).
+
+ the row to start Shifting
+ the row to end Shifting
+ the number of rows to Shift
+
+
+
+ Shifts rows between startRow and endRow n number of rows.
+ If you use a negative number, it will shift rows up.
+ Code ensures that rows don't wrap around
+ Additionally shifts merged regions that are completely defined in these
+ rows (ie. merged 2 cells on a row to be shifted).
+ TODO Might want to add bounds checking here
+
+ the row to start shifting
+ the row to end shifting
+ the number of rows to shift
+ whether to copy the row height during the shift
+ whether to set the original row's height to the default
+
+
+
+ Shifts rows between startRow and endRow n number of rows.
+ If you use a negative number, it will Shift rows up.
+ Code Ensures that rows don't wrap around
+ Additionally Shifts merged regions that are completely defined in these
+ rows (ie. merged 2 cells on a row to be Shifted).
+ TODO Might want to Add bounds Checking here
+
+ the row to start Shifting
+ the row to end Shifting
+ the number of rows to Shift
+ whether to copy the row height during the Shift
+ whether to Set the original row's height to the default
+ if set to true [move comments].
+
+
+
+ Inserts the chart records.
+
+ The records.
+
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split.
+ Vertical position of split.
+ Top row visible in bottom pane
+ Left column visible in right pane.
+
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split.
+ Vertical position of split.
+
+
+
+ Creates a split pane. Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split (in 1/20th of a point).
+ Vertical position of split (in 1/20th of a point).
+ Left column visible in right pane.
+ Top row visible in bottom pane.
+ Active pane. One of: PANE_LOWER_RIGHT,PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
+
+
+
+ Returns the information regarding the currently configured pane (split or freeze).
+
+ null if no pane configured, or the pane information.
+
+
+
+ Gets or sets if gridlines are Displayed.
+
+ whether gridlines are Displayed
+
+
+
+ Gets or sets a value indicating whether formulas are displayed.
+
+ whether formulas are Displayed
+
+
+
+ Gets or sets a value indicating whether RowColHeadings are displayed.
+
+
+ whether RowColHeadings are displayed
+
+
+
+
+ Gets the size of the margin in inches.
+
+ which margin to get.
+ the size of the margin
+
+
+
+ Sets the size of the margin in inches.
+
+ which margin to get.
+ the size of the margin
+
+
+
+ Sets a page break at the indicated row
+
+ The row.
+
+
+
+ Determines if there is a page break at the indicated row
+
+ The row.
+
+ true if [is row broken] [the specified row]; otherwise, false.
+
+
+
+
+ Removes the page break at the indicated row
+
+ The row.
+
+
+
+ Retrieves all the horizontal page breaks
+
+ all the horizontal page breaks, or null if there are no row page breaks
+
+
+
+ Retrieves all the vertical page breaks
+
+ all the vertical page breaks, or null if there are no column page breaks
+
+
+
+ Sets a page break at the indicated column
+
+ The column.
+
+
+
+ Determines if there is a page break at the indicated column
+
+ The column.
+
+ true if [is column broken] [the specified column]; otherwise, false.
+
+
+
+
+ Removes a page break at the indicated column
+
+ The column.
+
+
+
+ Runs a bounds Check for row numbers
+
+ The row.
+
+
+
+ Runs a bounds Check for column numbers
+
+ The column.
+
+
+
+ Aggregates the drawing records and dumps the escher record hierarchy
+ to the standard output.
+
+ if set to true [fat].
+
+
+
+ Returns the agregate escher records for this _sheet,
+ it there is one.
+ WARNING - calling this will trigger a parsing of the
+ associated escher records. Any that aren't supported
+ (such as charts and complex drawing types) will almost
+ certainly be lost or corrupted when written out.
+
+ The drawing escher aggregate.
+
+
+ This will hold any graphics or charts for the sheet.
+
+ @return the top-level drawing patriarch, if there is one, else returns null
+
+
+ Creates the top-level drawing patriarch. This will have
+ the effect of removing any existing drawings on this
+ sheet.
+ This may then be used to add graphics or charts
+
+ @return The new patriarch.
+
+
+
+ Gets or sets the tab color of the _sheet
+
+
+
+
+ Gets or sets whether the tab color of _sheet is automatic
+
+
+
+
+ Expands or collapses a column Group.
+
+ One of the columns in the Group.
+ true = collapse Group, false = expand Group.
+
+
+
+ Create an outline for the provided column range.
+
+ beginning of the column range.
+ end of the column range.
+
+
+
+ Ungroups the column.
+
+ From column.
+ To column.
+
+
+
+ Groups the row.
+
+ From row.
+ To row.
+
+
+
+ Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well
+
+ any cell within Array Formula range
+ the of cells affected by this change
+
+
+
+ Also creates cells if they don't exist.
+
+
+
+
+ Sets array formula to specified region for result.
+
+ text representation of the formula
+ Region of array formula for result
+ the of cells affected by this change
+
+
+
+ Ungroups the row.
+
+ From row.
+ To row.
+
+
+
+ Sets the row group collapsed.
+
+ The row.
+ if set to true [collapse].
+
+
+
+ Sets the default column style for a given column. POI will only apply this style to new cells Added to the _sheet.
+
+ the column index
+ the style to set
+
+
+
+ Adjusts the column width to fit the contents.
+ This Process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ Processing.
+
+ the column index.
+
+
+
+ Adjusts the column width to fit the contents.
+ This Process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ Processing.
+ You can specify whether the content of merged cells should be considered or ignored.
+ Default is to ignore merged cells.
+
+ the column index
+ whether to use the contents of merged cells when calculating the width of the column
+
+
+
+ Checks if the provided region is part of the merged regions.
+
+ Region searched in the merged regions
+ true, when the region is contained in at least one of the merged regions
+
+
+
+ Gets the merged region at the specified index
+
+ The index.
+
+
+
+
+ Convert HSSFFont to Font.
+
+ The font.
+
+
+
+
+ Returns cell comment for the specified row and column
+
+ The row.
+ The column.
+ cell comment or null if not found
+
+
+
+ Gets the sheet conditional formatting.
+
+ The sheet conditional formatting.
+
+
+
+ Get the DVRecords objects that are associated to this _sheet
+
+ a list of DVRecord instances
+
+
+
+ Provide a reference to the parent workbook.
+
+
+
+
+ Returns the name of this _sheet
+
+
+
+
+ Create an instance of a DataValidationHelper.
+
+ Instance of a DataValidationHelper
+
+
+
+ Enable filtering for a range of cells
+
+ the range of cells to filter
+
+
+
+ Returns the column outline level. Increased as you
+ put it into more groups (outlines), reduced as
+ you take it out of them.
+
+
+
+
+
+
+ The Conditional Formatting facet of HSSFSheet
+ @author Dmitriy Kumshayev
+
+
+
+
+ A factory method allowing to Create a conditional formatting rule
+ with a cell comparison operator
+ TODO - formulas containing cell references are currently not Parsed properly
+
+ a constant value from HSSFConditionalFormattingRule.ComparisonOperator
+ formula for the valued, Compared with the cell
+ second formula (only used with HSSFConditionalFormattingRule#COMPARISON_OPERATOR_BETWEEN
+ and HSSFConditionalFormattingRule#COMPARISON_OPERATOR_NOT_BETWEEN operations)
+
+
+
+
+ A factory method allowing to Create a conditional formatting rule with a formula.
+ The formatting rules are applied by Excel when the value of the formula not equal to 0.
+ TODO - formulas containing cell references are currently not Parsed properly
+
+ formula for the valued, Compared with the cell
+
+
+
+
+ Adds a copy of HSSFConditionalFormatting object to the sheet
+ This method could be used to copy HSSFConditionalFormatting object
+ from one sheet to another.
+
+ HSSFConditionalFormatting object
+ index of the new Conditional Formatting object
+
+ HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index);
+ newSheet.AddConditionalFormatting(cf);
+
+
+
+
+ Allows to Add a new Conditional Formatting Set to the sheet.
+
+ list of rectangular regions to apply conditional formatting rules
+ Set of up to three conditional formatting rules
+ index of the newly Created Conditional Formatting object
+
+
+
+ Adds the conditional formatting.
+
+ The regions.
+ The rule1.
+
+
+
+
+ Adds the conditional formatting.
+
+ The regions.
+ The rule1.
+ The rule2.
+
+
+
+
+ Gets Conditional Formatting object at a particular index
+ @param index
+ of the Conditional Formatting object to fetch
+
+ Conditional Formatting object
+
+
+
+
+ the number of Conditional Formatting objects of the sheet
+
+ The num conditional formattings.
+
+
+
+ Removes a Conditional Formatting object by index
+
+ index of a Conditional Formatting object to Remove
+
+
+
+ Represents a simple shape such as a line, rectangle or oval.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The parent.
+ The anchor.
+
+
+
+ Gets the shape type.
+
+ One of the OBJECT_TYPE_* constants.
+ @see #OBJECT_TYPE_LINE
+ @see #OBJECT_TYPE_OVAL
+ @see #OBJECT_TYPE_RECTANGLE
+ @see #OBJECT_TYPE_PICTURE
+ @see #OBJECT_TYPE_COMMENT
+
+
+
+ Get or set the rich text string used by this object.
+
+
+
+
+ A textbox Is a shape that may hold a rich text string.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Construct a new textbox with the given parent and anchor.
+
+ The parent.
+ One of HSSFClientAnchor or HSSFChildAnchor
+
+
+
+ Gets or sets the left margin within the textbox.
+
+ The margin left.
+
+
+
+ Gets or sets the right margin within the textbox.
+
+ The margin right.
+
+
+
+ Gets or sets the top margin within the textbox
+
+ The top margin.
+
+
+
+ Gets or sets the bottom margin within the textbox.
+
+ The margin bottom.
+
+
+
+ Gets or sets the horizontal alignment.
+
+ The horizontal alignment.
+
+
+
+ Gets or sets the vertical alignment.
+
+ The vertical alignment.
+
+
+
+ High level representation of a workbook. This is the first object most users
+ will construct whether they are reading or writing a workbook. It is also the
+ top level object for creating new sheets/etc.
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Shawn Laubach (slaubach at apache dot org)
+
+
+ The maximum number of cell styles in a .xls workbook.
+ The 'official' limit is 4,000, but POI allows a slightly larger number.
+ This extra delta takes into account built-in styles that are automatically
+ created for new workbooks
+
+ See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx
+
+
+ used for compile-time performance/memory optimization. This determines the
+ initial capacity for the sheet collection. Its currently Set to 3.
+ Changing it in this release will decrease performance
+ since you're never allowed to have more or less than three sheets!
+
+
+ this Is the reference to the low level Workbook object
+
+
+ this holds the HSSFSheet objects attached to this workbook
+
+
+ this holds the HSSFName objects attached to this workbook
+
+
+ holds whether or not to preserve other nodes in the POIFS. Used
+ for macros and embedded objects.
+
+
+ Used to keep track of the data formatter so that all
+ CreateDataFormatter calls return the same one for a given
+ book. This Ensures that updates from one places Is visible
+ someplace else.
+
+
+ this holds the HSSFFont objects attached to this workbook.
+ We only create these from the low level records as required.
+
+
+
+ Totals the sizes of all sheet records and eventually serializes them
+
+
+
+
+ Creates new HSSFWorkbook from scratch (start here!)
+
+
+
+ Companion to HSSFWorkbook(POIFSFileSystem), this constructs the
+ POI filesystem around your inputstream, including all nodes.
+ This calls {@link #HSSFWorkbook(InputStream, boolean)} with
+ preserve nodes set to true.
+
+ @see #HSSFWorkbook(InputStream, boolean)
+ @see #HSSFWorkbook(POIFSFileSystem)
+ @see org.apache.poi.poifs.filesystem.POIFSFileSystem
+ @exception IOException if the stream cannot be read
+
+
+
+ given a POI POIFSFileSystem object, Read in its Workbook and populate the high and
+ low level models. If you're Reading in a workbook...start here.
+
+ the POI filesystem that Contains the Workbook stream.
+ whether to preseve other nodes, such as
+ macros. This takes more memory, so only say yes if you
+ need to. If Set, will store all of the POIFSFileSystem
+ in memory
+
+
+ Normally, the Workbook will be in a POIFS Stream
+ called "Workbook". However, some weird XLS generators use "WORKBOOK"
+
+
+
+ given a POI POIFSFileSystem object, and a specific directory
+ within it, Read in its Workbook and populate the high and
+ low level models. If you're Reading in a workbook...start here.
+
+ the POI filesystem directory to Process from
+ the POI filesystem that Contains the Workbook stream.
+ whether to preseve other nodes, such as
+ macros. This takes more memory, so only say yes if you
+ need to. If Set, will store all of the POIFSFileSystem
+ in memory
+
+
+ given a POI POIFSFileSystem object, and a specific directory
+ within it, read in its Workbook and populate the high and
+ low level models. If you're reading in a workbook...start here.
+
+ @param directory the POI filesystem directory to process from
+ @param preserveNodes whether to preseve other nodes, such as
+ macros. This takes more memory, so only say yes if you
+ need to. If set, will store all of the POIFSFileSystem
+ in memory
+ @see org.apache.poi.poifs.filesystem.POIFSFileSystem
+ @exception IOException if the stream cannot be read
+
+
+ Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your
+ inputstream.
+
+ @param s the POI filesystem that Contains the Workbook stream.
+ @param preserveNodes whether to preseve other nodes, such as
+ macros. This takes more memory, so only say yes if you
+ need to.
+ @see org.apache.poi.poifs.filesystem.POIFSFileSystem
+ @see #HSSFWorkbook(POIFSFileSystem)
+ @exception IOException if the stream cannot be Read
+
+
+ used internally to Set the workbook properties.
+
+
+
+ This is basically a kludge to deal with the now obsolete Label records. If
+ you have to read in a sheet that contains Label records, be aware that the rest
+ of the API doesn't deal with them, the low level structure only provides Read-only
+ semi-immutable structures (the Sets are there for interface conformance with NO
+ impelmentation). In short, you need to call this function passing it a reference
+ to the Workbook object. All labels will be converted to LabelSST records and their
+ contained strings will be written to the Shared String tabel (SSTRecord) within
+ the Workbook.
+
+ The records.
+ The offset.
+
+
+
+ Retrieves the current policy on what to do when
+ getting missing or blank cells from a row.
+ The default is to return blank and null cells.
+
+ The missing cell policy.
+
+
+
+ Sets the order of appearance for a given sheet.
+
+ the name of the sheet to reorder
+ the position that we want to Insert the sheet into (0 based)
+
+
+
+ Validates the index of the sheet.
+
+ The index.
+
+
+ Test only. Do not use
+
+
+
+ Selects a single sheet. This may be different to
+ the 'active' sheet (which Is the sheet with focus).
+
+ The index.
+
+
+
+ Sets the selected tabs.
+
+ The indexes.
+
+
+
+ Gets the tab whose data is actually seen when the sheet is opened.
+ This may be different from the "selected sheet" since excel seems to
+ allow you to show the data of one sheet when another Is seen "selected"
+ in the tabs (at the bottom).
+
+
+
+
+ Sets the tab whose data is actually seen when the sheet is opened.
+ This may be different from the "selected sheet" since excel seems to
+ allow you to show the data of one sheet when another Is seen "selected"
+ in the tabs (at the bottom).
+ The sheet number(0 based).
+
+
+
+
+ Gets or sets the first tab that is displayed in the list of tabs
+ in excel.
+
+
+
+ @deprecated POI will now properly handle Unicode strings without
+ forceing an encoding
+
+
+ @deprecated POI will now properly handle Unicode strings without
+ forceing an encoding
+
+
+
+ Set the sheet name.
+
+ The sheet number(0 based).
+ The name.
+
+
+
+ Get the sheet name
+
+ The sheet index.
+ Sheet name
+
+
+
+ Check whether a sheet is hidden
+
+ The sheet index.
+
+ true if sheet is hidden; otherwise, false.
+
+
+
+
+ Check whether a sheet is very hidden.
+ This is different from the normal
+ hidden status
+
+ The sheet index.
+
+ true if sheet is very hidden; otherwise, false.
+
+
+
+
+ Hide or Unhide a sheet
+
+ The sheet index
+ True to mark the sheet as hidden, false otherwise
+
+
+
+ Hide or unhide a sheet.
+
+ The sheet number
+ 0 for not hidden, 1 for hidden, 2 for very hidden
+
+
+
+ Returns the index of the sheet by his name
+
+ the sheet name
+ index of the sheet (0 based)
+
+
+
+ Returns the index of the given sheet
+
+ the sheet to look up
+ index of the sheet (0 based).-1
+ if not found
+
+
+
+ Returns the external sheet index of the sheet
+ with the given internal index, creating one
+ if needed.
+ Used by some of the more obscure formula and
+ named range things.
+
+ Index of the internal sheet.
+
+
+
+
+ Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and returns
+ the high level representation. Use this to Create new sheets.
+
+ HSSFSheet representing the new sheet.
+
+
+
+ Create an HSSFSheet from an existing sheet in the HSSFWorkbook.
+
+ the sheet index
+ HSSFSheet representing the Cloned sheet.
+
+
+
+ Gets the name of the unique sheet.
+
+ Name of the SRC.
+
+
+
+
+ Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and
+ returns the high level representation. Use this to Create new sheets.
+
+ sheetname to set for the sheet.
+ HSSFSheet representing the new sheet.
+
+
+
+ Get the number of spreadsheets in the workbook (this will be three after serialization)
+
+ The number of sheets.
+
+
+
+ Gets the sheets.
+
+
+
+
+
+ Get the HSSFSheet object at the given index.
+
+ index of the sheet number (0-based)
+ HSSFSheet at the provided index
+
+
+
+ Get sheet with the given name (case insensitive match)
+
+ name of the sheet
+ HSSFSheet with the name provided or null if it does not exist
+
+
+
+ Removes sheet at the given index.
+
+ index of the sheet (0-based)
+
+ Care must be taken if the Removed sheet Is the currently active or only selected sheet in
+ the workbook. There are a few situations when Excel must have a selection and/or active
+ sheet. (For example when printing - see Bug 40414).
+ This method makes sure that if the Removed sheet was active, another sheet will become
+ active in its place. Furthermore, if the Removed sheet was the only selected sheet, another
+ sheet will become selected. The newly active/selected sheet will have the same index, or
+ one less if the Removed sheet was the last in the workbook.
+
+
+
+
+ determine whether the Excel GUI will backup the workbook when saving.
+
+ the current Setting for backups.
+
+
+
+ Sets the repeating rows and columns for a sheet (as found in
+ File->PageSetup->Sheet). This Is function Is included in the workbook
+ because it Creates/modifies name records which are stored at the
+ workbook level.
+
+ 0 based index to sheet.
+ 0 based start of repeating columns.
+ 0 based end of repeating columns.
+ 0 based start of repeating rows.
+ 0 based end of repeating rows.
+
+ To set just repeating columns:
+ workbook.SetRepeatingRowsAndColumns(0,0,1,-1-1);
+ To set just repeating rows:
+ workbook.SetRepeatingRowsAndColumns(0,-1,-1,0,4);
+ To remove all repeating rows and columns for a sheet.
+ workbook.SetRepeatingRowsAndColumns(0,-1,-1,-1,-1);
+
+
+
+
+ Create a new Font and Add it to the workbook's font table
+
+ new font object
+
+
+
+ Finds a font that matches the one with the supplied attributes
+
+ The bold weight.
+ The color.
+ Height of the font.
+ The name.
+ if set to true [italic].
+ if set to true [strikeout].
+ The type offset.
+ The underline.
+
+
+
+
+ Get the number of fonts in the font table
+
+ The number of fonts.
+
+
+
+ Get the font at the given index number
+
+ The index number
+ HSSFFont at the index
+
+
+
+ Reset the fonts cache, causing all new calls
+ to getFontAt() to create new objects.
+ Should only be called after deleting fonts,
+ and that's not something you should normally do
+
+
+
+
+ Create a new Cell style and Add it to the workbook's style table
+
+ the new Cell Style object
+
+
+
+ Get the number of styles the workbook Contains
+
+ count of cell styles
+
+
+
+ Get the cell style object at the given index
+
+ index within the Set of styles
+ HSSFCellStyle object at the index
+
+
+ Closes the underlying {@link NPOIFSFileSystem} from which
+ the Workbook was read, if any. Has no effect on Workbooks
+ opened from an InputStream, or newly created ones.
+
+
+
+ Write out this workbook to an Outputstream. Constructs
+ a new POI POIFSFileSystem, passes in the workbook binary representation and
+ Writes it out.
+
+ the java OutputStream you wish to Write the XLS to
+
+
+
+ Get the bytes of just the HSSF portions of the XLS file.
+ Use this to construct a POI POIFSFileSystem yourself.
+
+ byte[] array containing the binary representation of this workbook and all contained
+ sheets, rows, cells, etc.
+
+
+ The locator of user-defined functions.
+ By default includes functions from the Excel Analysis Toolpack
+
+
+ Register a new toolpack in this workbook.
+
+ @param toopack the toolpack to register
+
+
+
+ Gets the workbook.
+
+ The workbook.
+
+
+
+ Gets the total number of named ranges in the workboko
+
+ The number of named ranges
+
+
+
+ Gets the Named range
+
+ position of the named range
+ named range high level
+
+
+
+ Gets the named range name
+
+ the named range index (0 based)
+ named range name
+
+
+
+ TODO - make this less cryptic / move elsewhere
+
+ Index to REF entry in EXTERNSHEET record in the Link Table
+ zero-based to DEFINEDNAME or EXTERNALNAME record
+ the string representation of the defined or external name
+
+
+
+ Sets the printarea for the sheet provided
+ i.e. Reference = $A$1:$B$2
+
+ Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
+ Valid name Reference for the Print Area
+
+
+
+ Sets the print area.
+
+ Zero-based sheet index (0 = First Sheet)
+ Column to begin printarea
+ Column to end the printarea
+ Row to begin the printarea
+ Row to end the printarea
+
+
+
+ Retrieves the reference for the printarea of the specified sheet, the sheet name Is Appended to the reference even if it was not specified.
+
+ Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
+ String Null if no print area has been defined
+
+
+
+ Delete the printarea for the sheet specified
+
+ Zero-based sheet index (0 = First Sheet)
+
+
+
+ Creates a new named range and Add it to the model
+
+ named range high level
+
+
+
+ Gets the named range index by his name
+ Note:
+ Excel named ranges are case-insensitive and
+ this method performs a case-insensitive search.
+
+ named range name
+ named range index
+
+
+
+ As GetNameIndex(String) is not necessarily unique
+ (name + sheet index is unique), this method is more accurate.
+
+ the name whose index in the list of names of this workbook should be looked up.
+ an index value >= 0 if the name was found; -1, if the name was not found
+
+
+
+ Remove the named range by his index
+
+ The named range index (0 based)
+
+
+
+ Creates the instance of HSSFDataFormat for this workbook.
+
+ the HSSFDataFormat object
+
+
+
+ Remove the named range by his name
+
+ named range name
+
+
+
+ As #removeName(String) is not necessarily unique (name + sheet index is unique),
+ this method is more accurate.
+
+ the name to remove.
+
+
+
+ Spits out a list of all the drawing records in the workbook.
+
+ if set to true [fat].
+
+
+
+ Adds a picture to the workbook.
+
+ The bytes of the picture
+ The format of the picture. One of
+ PictureType.
+ the index to this picture (1 based).
+
+
+
+ Gets all pictures from the Workbook.
+
+ the list of pictures (a list of HSSFPictureData objects.)
+
+
+
+ Performs a recursive search for pictures in the given list of escher records.
+
+ the escher records.
+ the list to populate with the pictures.
+
+
+
+ Adds the LinkTable records required to allow formulas referencing
+ the specified external workbook to be added to this one. Allows
+ formulas such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the
+ file, for workbooks not already referenced.
+
+ The name the workbook will be referenced as in formulas
+ The open workbook to fetch the link required information from
+
+
+
+
+ Is the workbook protected with a password (not encrypted)?
+
+
+ true if this instance is write protected; otherwise, false.
+
+
+
+
+ protect a workbook with a password (not encypted, just Sets Writeprotect
+ flags and the password.
+
+ password to set
+ The username.
+
+
+
+ Removes the Write protect flag
+
+
+
+
+ Gets all embedded OLE2 objects from the Workbook.
+
+ the list of embedded objects (a list of HSSFObjectData objects.)
+
+
+
+ Gets all embedded OLE2 objects from the Workbook.
+
+ the list of records to search.
+ the list of embedded objects to populate.
+
+
+
+ Recursively iterates a shape container to get all embedded objects.
+
+ the parent.
+ the list of embedded objects to populate.
+
+
+
+ Gets the new UID.
+
+ The new UID.
+
+
+
+ Support foreach ISheet, e.g.
+ HSSFWorkbook workbook = new HSSFWorkbook();
+ foreach(ISheet sheet in workbook) ...
+
+ Enumeration of all the sheets of this workbook
+
+
+
+ Whether the application shall perform a full recalculation when the workbook is opened.
+
+ Typically you want to force formula recalculation when you modify cell formulas or values
+ of a workbook previously created by Excel. When set to true, this flag will tell Excel
+ that it needs to recalculate all formulas in the workbook the next time the file is opened.
+
+ Note, that recalculation updates cached formula results and, thus, modifies the workbook.
+ Depending on the version, Excel may prompt you with "Do you want to save the changes in filename?"
+ on close.
+
+ Value is true if the application will perform a full recalculation of
+ workbook values when the workbook is opened.
+
+ since 3.8
+
+
+
+ Changes an external referenced file to another file.
+ A formular in Excel which refers a cell in another file is saved in two parts:
+ The referenced file is stored in an reference table. the row/cell information is saved separate.
+ This method invokation will only change the reference in the lookup-table itself.
+ @param oldUrl The old URL to search for and which is to be replaced
+ @param newUrl The URL replacement
+ @return true if the oldUrl was found and replaced with newUrl. Otherwise false
+
+
+ This class Creates OperationEval instances to help evaluate OperationPtg
+ formula tokens.
+
+ @author Josh Micich
+
+
+ returns the OperationEval concrete impl instance corresponding
+ to the supplied operationPtg
+
+
+ Allows the user to lookup the font metrics for a particular font without
+ actually having the font on the system. The font details are Loaded
+ as a resource from the POI jar file (or classpath) and should be contained
+ in path "/font_metrics.properties". The font widths are for a 10 point
+ version of the font. Use a multiplier for other sizes.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ The font metrics property file we're using
+
+
+ Our cache of font details we've alReady looked up
+
+
+ Retrieves the fake font details for a given font.
+ @param font the font to lookup.
+ @return the fake font.
+
+
+
+
+ A dummy record to indicate that we've now had the last
+ cell record for this row.
+
+
+ Returns the (0 based) number of the row we are
+ currently working on.
+
+
+ Returns the (0 based) number of the last column
+ seen for this row. You should have alReady been
+ called with that record.
+ This Is -1 in the case of there being no columns
+ for the row.
+
+
+ A dummy record for when we're missing a cell in a row,
+ but still want to trigger something
+
+
+ A dummy record for when we're missing a row, but still
+ want to trigger something
+
+
+ Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create
+ a listener supporting this interface and register it with the HSSFRequest (associating
+ it with Record SID's).
+
+ @see org.apache.poi.hssf.eventusermodel.HSSFEventFactory
+ @see org.apache.poi.hssf.eventusermodel.HSSFRequest
+ @see org.apache.poi.hssf.eventusermodel.HSSFUserException
+
+ @author Carey Sublette (careysub@earthling.net)
+
+
+
+ This method, inherited from HSSFListener Is implemented as a stub.
+ It Is never called by HSSFEventFActory or HSSFRequest.
+
+
+
+ Process an HSSF Record. Called when a record occurs in an HSSF file.
+ Provides two options for halting the Processing of the HSSF file.
+
+ The return value provides a means of non-error termination with a
+ user-defined result code. A value of zero must be returned to
+ continue Processing, any other value will halt Processing by
+ HSSFEventFactory with the code being passed back by
+ its abortable Process events methods.
+
+ Error termination can be done by throwing the HSSFUserException.
+
+ Note that HSSFEventFactory will not call the inherited Process
+
+ @return result code of zero for continued Processing.
+
+ @throws HSSFUserException User code can throw this to abort
+ file Processing by HSSFEventFactory and return diagnostic information.
+
+
+
+ When working with the EventUserModel, if you want to
+ Process formulas, you need an instance of
+ Workbook to pass to a HSSFWorkbook,
+ to finally give to HSSFFormulaParser,
+ and this will build you stub ones.
+ Since you're working with the EventUserModel, you
+ wouldn't want to Get a full Workbook and
+ HSSFWorkbook, as they would eat too much memory.
+ Instead, you should collect a few key records as they
+ go past, then call this once you have them to build a
+ stub Workbook, and from that a stub
+ HSSFWorkbook, to use with the HSSFFormulaParser.
+ The records you should collect are:
+ ExternSheetRecord
+ BoundSheetRecord
+ You should probably also collect SSTRecord,
+ but it's not required to pass this in.
+ To help, this class includes a HSSFListener wrapper
+ that will do the collecting for you.
+
+
+
+
+ Creates a stub Workbook from the supplied records,
+ suitable for use with the {@link HSSFFormulaParser}
+
+ The ExternSheetRecords in your file
+ The BoundSheetRecords in your file
+ TThe SSTRecord in your file.
+ A stub Workbook suitable for use with HSSFFormulaParser
+
+
+
+ Creates a stub workbook from the supplied records,
+ suitable for use with the HSSFFormulaParser
+
+ The ExternSheetRecords in your file
+ A stub Workbook suitable for use with HSSFFormulaParser
+ A stub Workbook suitable for use with {@link HSSFFormulaParser}
+
+
+
+ A wrapping HSSFListener which will collect
+ BoundSheetRecords and {@link ExternSheetRecord}s as
+ they go past, so you can Create a Stub {@link Workbook} from
+ them once required.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The child listener.
+
+
+
+ Gets the bound sheet records.
+
+
+
+
+
+ Gets the extern sheet records.
+
+
+
+
+
+ Gets the SST record.
+
+
+
+
+
+ Gets the stub HSSF workbook.
+
+
+
+
+
+ Gets the stub workbook.
+
+
+
+
+
+ Process this record ourselves, and then
+ pass it on to our child listener
+
+ The record.
+
+
+
+ Process the record ourselves, but do not
+ pass it on to the child Listener.
+
+ The record.
+
+
+ A proxy HSSFListener that keeps track of the document
+ formatting records, and provides an easy way to look
+ up the format strings used by cells from their ids.
+
+
+ Process this record ourselves, and then
+ pass it on to our child listener
+
+
+ Process the record ourselves, but do not
+ pass it on to the child Listener.
+ @param record
+
+
+ Formats the given numeric of date Cell's contents
+ as a String, in as close as we can to the way
+ that Excel would do so.
+ Uses the various format records to manage this.
+
+ TODO - move this to a central class in such a
+ way that hssf.usermodel can make use of it too
+
+
+ Returns the format string, eg $##.##, for the
+ given number format index.
+
+
+ Returns the format string, eg $##.##, used
+ by your cell
+
+
+ Returns the index of the format string, used by your cell,
+ or -1 if none found
+
+
+
+ Low level event based HSSF Reader. Pass either a DocumentInputStream to
+ Process events along with a request object or pass a POIFS POIFSFileSystem to
+ ProcessWorkbookEvents along with a request.
+ This will cause your file to be Processed a record at a time. Each record with
+ a static id matching one that you have registed in your HSSFRequest will be passed
+ to your associated HSSFListener.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Carey Sublette (careysub@earthling.net)
+
+
+
+
+ Creates a new instance of HSSFEventFactory
+
+
+
+
+ Processes a file into essentially record events.
+
+ an Instance of HSSFRequest which has your registered listeners
+ a POIFS filesystem containing your workbook
+
+
+
+ Processes a file into essentially record events.
+
+ an Instance of HSSFRequest which has your registered listeners
+ a POIFS filesystem containing your workbook
+ numeric user-specified result code.
+
+
+
+ Processes a DocumentInputStream into essentially Record events.
+ If an
+ AbortableHSSFListener
+ causes a halt to Processing during this call
+ the method will return just as with
+ abortableProcessEvents
+ , but no
+ user code or
+ HSSFUserException
+ will be passed back.
+
+ an Instance of HSSFRequest which has your registered listeners
+ a DocumentInputStream obtained from POIFS's POIFSFileSystem object
+
+
+
+ Processes a DocumentInputStream into essentially Record events.
+
+ an Instance of HSSFRequest which has your registered listeners
+ a DocumentInputStream obtained from POIFS's POIFSFileSystem object
+ numeric user-specified result code.
+
+
+
+ Processes a DocumentInputStream into essentially Record events.
+
+ an Instance of HSSFRequest which has your registered listeners
+ a DocumentInputStream obtained from POIFS's POIFSFileSystem object
+ numeric user-specified result code.
+
+
+
+ Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create
+ a listener supporting this interface and register it with the HSSFRequest (associating
+ it with Record SID's).
+ @author acoliver@apache.org
+
+
+
+
+ Process an HSSF Record. Called when a record occurs in an HSSF file.
+
+ The record.
+
+
+
+ A stream based way to Get at complete records, with
+ as low a memory footprint as possible.
+ This handles Reading from a RecordInputStream, turning
+ the data into full records, Processing continue records
+ etc.
+ Most users should use HSSFEventFactory
+ HSSFListener and have new records pushed to
+ them, but this does allow for a "pull" style of coding.
+
+
+
+ Have we run out of records on the stream?
+
+
+ Have we returned all the records there are?
+
+
+ Sometimes we end up with a bunch of
+ records. When we do, these should
+ be returned before the next normal
+ record Processing occurs (i.e. before
+ we Check for continue records and
+ return rec)
+
+
+ The next record to return, which may need to have its
+ continue records passed to it before we do
+
+
+ The most recent record that we gave to the user
+
+
+ The most recent DrawingRecord seen
+
+
+
+ Returns the next (complete) record from the
+ stream, or null if there are no more.
+
+
+
+
+
+ If there are any "bonus" records, that should
+ be returned before Processing new ones,
+ grabs the next and returns it.
+ If not, returns null;
+
+
+
+
+
+ Returns the next available record, or null if
+ this pass didn't return a record that's
+ suitable for returning (eg was a continue record).
+
+
+
+
+
+ An HSSFRequest object should be constructed registering an instance or multiple
+ instances of HSSFListener with each Record.sid you wish to listen for.
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Carey Sublette (careysub@earthling.net)
+
+
+
+
+ Creates a new instance of HSSFRequest
+
+
+
+
+ Add an event listener for a particular record type. The trick Is you have to know
+ what the records are for or just start with our examples and build on them. Alternatively,
+ you CAN call AddListenerForAllRecords and you'll recieve ALL record events in one listener,
+ but if you like to squeeze every last byte of efficiency out of life you my not like this.
+ (its sure as heck what I plan to do)
+
+ for the event
+ identifier for the record type this Is the .sid static member on the individual records
+
+
+
+ This Is the equivilent of calling AddListener(myListener, sid) for EVERY
+ record in the org.apache.poi.hssf.record package. This Is for lazy
+ people like me. You can call this more than once with more than one listener, but
+ that seems like a bad thing to do from a practice-perspective Unless you have a
+ compelling reason to do so (like maybe you send the event two places or log it or
+ something?).
+
+ a single listener to associate with ALL records
+
+
+
+ Called by HSSFEventFactory, passes the Record to each listener associated with
+ a record.sid.
+ Exception and return value Added 2002-04-19 by Carey Sublette
+
+ The record.
+ numeric user-specified result code. If zero continue Processing.
+
+
+
+ This exception Is provided as a way for API users to throw
+ exceptions from their event handling code. By doing so they
+ abort file Processing by the HSSFEventFactory and by
+ catching it from outside the HSSFEventFactory.ProcessEvents
+ method they can diagnose the cause for the abort.
+ The HSSFUserException supports a nested "reason"
+ throwable, i.e. an exception that caused this one to be thrown.
+ The HSSF package does not itself throw any of these
+ exceptions.
+
+
+ @author Rainer Klute (klute@rainer-klute.de)
+ @author Carey Sublette (careysub@earthling.net)
+
+
+
+
+ Creates a new HSSFUserException
+
+
+
+
+ Creates a new HSSFUserException with a message
+ string.
+
+ The MSG.
+
+
+
+ Creates a new HSSFUserException with a reason.
+
+ The reason.
+
+
+
+ Creates a new HSSFUserException with a message string
+ and a reason.
+
+ The MSG.
+ The reason.
+
+
+
+ A HSSFListener which tracks rows and columns, and will
+ trigger your HSSFListener for all rows and cells,
+ even the ones that aren't actually stored in the file.
+ This allows your code to have a more "Excel" like
+ view of the data in the file, and not have to worry
+ (as much) about if a particular row/cell Is in the
+ file, or was skipped from being written as it was
+ blank.
+
+
+
+
+ Constructs a new MissingRecordAwareHSSFListener, which
+ will fire ProcessRecord on the supplied child
+ HSSFListener for all Records, and missing records.
+
+ The HSSFListener to pass records on to
+
+
+
+ Process an HSSF Record. Called when a record occurs in an HSSF file.
+
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x07.
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x02.
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x03.
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x04.
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x01.
+
+
+
+
+ The xtHeader.drType field MUST be equal to 0x05.
+
+
+
+
+ An array of Unicode characters. The size of the array, in characters, is specified
+ by the cchValue field. The size of the field, in bytes, MUST equal the result of
+ the following formula:cchValue * 2.
+
+
+
+
+ The chartStyle.xtHeader.xmlTkTag MUST be equal to 0x0003.
+
+
+
+
+ The nInterval.xtHeader.xmlTkTag field MUST be equal to 0x0052.
+
+
+
+ Utility for delaying the concatenation of multiple byte arrays. Doing this up-front
+ causes significantly more copying, which for a large number of byte arrays can cost
+ a large amount of time.
+
+
+ Clears the array (sets the concatenated length back to zero.
+
+
+ Concatenates an array onto the end of our array.
+ This is a relatively fast operation.
+
+ @param array the array to concatenate.
+ @throws ArgumentException if {@code array} is {@code null}.
+
+
+ Gets the concatenated contents as a single byte array.
+
+ This is a slower operation, but the concatenated array is stored off as a single
+ array again so that subsequent calls will not perform Additional copying.
+
+ @return the byte array. Returns {@code null} if no data has been placed into it.
+
+
+
+ Various utility functions that make working with a cells and rows easier. The various
+ methods that deal with style's allow you to Create your HSSFCellStyles as you need them.
+ When you apply a style change to a cell, the code will attempt to see if a style already
+ exists that meets your needs. If not, then it will Create a new style. This is to prevent
+ creating too many styles. there is an upper limit in Excel on the number of styles that
+ can be supported.
+ @author Eric Pugh epugh@upstate.com
+
+
+
+
+ Get a row from the spreadsheet, and Create it if it doesn't exist.
+
+ The 0 based row number
+ The sheet that the row is part of.
+ The row indicated by the rowCounter
+
+
+
+ Get a specific cell from a row. If the cell doesn't exist,
+
+ The row that the cell is part of
+ The column index that the cell is in.
+ The cell indicated by the column.
+
+
+
+ Creates a cell, gives it a value, and applies a style if provided
+
+ the row to Create the cell in
+ the column index to Create the cell in
+ The value of the cell
+ If the style is not null, then Set
+ A new HSSFCell
+
+
+
+ Create a cell, and give it a value.
+
+ the row to Create the cell in
+ the column index to Create the cell in
+ The value of the cell
+ A new HSSFCell.
+
+
+
+ Translate color palette entries from the source to the destination sheet
+
+
+
+
+ Take a cell, and align it.
+
+ the cell to Set the alignment for
+ The workbook that is being worked with.
+ the column alignment to use.
+
+
+
+ Take a cell, and apply a font to it
+
+ the cell to Set the alignment for
+ The workbook that is being worked with.
+ The HSSFFont that you want to Set...
+
+
+ This method attempt to find an already existing HSSFCellStyle that matches
+ what you want the style to be. If it does not find the style, then it
+ Creates a new one. If it does Create a new one, then it applies the
+ propertyName and propertyValue to the style. This is necessary because
+ Excel has an upper limit on the number of Styles that it supports.
+
+ @param workbook The workbook that is being worked with.
+ @param propertyName The name of the property that is to be
+ changed.
+ @param propertyValue The value of the property that is to be
+ changed.
+ @param cell The cell that needs it's style changes
+ @exception NestableException Thrown if an error happens.
+
+
+
+ Returns a map containing the format properties of the given cell style.
+
+ cell style
+ map of format properties (String -> Object)
+
+
+
+ Sets the format properties of the given style based on the given map.
+
+ The cell style
+ The parent workbook.
+ The map of format properties (String -> Object).
+
+
+
+ Utility method that returns the named short value form the given map.
+ Returns zero if the property does not exist, or is not a {@link Short}.
+
+ The map of named properties (String -> Object)
+ The property name.
+ property value, or zero
+
+
+
+ Utility method that returns the named boolean value form the given map.
+ Returns false if the property does not exist, or is not a {@link Boolean}.
+
+ map of properties (String -> Object)
+ The property name.
+ property value, or false
+
+
+
+ Utility method that Puts the named short value to the given map.
+
+ The map of properties (String -> Object).
+ The property name.
+ The property value.
+
+
+
+ Utility method that Puts the named boolean value to the given map.
+
+ map of properties (String -> Object)
+ property name
+ property value
+
+
+
+ Looks for text in the cell that should be unicode, like alpha; and provides the
+ unicode version of it.
+
+ The cell to check for unicode values
+ transalted to unicode
+
+
+
+ Various utility functions that make working with a region of cells easier.
+ @author Eric Pugh epugh@upstate.com
+
+
+
+
+ For setting the same property on many cells to the same value
+
+
+
+
+ Sets the left border for a region of cells by manipulating the cell style
+ of the individual cells on the left
+
+ The new border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the leftBorderColor attribute of the HSSFRegionUtil object
+
+ The color of the border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the borderRight attribute of the HSSFRegionUtil object
+
+ The new border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the rightBorderColor attribute of the HSSFRegionUtil object
+
+ The color of the border
+ The region that should have the border
+ The workbook that the region is on.
+ The sheet that the region is on.
+
+
+
+ Sets the borderBottom attribute of the HSSFRegionUtil object
+
+ The new border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the bottomBorderColor attribute of the HSSFRegionUtil object
+
+ The color of the border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the borderBottom attribute of the HSSFRegionUtil object
+
+ The new border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+
+ Sets the topBorderColor attribute of the HSSFRegionUtil object
+
+ The color of the border
+ The region that should have the border
+ The sheet that the region is on.
+ The workbook that the region is on.
+
+
+ 4 bytes - little endian
+
+
+ 2 bytes - little endian
+
+
+ 2 bytes - little endian
+
+
+ 8 bytes - serialized as big endian, stored with inverted endianness here
+
+
+ Read a GUID in standard text form e.g.
+ 13579BDF-0246-8ACE-0123-456789ABCDEF
+ ->
+ 0x13579BDF, 0x0246, 0x8ACE 0x0123456789ABCDEF
+
+
+
Title: HSSFCellRangeAddress
+
Description:
+ Implementation of the cell range Address lists,like Is described in
+ OpenOffice.org's Excel Documentation .
+ In BIFF8 there Is a common way to store absolute cell range Address
+ lists in several records (not formulas). A cell range Address list
+ consists of a field with the number of ranges and the list of the range
+ Addresses. Each cell range Address (called an AddR structure) Contains
+ 4 16-bit-values.
+
Copyright: Copyright (c) 2004
+
Company:
+ @author Dragos Buleandra (dragos.buleandra@trade2b.ro)
+ @version 2.0-pre
+
+
+ Number of following AddR structures
+
+
+ List of AddR structures. Each structure represents a cell range
+
+
+ Construct a new HSSFCellRangeAddress object and Sets its fields appropriately .
+ Even this Isn't an Excel record , I kept the same behavior for reading/writing
+ the object's data as for a regular record .
+
+ @param in the RecordInputstream to read the record from
+
+
+ Get the number of following AddR structures.
+ The number of this structures Is automatically Set when reading an Excel file
+ and/or increased when you manually Add a new AddR structure .
+ This Is the reason there Isn't a Set method for this field .
+ @return number of AddR structures
+
+
+ Add an AddR structure .
+ @param first_row - the upper left hand corner's row
+ @param first_col - the upper left hand corner's col
+ @param last_row - the lower right hand corner's row
+ @param last_col - the lower right hand corner's col
+ @return the index of this AddR structure
+
+
+ Remove the AddR structure stored at the passed in index
+ @param index The AddR structure's index
+
+
+ return the AddR structure at the given index.
+ @return AddrStructure representing
+
+
+ Get the upper left hand corner column number
+ @return column number for the upper left hand corner
+
+
+ Get the upper left hand corner row number
+ @return row number for the upper left hand corner
+
+
+ Get the lower right hand corner column number
+ @return column number for the lower right hand corner
+
+
+ Get the lower right hand corner row number
+ @return row number for the lower right hand corner
+
+
+ Intends to provide support for the very evil index to triplet Issue and
+ will likely replace the color constants interface for HSSF 2.0.
+ This class Contains static inner class members for representing colors.
+ Each color has an index (for the standard palette in Excel (tm) ),
+ native (RGB) triplet and string triplet. The string triplet Is as the
+ color would be represented by Gnumeric. Having (string) this here Is a bit of a
+ collusion of function between HSSF and the HSSFSerializer but I think its
+ a reasonable one in this case.
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Brian Sanders (bsanders at risklabs dot com) - full default color palette
+
+
+ Creates a new instance of HSSFColor
+
+
+ this function returns all colors in a hastable. Its not implemented as a
+ static member/staticly initialized because that would be dirty in a
+ server environment as it Is intended. This means you'll eat the time
+ it takes to Create it once per request but you will not hold onto it
+ if you have none of those requests.
+
+ @return a hashtable containing all colors keyed by int excel-style palette indexes
+
+
+ This function returns all the Colours, stored in a Hashtable that
+ can be edited. No caching is performed. If you don't need to edit
+ the table, then call {@link #getIndexHash()} which returns a
+ statically cached imuatable map of colours.
+
+
+
+ this function returns all colors in a hastable. Its not implemented as a
+ static member/staticly initialized because that would be dirty in a
+ server environment as it Is intended. This means you'll eat the time
+ it takes to Create it once per request but you will not hold onto it
+ if you have none of those requests.
+
+ a hashtable containing all colors keyed by String gnumeric-like triplets
+
+
+ @return index to the standard palette
+
+
+ @return triplet representation like that in Excel
+
+
+ @return a hex string exactly like a gnumeric triplet
+
+
+ Class BLACK
+
+
+
+ Class BROWN
+
+
+
+ Class OLIVE_GREEN
+
+
+
+ Class DARK_GREEN
+
+
+
+ Class DARK_TEAL
+
+
+
+ Class DARK_BLUE
+
+
+
+ Class INDIGO
+
+
+
+ Class GREY_80_PERCENT
+
+
+
+ Class DARK_RED
+
+
+
+ Class ORANGE
+
+
+
+ Class DARK_YELLOW
+
+
+
+ Class GREEN
+
+
+
+ Class TEAL
+
+
+
+ Class BLUE
+
+
+
+ Class BLUE_GREY
+
+
+
+ Class GREY_50_PERCENT
+
+
+
+ Class RED
+
+
+
+ Class LIGHT_ORANGE
+
+
+
+ Class LIME
+
+
+
+ Class SEA_GREEN
+
+
+
+ Class AQUA
+
+
+
+ Class GREY_40_PERCENT
+
+
+
+ Class TURQUOISE
+
+
+
+ Class SKY_BLUE
+
+
+
+ Class PLUM
+
+
+
+ Class GREY_25_PERCENT
+
+
+
+ Class ROSE
+
+
+
+ Class TAN
+
+
+
+ Class LIGHT_YELLOW
+
+
+
+ Class LIGHT_GREEN
+
+
+
+ Class LIGHT_TURQUOISE
+
+
+
+ Class PALE_BLUE
+
+
+
+ Class LAVENDER
+
+
+
+ Class WHITE
+
+
+
+ Class CORNFLOWER_BLUE
+
+
+ Class LEMON_CHIFFON
+
+
+ Class MAROON
+
+
+ Class ORCHID
+
+
+ Class CORAL
+
+
+ Class ROYAL_BLUE
+
+
+ Class LIGHT_CORNFLOWER_BLUE
+
+
+ Special Default/Normal/Automatic color.
+ Note: This class Is NOT in the default HashTables returned by HSSFColor.
+ The index Is a special case which Is interpreted in the various SetXXXColor calls.
+
+ @author Jason
+
+
+
+ * Title: Range Address
+ * Description: provides connectivity utilities for ranges
+ *
+ *
+ * REFERENCE:
+ * @author IgOr KaTz & EuGeNe BuMaGiN (Tal Moshaiov) (VistaPortal LDT.)
+ @version 1.0
+
+
+ Accepts an external reference from excel.
+
+ i.e. Sheet1!$A$4:$B$9
+ @param _url
+
+
+
+ @return String note: All absolute references are Removed
+
+
+ Utility class for helping convert RK numbers.
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Rolf-J黵gen Moll
+
+ @see org.apache.poi.hssf.record.MulRKRecord
+ @see org.apache.poi.hssf.record.RKRecord
+
+
+ Do the dirty work of decoding; made a private static method to
+ facilitate testing the algorithm
+
+
+ An ERFListener Is registered with the EventRecordFactory.
+ An ERFListener listens for Records coming from the stream
+ via the EventRecordFactory
+
+ @see EventRecordFactory
+ @author Andrew C. Oliver acoliver@apache.org
+
+
+ Process a Record. This method Is called by the
+ EventRecordFactory when a record Is returned.
+ @return bool specifying whether the effort was a success.
+
+
+ Event-based record factory. As opposed to RecordFactory
+ this refactored version throws record events as it comes
+ accross the records. I throws the "lazily" one record behind
+ to ensure that ContinueRecords are Processed first.
+
+ @author Andrew C. Oliver (acoliver@apache.org) - probably to blame for the bugs (so yank his chain on the list)
+ @author Marc Johnson (mjohnson at apache dot org) - methods taken from RecordFactory
+ @author Glen Stampoultzis (glens at apache.org) - methods taken from RecordFactory
+ @author Csaba Nagy (ncsaba at yahoo dot com)
+
+
+ Create an EventRecordFactory
+ @param abortable specifies whether the return from the listener
+ handler functions are obeyed. False means they are ignored. True
+ means the event loop exits on error.
+
+
+ sends the record event to all registered listeners.
+ @param record the record to be thrown.
+ @return false to abort. This aborts
+ out of the event loop should the listener return false
+
+
+ Create an array of records from an input stream
+
+ @param in the InputStream from which the records will be
+ obtained
+
+ @exception RecordFormatException on error Processing the
+ InputStream
+
+
+
+ An abstract shape Is the lowlevel model for a shape.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Create a new shape object used to Create the escher records.
+
+ The simple shape this Is based on.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+ The sp container.
+
+
+
+ The object record that Is associated with this shape.
+
+ The obj record.
+
+
+
+ Creates an escher anchor record from a HSSFAnchor.
+
+ The high level anchor to Convert.
+ An escher anchor record.
+
+
+
+ Add standard properties to the opt record. These properties effect
+ all records.
+
+ The user model shape.
+ The opt record to Add the properties to.
+ The number of options Added.
+
+
+
+ Generate id for the CommonObjectDataSubRecord that stands behind this shape
+
+ shape id as generated by drawing manager
+ object id that will be assigned to the Obj record
+
+
+ Creates the low evel records for a combobox.
+
+ @param hssfShape The highlevel shape.
+ @param shapeId The shape id to use for this shape.
+
+
+ Creates the low level OBJ record for this shape.
+
+
+ Generates the escher shape records for this shape.
+
+
+
+ Represents a cell comment.
+ This class Converts highlevel model data from HSSFComment
+ to low-level records.
+ @author Yegor Kozlov
+
+
+
+
+ Creates the low-level records for a comment.
+
+ The highlevel shape.
+ The shape id to use for this shape.
+
+
+
+ Creates the low level NoteRecord
+ which holds the comment attributes.
+
+ The shape.
+ The shape id.
+
+
+
+
+ Sets standard escher options for a comment.
+ This method is responsible for Setting default background,
+ shading and other comment properties.
+
+ The highlevel shape.
+ The escher records holding the proerties
+ The number of escher options added
+
+
+
+ Gets the NoteRecord holding the comment attributes
+
+ The NoteRecord
+
+
+
+ Creates the anchor.
+
+ The user anchor.
+
+
+
+ Provides utilities to manage drawing Groups.
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Allocates new shape id for the new drawing Group id.
+
+ @return a new shape id.
+
+
+
+ Provides utilities to manage drawing Groups.
+
+
+ Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Clears the cached list of drawing Groups
+
+
+
+
+ Allocates new shape id for the new drawing Group id.
+
+
+ a new shape id.
+
+
+
+ Allocates new shape id for the new drawing group id.
+
+
+
+ a new shape id.
+
+
+
+ Finds the next available (1 based) drawing Group id
+
+
+
+
+ HSSF wrapper for the {@link FormulaParser} and {@link FormulaRenderer}
+
+ @author Josh Micich
+
+
+ Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int)}
+
+
+ @param formulaType a constant from {@link FormulaType}
+ @return the parsed formula tokens
+
+
+ @param formula the formula to parse
+ @param workbook the parent workbook
+ @param formulaType a constant from {@link FormulaType}
+ @param sheetIndex the 0-based index of the sheet this formula belongs to.
+ The sheet index is required to resolve sheet-level names. -1 means that
+ the scope of the name will be ignored and the parser will match named ranges only by name
+
+ @return the parsed formula tokens
+
+
+ Static method to convert an array of {@link Ptg}s in RPN order
+ to a human readable string format in infix mode.
+ @param book used for defined names and 3D references
+ @param ptgs must not be null
+ @return a human readable String
+
+
+
+ Represents a line shape and Creates all the line specific low level records.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Creates the line shape from the highlevel user shape. All low level
+ records are Created at this point.
+
+ The user model shape
+ The identifier to use for this shape.
+
+
+
+ Creates the lowerlevel escher records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Creates the low level OBJ record for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+
+
+
+
+ The object record that is associated with this shape.
+
+
+
+
+ Link Table (OOO pdf reference: 4.10.3 )
+
+ The main data of all types of references is stored in the Link Table inside the Workbook Globals
+ Substream (4.2.5). The Link Table itself is optional and occurs only, if there are any
+ references in the document.
+
+
+ In BIFF8 the Link Table consists of
+
+
zero or more EXTERNALBOOK Blocks
+ each consisting of
+
+
exactly one EXTERNALBOOK (0x01AE) record
+
zero or more EXTERNALNAME (0x0023) records
+
zero or more CRN Blocks
+ each consisting of
+
+
exactly one XCT (0x0059)record
+
zero or more CRN (0x005A) records (documentation says one or more)
+
+
+
+
+
zero or one EXTERNSHEET (0x0017) record
+
zero or more DEFINEDNAME (0x0018) records
+
+
+
+ @author Josh Micich
+
+
+ Create a new block for registering add-in functions
+
+ @see org.apache.poi.hssf.model.LinkTable#addNameXPtg(String)
+
+
+ Create a new block for external references.
+
+
+ Create a new block for internal references. It is called when constructing a new LinkTable.
+
+ @see org.apache.poi.hssf.model.LinkTable#LinkTable(int, WorkbookRecordList)
+
+
+ Performs case-insensitive search
+ @return -1 if not found
+
+
+ TODO - would not be required if calling code used RecordStream or similar
+
+
+ @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg}
+ @return -1 if the reference is to an external book
+
+
+ @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg}
+ @return -1 if the reference is to an external book
+
+
+ Finds the external name definition for the given name,
+ optionally restricted by externsheet index, and returns
+ (if found) as a NameXPtg.
+ @param sheetRefIndex The Extern Sheet Index to look for, or -1 if any
+
+
+ Register an external name in this workbook
+
+ @param name the name to register
+ @return a NameXPtg describing this name
+
+
+ copied from Workbook
+
+
+ Changes an external referenced file to another file.
+ A formular in Excel which refers a cell in another file is saved in two parts:
+ The referenced file is stored in an reference table. the row/cell information is saved separate.
+ This method invokation will only change the reference in the lookup-table itself.
+ @param oldUrl The old URL to search for and which is to be replaced
+ @param newUrl The URL replacement
+ @return true if the oldUrl was found and replaced with newUrl. Otherwise false
+
+
+ Represents a syntactic element from a formula by encapsulating the corresponding Ptg
+ token. Each ParseNode may have child ParseNodes in the case when the wrapped
+ Ptg is non-atomic.
+
+ @author Josh Micich
+
+
+
+ Collects the array of Ptg
+ tokens for the specified tree.
+
+ The root node.
+
+
+
+
+ The IF() function Gets marked up with two or three tAttr tokens.
+ Similar logic will be required for CHOOSE() when it is supported
+ See excelfileformat.pdf sec 3.10.5 "tAttr (19H)
+
+ The temp.
+
+
+
+ Represents a picture shape and Creates all specific low level records.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Creates the line shape from the highlevel user shape. All low level
+ records are Created at this point.
+
+ The user model shape.
+ The identifier to use for this shape.
+
+
+
+ Creates the lowerlevel escher records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Creates the low level OBJ record for this shape.
+
+ The HSSFShape.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+
+
+
+
+ The object record that is associated with this shape.
+
+
+
+
+
+ Creates the low evel records for an polygon.
+
+ The highlevel shape.
+ The shape id to use for this shape.
+
+
+
+ Creates the lowerlevel escher records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Creates the lowerlevel OBJ records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+
+
+
+
+ The object record that is associated with this shape.
+
+
+
+
+ Finds correct insert positions for records in workbook streams
+
+ See OOO excelfileformat.pdf sec. 4.2.5 'Record Order in a BIFF8 Workbook Stream'
+
+ @author Josh Micich
+
+
+ Adds the specified new record in the correct place in sheet records list
+
+
+
+
+ Finds the index where the protection block should be inserted
+
+ the records for this sheet
+
+
+ + BOF
+ o INDEX
+ o Calculation Settings Block
+ o PRINTHEADERS
+ o PRINTGRIDLINES
+ o GRIDSET
+ o GUTS
+ o DEFAULTROWHEIGHT
+ o SHEETPR
+ o Page Settings Block
+ o Worksheet Protection Block
+ o DEFCOLWIDTH
+ oo COLINFO
+ o SORT
+ + DIMENSION
+
+
+
+
+ These records may occur between the 'Worksheet Protection Block' and DIMENSION:
+
+
+
+
+ o DEFCOLWIDTH
+ oo COLINFO
+ o SORT
+
+
+
+
+ Find correct position to add new CFHeader record
+
+
+
+
+
+ Finds the index where the sheet validations header record should be inserted
+ @param records the records for this sheet
+
+ + WINDOW2
+ o SCL
+ o PANE
+ oo SELECTION
+ o STANDARDWIDTH
+ oo MERGEDCELLS
+ o LABELRANGES
+ o PHONETICPR
+ o Conditional Formatting Table
+ o Hyperlink Table
+ o Data Validity Table
+ o SHEETLAYOUT
+ o SHEETPROTECTION
+ o RANGEPROTECTION
+ + EOF
+
+
+ DIMENSIONS record is always present
+
+
+
+ if the specified record ID terminates a sequence of Row block records
+ It is assumed that at least one row or cell value record has been found prior to the current
+ record
+
+
+
+
+
+
+ Whether the specified record id normally appears in the row blocks section of the sheet records
+
+
+
+
+
+
+ Simplifies iteration over a sequence of Record objects.
+ @author Josh Micich
+
+
+
+
+ Determines whether this instance has next.
+
+
+ true if this instance has next; otherwise, false.
+
+
+
+
+ Gets the next record
+
+
+
+
+
+ Peeks the next sid.
+
+ -1 if at end of records
+
+
+
+ Peeks the next class.
+
+ the class of the next Record.return null if this stream Is exhausted.
+
+
+ Segregates the 'Row Blocks' section of a single sheet into plain row/cell records and
+ shared formula records.
+
+ @author Josh Micich
+
+
+ Also collects any loose MergeCellRecords and puts them in the supplied
+ mergedCellsTable
+
+
+ Some unconventional apps place {@link MergeCellsRecord}s within the row block. They
+ actually should be in the {@link MergedCellsTable} which is much later (see bug 45699).
+ @return any loose MergeCellsRecords found
+
+
+ @return a {@link RecordStream} containing all the non-{@link SharedFormulaRecord}
+ non-{@link ArrayRecord} and non-{@link TableRecord} Records.
+
+
+
+ Low level model implementation of a Sheet (one workbook Contains many sheets)
+ This file Contains the low level binary records starting at the sheets BOF and
+ ending with the sheets EOF. Use HSSFSheet for a high level representation.
+
+ The structures of the highlevel API use references to this to perform most of their
+ operations. Its probably Unwise to use these low level structures directly Unless you
+ really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's
+ Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf
+ before even attempting to use this.
+
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Shawn Laubach (slaubach at apache dot org) Gridlines, Headers, Footers, PrintSetup, and Setting Default Column Styles
+ @author Jason Height (jheight at chariot dot net dot au) Clone support. DBCell and Index Record writing support
+ @author Brian Sanders (kestrel at burdell dot org) Active Cell support
+ @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little)
+
+
+
+ java object always present, but if empty no BIFF records are written
+
+
+ the DimensionsRecord is always present
+
+
+ Add an UncalcedRecord if not true indicating formulas have not been calculated
+
+
+
+ Clones the low level records of this sheet and returns the new sheet instance.
+ This method is implemented by Adding methods for deep cloning to all records that
+ can be Added to a sheet. The Record object does not implement Cloneable.
+ When Adding a new record, implement a public Clone method if and only if the record
+ belongs to a sheet.
+
+
+
+
+
+ get the NEXT value record (from LOC). The first record that is a value record
+ (starting at LOC) will be returned.
+ This method is "loc" sensitive. Meaning you need to set LOC to where you
+ want it to start searching. If you don't know do this: setLoc(getDimsLoc).
+ When adding several rows you can just start at the last one by leaving loc
+ at what this sets it to. For this method, set loc to dimsloc to start with,
+ subsequent calls will return values in (physical) sequence or NULL when you get to the end.
+
+ the next value record or NULL if there are no more
+
+
+
+ Creates the sheet.
+
+ The stream.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The stream.
+
+
+
+ Creates a sheet with all the usual records minus values and the "index"
+ record (not required). Sets the location pointer to where the first value
+ records should go. Use this to Create a sheet from "scratch".
+
+ Sheet object with all values Set to defaults
+
+
+
+ Adds the merged region.
+
+ the row index From
+ The column index From.
+ The row index To
+ The column To.
+
+
+
+
+ Removes the merged region.
+
+ The index.
+
+
+
+ Gets the column infos.
+
+ The column infos.
+
+
+
+ Gets the merged region at.
+
+ The index.
+
+
+
+
+ Gets the number of merged regions.
+
+ The number merged regions.
+
+
+
+ Gets the number of conditional formattings.
+
+ The number of conditional formattings.
+
+
+
+ Per an earlier reported bug in working with Andy Khan's excel Read library. This
+ Sets the values in the sheet's DimensionsRecord object to be correct. Excel doesn't
+ really care, but we want to play nice with other libraries.
+
+ The first row.
+ The first column.
+ The last row.
+ The last column.
+
+
+
+ Gets or Sets the preoffset when using DBCELL records (currently Unused) - this Is
+ the position of this sheet within the whole file.
+
+ the offset of the sheet's BOF within the file.
+
+
+
+ Create a row record. (does not Add it to the records contained in this sheet)
+
+ row number
+ RowRecord Created for the passed in row number
+
+
+
+ Create a LABELSST Record (does not Add it to the records contained in this sheet)
+
+ the row the LabelSST Is a member of
+ the column the LabelSST defines
+ the index of the string within the SST (use workbook AddSSTString method)
+ LabelSSTRecord newly Created containing your SST Index, row,col.
+
+
+
+ Create a NUMBER Record (does not Add it to the records contained in this sheet)
+
+ the row the NumberRecord is a member of
+ the column the NumberRecord defines
+ value for the number record
+ NumberRecord for that row, col containing that value as Added to the sheet
+
+
+
+ Create a BLANK record (does not Add it to the records contained in this sheet)
+
+ the row the BlankRecord is a member of
+ the column the BlankRecord is a member of
+
+
+
+
+ Adds a value record to the sheet's contained binary records
+ (i.e. LabelSSTRecord or NumberRecord).
+ This method is "loc" sensitive. Meaning you need to Set LOC to where you
+ want it to start searching. If you don't know do this: SetLoc(GetDimsLoc).
+ When Adding several rows you can just start at the last one by leaving loc
+ at what this Sets it to.
+
+ the row to Add the cell value to
+ the cell value record itself.
+
+
+
+ Remove a value record from the records array.
+ This method is not loc sensitive, it Resets loc to = dimsloc so no worries.
+
+ the row of the value record you wish to Remove
+ a record supporting the CellValueRecordInterface.
+
+
+
+ Replace a value record from the records array.
+ This method is not loc sensitive, it Resets loc to = dimsloc so no worries.
+
+ a record supporting the CellValueRecordInterface. this will Replace
+ the cell value with the same row and column. If there Isn't one, one will
+ be Added.
+
+
+
+ Adds a row record to the sheet
+ This method is "loc" sensitive. Meaning you need to Set LOC to where you
+ want it to start searching. If you don't know do this: SetLoc(GetDimsLoc).
+ When Adding several rows you can just start at the last one by leaving loc
+ at what this Sets it to.
+
+ the row record to be Added
+
+
+
+ Removes a row record
+ This method is not loc sensitive, it Resets loc to = dimsloc so no worries.
+
+ the row record to Remove
+
+
+
+ Get the NEXT RowRecord (from LOC). The first record that is a Row record
+ (starting at LOC) will be returned.
+ This method is "loc" sensitive. Meaning you need to Set LOC to where you
+ want it to start searching. If you don't know do this: SetLoc(GetDimsLoc).
+ When Adding several rows you can just start at the last one by leaving loc
+ at what this Sets it to. For this method, Set loc to dimsloc to start with.
+ subsequent calls will return rows in (physical) sequence or NULL when you Get to the end.
+
+ RowRecord representing the next row record or NULL if there are no more
+
+
+
+ Get the NEXT (from LOC) RowRecord where rownumber matches the given rownum.
+ The first record that is a Row record (starting at LOC) that has the
+ same rownum as the given rownum will be returned.
+ This method is "loc" sensitive. Meaning you need to Set LOC to where you
+ want it to start searching. If you don't know do this: SetLoc(GetDimsLoc).
+ When Adding several rows you can just start at the last one by leaving loc
+ at what this Sets it to. For this method, Set loc to dimsloc to start with.
+ subsequent calls will return rows in (physical) sequence or NULL when you Get to the end.
+
+ which row to return (careful with LOC)
+ RowRecord representing the next row record or NULL if there are no more
+
+
+
+ Gets the page settings.
+
+
+
+
+
+ Creates the BOF record
+
+ record containing a BOFRecord
+
+
+
+ Creates the Index record - not currently used
+
+ record containing a IndexRecord
+
+
+
+ Creates the CalcMode record and Sets it to 1 (automatic formula caculation)
+
+ record containing a CalcModeRecord
+
+
+
+ Creates the CalcCount record and Sets it to 0x64 (default number of iterations)
+
+ record containing a CalcCountRecord
+
+
+
+ Creates the RefMode record and Sets it to A1 Mode (default reference mode)
+
+ record containing a RefModeRecord
+
+
+
+ Creates the Iteration record and Sets it to false (don't iteratively calculate formulas)
+
+ record containing a IterationRecord
+
+
+
+ Creates the Delta record and Sets it to 0.0010 (default accuracy)
+
+ record containing a DeltaRecord
+
+
+
+ Creates the SaveRecalc record and Sets it to true (recalculate before saving)
+
+ record containing a SaveRecalcRecord
+
+
+
+ Creates the PrintHeaders record and Sets it to false (we don't Create headers yet so why print them)
+
+ record containing a PrintHeadersRecord
+
+
+
+ Creates the PrintGridlines record and Sets it to false (that makes for ugly sheets). As far as I can
+ tell this does the same thing as the GridsetRecord
+
+ record containing a PrintGridlinesRecord
+
+
+
+ Creates the GridSet record and Sets it to true (user has mucked with the gridlines)
+
+ record containing a GridsetRecord
+
+
+
+ Creates the Guts record and Sets leftrow/topcol guttter and rowlevelmax/collevelmax to 0
+
+ record containing a GutsRecordRecord
+
+
+
+ Creates the DefaultRowHeight Record and Sets its options to 0 and rowheight to 0xff
+
+
+
+ record containing a DefaultRowHeightRecord
+
+
+ Creates the WSBoolRecord and Sets its values to defaults
+ @see org.apache.poi.hssf.record.WSBoolRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a WSBoolRecord
+
+
+ Creates the HCenter Record and Sets it to false (don't horizontally center)
+ @see org.apache.poi.hssf.record.HCenterRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a HCenterRecord
+
+
+ Creates the VCenter Record and Sets it to false (don't horizontally center)
+ @see org.apache.poi.hssf.record.VCenterRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a VCenterRecord
+
+
+ Creates the PrintSetup Record and Sets it to defaults and marks it invalid
+ @see org.apache.poi.hssf.record.PrintSetupRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a PrintSetupRecord
+
+
+ Creates the DefaultColWidth Record and Sets it to 8
+ @see org.apache.poi.hssf.record.DefaultColWidthRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a DefaultColWidthRecord
+
+
+ Get the default column width for the sheet (if the columns do not define their own width)
+ @return default column width
+
+
+ Get the default row height for the sheet (if the rows do not define their own height)
+ @return default row height
+
+
+ Get the width of a given column in Units of 1/256th of a Char width
+ @param column index
+ @see org.apache.poi.hssf.record.DefaultColWidthRecord
+ @see org.apache.poi.hssf.record.ColumnInfoRecord
+ @see #SetColumnWidth(short,short)
+ @return column width in Units of 1/256th of a Char width
+
+
+ Get the index to the ExtendedFormatRecord "associated" with
+ the column at specified 0-based index. (In this case, an
+ ExtendedFormatRecord index is actually associated with a
+ ColumnInfoRecord which spans 1 or more columns)
+
+ Returns the index to the default ExtendedFormatRecord (0xF)
+ if no ColumnInfoRecord exists that includes the column
+ index specified.
+ @param column
+ @return index of ExtendedFormatRecord associated with
+ ColumnInfoRecord that includes the column index or the
+ index of the default ExtendedFormatRecord (0xF)
+
+
+ Set the width for a given column in 1/256th of a Char width Units
+ @param column - the column number
+ @param width (in Units of 1/256th of a Char width)
+
+
+ Get the hidden property for a given column.
+ @param column index
+ @see org.apache.poi.hssf.record.DefaultColWidthRecord
+ @see org.apache.poi.hssf.record.ColumnInfoRecord
+ @see #SetColumnHidden(short,bool)
+ @return whether the column is hidden or not.
+
+
+ Get the hidden property for a given column.
+ @param column - the column number
+ @param hidden - whether the column is hidden or not
+
+
+ Creates an outline Group for the specified columns.
+ @param fromColumn Group from this column (inclusive)
+ @param toColumn Group to this column (inclusive)
+ @param indent if true the Group will be indented by one level,
+ if false indenting will be Removed by one level.
+
+
+ Creates the Dimensions Record and Sets it to bogus values (you should Set this yourself
+ or let the high level API do it for you)
+ @see org.apache.poi.hssf.record.DimensionsRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a DimensionsRecord
+
+
+ Creates the WindowTwo Record and Sets it to:
+ options = 0x6b6
+ toprow = 0
+ leftcol = 0
+ headercolor = 0x40
+ pagebreakzoom = 0x0
+ normalzoom = 0x0
+ @see org.apache.poi.hssf.record.WindowTwoRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a WindowTwoRecord
+
+
+
+ Creates the Selection record and Sets it to nothing selected
+
+ record containing a SelectionRecord
+
+
+
+ Gets or sets the top row.
+
+ The top row.
+
+
+
+ Gets or sets the left col.
+
+ The left col.
+
+
+
+ Sets the active cell.
+
+ The row.
+ The column.
+
+
+
+ Sets the active cell range.
+
+ The firstrow.
+ The lastrow.
+ The firstcolumn.
+ The lastcolumn.
+
+
+
+ Sets the active cell range.
+
+ The cellranges.
+ The index of the active range.
+ The active row in the active range
+ The active column in the active range
+
+
+
+ Returns the active row
+
+ the active row index
+ @see org.apache.poi.hssf.record.SelectionRecord
+
+
+
+ Gets the active cell col.
+
+ the active column index
+ @see org.apache.poi.hssf.record.SelectionRecord
+
+
+
+ Creates the EOF record
+
+ record containing a EOFRecord
+
+
+
+ Gets the gridset record for this sheet.
+
+ The gridset record.
+
+
+
+ Returns the first occurance of a record matching a particular sid.
+
+ The sid.
+
+
+
+
+ Sets the SCL record or Creates it in the correct place if it does not
+ already exist.
+
+ The record to set.
+
+
+ Finds the first occurance of a record matching a particular sid and
+ returns it's position.
+ @param sid the sid to search for
+ @return the record position of the matching record or -1 if no match
+ is made.
+
+
+
+ Gets or sets the header.
+
+ the HeaderRecord.
+
+
+
+ Gets or sets a value indicating whether this instance is auto tab color.
+
+
+ true if this instance is auto tab color; otherwise, false.
+
+
+
+
+ Gets or sets the footer.
+
+ FooterRecord for the sheet.
+
+
+ Returns the PrintSetupRecord.
+ @return PrintSetupRecord for the sheet.
+
+
+ @return true if gridlines are printed
+
+
+ Returns the PrintGridlinesRecord.
+ @return PrintGridlinesRecord for the sheet.
+
+
+ Sets whether the sheet is selected
+ @param sel True to select the sheet, false otherwise.
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane Is overwritten.
+ @param colSplit Horizonatal position of split.
+ @param rowSplit Vertical position of split.
+ @param topRow Top row visible in bottom pane
+ @param leftmostColumn Left column visible in right pane.
+
+
+ Creates a split pane. Any existing freezepane or split pane is overwritten.
+ @param xSplitPos Horizonatal position of split (in 1/20th of a point).
+ @param ySplitPos Vertical position of split (in 1/20th of a point).
+ @param topRow Top row visible in bottom pane
+ @param leftmostColumn Left column visible in right pane.
+ @param activePane Active pane. One of: PANE_LOWER_RIGHT,
+ PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
+ @see #PANE_LOWER_LEFT
+ @see #PANE_LOWER_RIGHT
+ @see #PANE_UPPER_LEFT
+ @see #PANE_UPPER_RIGHT
+
+
+ Returns the information regarding the currently configured pane (split or freeze).
+ @return null if no pane configured, or the pane information.
+
+
+ creates a Password record with password set to 00.
+
+
+ creates a Protect record with protect set to false.
+
+
+ Creates an ObjectProtect record with protect Set to false.
+ @see org.apache.poi.hssf.record.ObjectProtectRecord
+ @see org.apache.poi.hssf.record.Record
+ @return an ObjectProtectRecord
+
+
+ Creates a ScenarioProtect record with protect Set to false.
+ @see org.apache.poi.hssf.record.ScenarioProtectRecord
+ @see org.apache.poi.hssf.record.Record
+ @return a ScenarioProtectRecord
+
+
+ Returns if gridlines are Displayed.
+ @return whether gridlines are Displayed
+
+
+ Returns if formulas are Displayed.
+ @return whether formulas are Displayed
+
+
+ Returns if RowColHeadings are Displayed.
+ @return whether RowColHeadings are Displayed
+
+
+ @return whether an Uncalced record must be Inserted or not at generation
+
+
+
+ Finds the DrawingRecord for our sheet, and attaches it to the DrawingManager (which knows about
+ the overall DrawingGroup for our workbook).
+ If requested, will Create a new DrawRecord if none currently exist
+
+ The DrawingManager2 for our workbook
+ Should one be Created if missing?
+ location of EscherAggregate record. if no EscherAggregate record is found return -1
+
+
+ Perform any work necessary before the sheet is about to be Serialized.
+ For instance the escher aggregates size needs to be calculated before
+ serialization so that the dgg record (which occurs first) can be written.
+
+
+ Shifts all the page breaks in the range "count" number of rows/columns
+ @param breaks The page record to be Shifted
+ @param start Starting "main" value to Shift breaks
+ @param stop Ending "main" value to Shift breaks
+ @param count number of Units (rows/columns) to Shift by
+
+
+ Shifts the horizontal page breaks for the indicated count
+ @param startingRow
+ @param endingRow
+ @param count
+
+
+ Shifts the vertical page breaks for the indicated count
+ @param startingCol
+ @param endingCol
+ @param count
+
+
+ Updates formulas in cells and conditional formats due to moving of cells
+ @param externSheetIndex the externSheet index of this sheet
+
+
+ 'initial sheet records' are between INDEX and the 'Row Blocks'
+ @param bofRecordIndex index of record after which INDEX record is to be placed
+ @return count of bytes from end of INDEX record to first ROW record.
+
+
+ Get the {@link NoteRecord}s (related to cell comments) for this sheet
+ @return never null, typically empty array
+
+
+
+ Creates the low evel records for an oval.
+
+ The highlevel shape.
+ The shape id to use for this shape.
+
+
+
+ Creates the lowerlevel escher records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Creates the lowerlevel OBJ records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+
+
+
+
+ The object record that is associated with this shape.
+
+
+
+
+
+ Represents an textbox shape and Converts between the highlevel records
+ and lowlevel records for an oval.
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+
+ Creates the low evel records for a textbox.
+
+ The highlevel shape.
+ The shape id to use for this shape.
+
+
+
+ Creates the lowerlevel OBJ records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Creates the lowerlevel escher records for this shape.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ Textboxes also have an extra TXO record associated with them that most
+ other shapes dont have.
+
+ The HSSF shape.
+ The shape id.
+
+
+
+
+ The shape container and it's children that can represent this
+ shape.
+
+
+
+
+
+ The object record that is associated with this shape.
+
+
+
+
+
+ The TextObject record that is associated with this shape.
+
+
+
+
+
+ Gets the EscherTextbox record.
+
+ The EscherTextbox record.
+
+
+ Low level model implementation of a Workbook. Provides creational methods
+ for Settings and objects contained in the workbook object.
+
+ This file Contains the low level binary records starting at the workbook's BOF and
+ ending with the workbook's EOF. Use HSSFWorkbook for a high level representation.
+
+ The structures of the highlevel API use references to this to perform most of their
+ operations. Its probably Unwise to use these low level structures directly Unless you
+ really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's
+ Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf
+ before even attempting to use this.
+
+
+ @author Luc Girardin (luc dot girardin at macrofocus dot com)
+ @author Sergei Kozello (sergeikozello at mail.ru)
+ @author Shawn Laubach (slaubach at apache dot org) (Data Formats)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Brian Sanders (bsanders at risklabs dot com) - custom palette
+ @author Dan Sherman (dsherman at Isisph.com)
+ @author Glen Stampoultzis (glens at apache.org)
+ @see org.apache.poi.hssf.usermodel.HSSFWorkbook
+ @version 1.0-pre
+
+
+ Excel silently truncates long sheet names to 31 chars.
+ This constant is used to ensure uniqueness in the first 31 chars
+
+
+ constant used to Set the "codepage" wherever "codepage" is Set in records
+ (which is duplciated in more than one record)
+
+
+ this Contains the Worksheet record objects
+
+
+ this Contains a reference to the SSTRecord so that new stings can be Added
+ to it.
+
+
+ holds the "boundsheet" records (aka bundlesheet) so that they can have their
+ reference to their "BOF" marker
+
+
+ Creates new Workbook with no intitialization --useless right now
+ @see #CreateWorkbook(List)
+
+
+ Read support for low level
+ API. Pass in an array of Record objects, A Workbook
+ object is constructed and passed back with all of its initialization Set
+ to the passed in records and references to those records held. Unlike Sheet
+ workbook does not use an offset (its assumed to be 0) since its first in a file.
+ If you need an offset then construct a new array with a 0 offset or Write your
+ own ;-p.
+
+ @param recs an array of Record objects
+ @return Workbook object
+
+
+ gets the name comment record
+ @param nameRecord name record who's comment is required.
+ @return name comment record or null if there isn't one for the given name.
+
+
+ Creates an empty workbook object with three blank sheets and all the empty
+ fields. Use this to Create a workbook from scratch.
+
+
+ Retrieves the Builtin NameRecord that matches the name and index
+ There shouldn't be too many names to make the sequential search too slow
+ @param name byte representation of the builtin name to match
+ @param sheetIndex Index to match
+ @return null if no builtin NameRecord matches
+
+
+ Removes the specified Builtin NameRecord that matches the name and index
+ @param name byte representation of the builtin to match
+ @param sheetIndex zero-based sheet reference
+
+
+ Gets the font record at the given index in the font table. Remember
+ "There is No Four" (someone at M$ must have gone to Rocky Horror one too
+ many times)
+
+ @param idx the index to look at (0 or greater but NOT 4)
+ @return FontRecord located at the given index
+
+
+ Creates a new font record and Adds it to the "font table". This causes the
+ boundsheets to move down one, extended formats to move down (so this function moves
+ those pointers as well)
+
+ @return FontRecord that was just Created
+
+
+ Check if the cloned sheet has drawings. If yes, then allocate a new drawing group ID and
+ re-generate shape IDs
+
+ @param sheet the cloned sheet
+
+
+ Gets the number of font records
+
+ @return number of font records in the "font table"
+
+
+ Sets the BOF for a given sheet
+
+ @param sheetnum the number of the sheet to Set the positing of the bof for
+ @param pos the actual bof position
+
+
+ Returns the position of the backup record.
+
+
+ Sets the name for a given sheet. If the boundsheet record doesn't exist and
+ its only one more than we have, go ahead and Create it. If its > 1 more than
+ we have, except
+
+ @param sheetnum the sheet number (0 based)
+ @param sheetname the name for the sheet
+
+
+ Determines whether a workbook Contains the provided sheet name.
+
+ @param name the name to test (case insensitive match)
+ @param excludeSheetIdx the sheet to exclude from the Check or -1 to include all sheets in the Check.
+ @return true if the sheet Contains the name, false otherwise.
+
+
+ Sets the name for a given sheet forcing the encoding. This is STILL A BAD IDEA.
+ Poi now automatically detects Unicode
+
+ @deprecated 3-Jan-06 Simply use SetSheetNam e(int sheetnum, String sheetname)
+ @param sheetnum the sheet number (0 based)
+ @param sheetname the name for the sheet
+
+
+ Sets the order of appearance for a given sheet.
+
+ @param sheetname the name of the sheet to reorder
+ @param pos the position that we want to Insert the sheet into (0 based)
+
+
+ Gets the name for a given sheet.
+
+ @param sheetnum the sheet number (0 based)
+ @return sheetname the name for the sheet
+
+
+ Gets the hidden flag for a given sheet.
+
+ @param sheetnum the sheet number (0 based)
+ @return True if sheet is hidden
+
+
+ Gets the hidden flag for a given sheet.
+ Note that a sheet could instead be
+ set to be very hidden, which is different
+ ({@link #isSheetVeryHidden(int)})
+
+ @param sheetnum the sheet number (0 based)
+ @return True if sheet is hidden
+
+
+ Hide or Unhide a sheet
+
+ @param sheetnum The sheet number
+ @param hidden True to mark the sheet as hidden, false otherwise
+
+
+ Hide or unhide a sheet.
+ 0 = not hidden
+ 1 = hidden
+ 2 = very hidden.
+
+ @param sheetnum The sheet number
+ @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden
+
+
+ Get the sheet's index
+ @param name sheet name
+ @return sheet index or -1 if it was not found.
+
+
+ if we're trying to Address one more sheet than we have, go ahead and Add it! if we're
+ trying to Address >1 more than we have throw an exception!
+
+
+
+ make the tabid record look like the current situation.
+
+ number of bytes written in the TabIdRecord
+
+
+ returns the number of boundsheet objects contained in this workbook.
+
+ @return number of BoundSheet records
+
+
+ Get the number of ExtendedFormat records contained in this workbook.
+
+ @return int count of ExtendedFormat records
+
+
+ Retrieves the index of the given font
+
+
+ Returns the StyleRecord for the given
+ xfIndex, or null if that ExtendedFormat doesn't
+ have a Style set.
+
+
+ Gets the ExtendedFormatRecord at the given 0-based index
+
+ @param index of the Extended format record (0-based)
+ @return ExtendedFormatRecord at the given index
+
+
+ Creates a new Cell-type Extneded Format Record and Adds it to the end of
+ ExtendedFormatRecords collection
+
+ @return ExtendedFormatRecord that was Created
+
+
+ Adds a string to the SST table and returns its index (if its a duplicate
+ just returns its index and update the counts) ASSUMES compressed Unicode
+ (meaning 8bit)
+
+ @param string the string to be Added to the SSTRecord
+
+ @return index of the string within the SSTRecord
+
+
+ given an index into the SST table, this function returns the corresponding String value
+ @return String containing the SST String
+
+
+ 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 org.apache.poi.hssf.record.SSTRecord
+
+
+ Serializes all records int the worksheet section into a big byte array. Use
+ this to Write the Workbook out.
+ @param offset of the data to be written
+ @param data array of bytes to Write this to
+
+
+ Perform any work necessary before the workbook is about to be serialized.
+
+ Include in it ant code that modifies the workbook record stream and affects its size.
+
+
+ Creates the BOF record
+ @see org.apache.poi.hssf.record.BOFRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a BOFRecord
+
+
+ Creates the InterfaceHdr record
+ @see org.apache.poi.hssf.record.InterfaceHdrRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a InterfaceHdrRecord
+
+
+ Creates an MMS record
+ @see org.apache.poi.hssf.record.MMSRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a MMSRecord
+
+
+ Creates the InterfaceEnd record
+ @see org.apache.poi.hssf.record.InterfaceEndRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a InterfaceEndRecord
+
+
+ Creates the WriteAccess record containing the logged in user's name
+ @see org.apache.poi.hssf.record.WriteAccessRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a WriteAccessRecord
+
+
+ Creates the Codepage record containing the constant stored in CODEPAGE
+ @see org.apache.poi.hssf.record.CodepageRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a CodepageRecord
+
+
+ Creates the DSF record containing a 0 since HSSF can't even Create Dual Stream Files
+ @see org.apache.poi.hssf.record.DSFRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a DSFRecord
+
+
+ Creates the TabId record containing an array of 0,1,2. This release of HSSF
+ always has the default three sheets, no less, no more.
+ @see org.apache.poi.hssf.record.TabIdRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a TabIdRecord
+
+
+ Creates the FnGroupCount record containing the Magic number constant of 14.
+ @see org.apache.poi.hssf.record.FnGroupCountRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a FnGroupCountRecord
+
+
+ Creates the WindowProtect record with protect Set to false.
+ @see org.apache.poi.hssf.record.WindowProtectRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a WindowProtectRecord
+
+
+ Creates the Protect record with protect Set to false.
+ @see org.apache.poi.hssf.record.ProtectRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a ProtectRecord
+
+
+ Creates the Password record with password Set to 0.
+ @see org.apache.poi.hssf.record.PasswordRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a PasswordRecord
+
+
+ Creates the ProtectionRev4 record with protect Set to false.
+ @see org.apache.poi.hssf.record.ProtectionRev4Record
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a ProtectionRev4Record
+
+
+ Creates the PasswordRev4 record with password Set to 0.
+ @see org.apache.poi.hssf.record.PasswordRev4Record
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a PasswordRev4Record
+
+
+ Creates the WindowOne record with the following magic values:
+ horizontal hold - 0x168
+ vertical hold - 0x10e
+ width - 0x3a5c
+ height - 0x23be
+ options - 0x38
+ selected tab - 0
+ Displayed tab - 0
+ num selected tab- 0
+ tab width ratio - 0x258
+ @see org.apache.poi.hssf.record.WindowOneRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a WindowOneRecord
+
+
+ Creates the Backup record with backup Set to 0. (loose the data, who cares)
+ @see org.apache.poi.hssf.record.BackupRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a BackupRecord
+
+
+ Creates the HideObj record with hide object Set to 0. (don't hide)
+ @see org.apache.poi.hssf.record.HideObjRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a HideObjRecord
+
+
+ Creates the DateWindow1904 record with windowing Set to 0. (don't window)
+ @see org.apache.poi.hssf.record.DateWindow1904Record
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a DateWindow1904Record
+
+
+ Creates the Precision record with precision Set to true. (full precision)
+ @see org.apache.poi.hssf.record.PrecisionRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a PrecisionRecord
+
+
+ Creates the RefreshAll record with refreshAll Set to true. (refresh all calcs)
+ @see org.apache.poi.hssf.record.RefreshAllRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a RefreshAllRecord
+
+
+ Creates the BookBool record with saveLinkValues Set to 0. (don't save link values)
+ @see org.apache.poi.hssf.record.BookBoolRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a BookBoolRecord
+
+
+ Creates a Font record with the following magic values:
+ fontheight = 0xc8
+ attributes = 0x0
+ color palette index = 0x7fff
+ bold weight = 0x190
+ Font Name Length = 5
+ Font Name = Arial
+
+ @see org.apache.poi.hssf.record.FontRecord
+ @see org.apache.poi.hssf.record.Record
+ @return record containing a FontRecord
+
+
+ Creates an ExtendedFormatRecord object
+ @param id the number of the extended format record to Create (meaning its position in
+ a file as MS Excel would Create it.)
+
+ @return record containing an ExtendedFormatRecord
+ @see org.apache.poi.hssf.record.ExtendedFormatRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Creates an default cell type ExtendedFormatRecord object.
+ @return ExtendedFormatRecord with intial defaults (cell-type)
+
+
+ Creates a new StyleRecord, for the given Extended
+ Format index, and adds it onto the end of the
+ records collection
+
+
+ Creates a StyleRecord object
+ @param id the number of the style record to Create (meaning its position in
+ a file as MS Excel would Create it.
+ @return record containing a StyleRecord
+ @see org.apache.poi.hssf.record.StyleRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Creates a palette record initialized to the default palette
+ @return a PaletteRecord instance populated with the default colors
+ @see org.apache.poi.hssf.record.PaletteRecord
+
+
+ Creates the UseSelFS object with the use natural language flag Set to 0 (false)
+ @return record containing a UseSelFSRecord
+ @see org.apache.poi.hssf.record.UseSelFSRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Create a "bound sheet" or "bundlesheet" (depending who you ask) record
+ Always Sets the sheet's bof to 0. You'll need to Set that yourself.
+ @param id either sheet 0,1 or 2.
+ @return record containing a BoundSheetRecord
+ @see org.apache.poi.hssf.record.BoundSheetRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Creates the Country record with the default country Set to 1
+ and current country Set to 7 in case of russian locale ("ru_RU") and 1 otherwise
+ @return record containing a CountryRecord
+ @see org.apache.poi.hssf.record.CountryRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Creates the ExtendedSST record with numstrings per bucket Set to 0x8. HSSF
+ doesn't yet know what to do with this thing, but we Create it with nothing in
+ it hardly just to make Excel happy and our sheets look like Excel's
+
+ @return record containing an ExtSSTRecord
+ @see org.apache.poi.hssf.record.ExtSSTRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ lazy initialization
+ Note - creating the link table causes creation of 1 EXTERNALBOOK and 1 EXTERNALSHEET record
+
+
+ Finds the first sheet name by his extern sheet index
+ @param externSheetIndex extern sheet index
+ @return first sheet name.
+
+
+ Finds the (first) sheet index for a particular external sheet number.
+ @param externSheetNumber The external sheet number to convert
+ @return The index to the sheet found.
+
+
+ Finds the last sheet index for a particular external sheet number,
+ which may be the same as the first (except for multi-sheet references)
+ @param externSheetNumber The external sheet number to convert
+ @return The index to the sheet found.
+
+
+ Returns the extern sheet number for specific sheet number.
+ If this sheet doesn't exist in extern sheet, add it
+ @param sheetNumber local sheet number
+ @return index to extern sheet
+
+
+ Returns the extern sheet number for specific range of sheets.
+ If this sheet range doesn't exist in extern sheet, add it
+ @param firstSheetNumber first local sheet number
+ @param lastSheetNumber last local sheet number
+ @return index to extern sheet
+
+
+ Gets the total number of names
+ @return number of names
+
+
+
+ @param name the name of an external function, typically a name of a UDF
+ @param sheetRefIndex the sheet ref index, or -1 if not known
+ @param udf locator of user-defiend functions to resolve names of VBA and Add-In functions
+ @return the external name or null
+
+
+ Gets the name record
+ @param index name index
+ @return name record
+
+
+ Creates new name
+ @return new name record
+
+
+ Creates new name
+ @return new name record
+
+
+ Generates a NameRecord to represent a built-in region
+ @return a new NameRecord Unless the index is invalid
+
+
+ Removes the name
+ @param namenum name index
+
+
+ If a {@link NameCommentRecord} is added or the name it references
+ is renamed, then this will update the lookup cache for it.
+
+
+ Returns a format index that matches the passed in format. It does not tie into HSSFDataFormat.
+ @param format the format string
+ @param CreateIfNotFound Creates a new format if format not found
+ @return the format id of a format that matches or -1 if none found and CreateIfNotFound
+
+
+ Returns the list of FormatRecords in the workbook.
+ @return ArrayList of FormatRecords in the notebook
+
+
+ Creates a FormatRecord, Inserts it, and returns the index code.
+ @param format the format string
+ @return the index code of the format record.
+ @see org.apache.poi.hssf.record.FormatRecord
+ @see org.apache.poi.hssf.record.Record
+
+
+ Creates a FormatRecord object
+ @param id the number of the format record to create (meaning its position in
+ a file as M$ Excel would create it.)
+
+
+ Returns the first occurance of a record matching a particular sid.
+
+
+ Returns the index of a record matching a particular sid.
+ @param sid The sid of the record to match
+ @return The index of -1 if no match made.
+
+
+ Returns the next occurance of a record matching a particular sid.
+
+
+ Whether date windowing is based on 1/2/1904 or 1/1/1900.
+ Some versions of Excel (Mac) can save workbooks using 1904 date windowing.
+
+ @return true if using 1904 date windowing
+
+
+ Returns the custom palette in use for this workbook; if a custom palette record
+ does not exist, then it is Created.
+
+
+ Finds the primary drawing Group, if one already exists
+
+
+ Creates a primary drawing Group record. If it already
+ exists then it's modified.
+
+
+ Removes the given font record from the
+ file's list. This will make all
+ subsequent font indicies drop by one,
+ so you'll need to update those yourself!
+
+
+ Removes the given ExtendedFormatRecord record from the
+ file's list. This will make all
+ subsequent font indicies drop by one,
+ so you'll need to update those yourself!
+
+
+
+ Removes ExtendedFormatRecord record with given index from the file's list. This will make all
+ subsequent font indicies drop by one,so you'll need to update those yourself!
+
+ index of the Extended format record (0-based)
+
+
+ is the workbook protected with a password (not encrypted)?
+
+
+ protect a workbook with a password (not encypted, just Sets Writeprotect
+ flags and the password.
+ @param password to Set
+
+
+ Removes the Write protect flag
+
+
+ @param reFindex Index to REF entry in EXTERNSHEET record in the Link Table
+ @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record
+ @return the string representation of the defined or external name
+
+
+ Updates named ranges due to moving of cells
+
+
+ Get or create RecalcIdRecord
+
+ @see org.apache.poi.hssf.usermodel.HSSFWorkbook#setForceFormulaRecalculation(boolean)
+
+
+ Changes an external referenced file to another file.
+ A formular in Excel which refers a cell in another file is saved in two parts:
+ The referenced file is stored in an reference table. the row/cell information is saved separate.
+ This method invokation will only change the reference in the lookup-table itself.
+ @param oldUrl The old URL to search for and which is to be replaced
+ @param newUrl The URL replacement
+ @return true if the oldUrl was found and replaced with newUrl. Otherwise false
+
+
+
+ List for records in Workbook
+
+
+
+
+ Gets or sets the records.
+
+ The records.
+
+
+
+ Gets the count.
+
+ The count.
+
+
+
+ Gets the at the specified index.
+
+
+
+
+
+ Adds the specified pos.
+
+ The pos.
+ The r.
+
+
+
+ Removes the specified record.
+
+ The record.
+
+
+
+ Removes the specified position.
+
+ The position.
+
+
+
+ Gets or sets the protpos.
+
+ The protpos.
+
+
+
+ Gets or sets the bspos.
+
+ The bspos.
+
+
+
+ Gets or sets the tabpos.
+
+ The tabpos.
+
+
+
+ Gets or sets the fontpos.
+
+ The fontpos.
+
+
+
+ Gets or sets the xfpos.
+
+ The xfpos.
+
+
+
+ Gets or sets the backuppos.
+
+ The backuppos.
+
+
+
+ Gets or sets the palettepos.
+
+ The palettepos.
+
+
+
+ Gets or sets the namepos.
+
+ The namepos.
+
+
+
+ Gets or sets the supbookpos.
+
+ The supbookpos.
+
+
+
+ Gets or sets the externsheet pos.
+
+ The externsheet pos.
+
+
+ Copies an Entry into a target POIFS directory, recursively
+
+
+ Copies all the nodes from one POIFS Directory to another
+
+ @param sourceRoot
+ is the source Directory to copy from
+ @param targetRoot
+ is the target Directory to copy to
+
+
+ Copies nodes from one Directory to the other minus the excepts
+
+ @param filteredSource The filtering source Directory to copy from
+ @param filteredTarget The filtering target Directory to copy to
+
+
+ Copies nodes from one Directory to the other minus the excepts
+
+ @param sourceRoot
+ is the source Directory to copy from
+ @param targetRoot
+ is the target Directory to copy to
+ @param excepts
+ is a list of Strings specifying what nodes NOT to copy
+ @deprecated use {@link FilteringDirectoryNode} instead
+
+
+ Copies all nodes from one POIFS to the other
+
+ @param source
+ is the source POIFS to copy from
+ @param target
+ is the target POIFS to copy to
+
+
+ Copies nodes from one POIFS to the other, minus the excepts.
+ This delegates the filtering work to {@link FilteringDirectoryNode},
+ so excepts can be of the form "NodeToExclude" or
+ "FilteringDirectory/ExcludedChildNode"
+
+ @param source is the source POIFS to copy from
+ @param target is the target POIFS to copy to
+ @param excepts is a list of Entry Names to be excluded from the copy
+
+
+ Checks to see if the two Directories hold the same contents.
+ For this to be true, they must have entries with the same names,
+ no entries in one but not the other, and the size+contents
+ of each entry must match, and they must share names.
+ To exclude certain parts of the Directory from being checked,
+ use a {@link FilteringDirectoryNode}
+
+
+ Checks to see if two Documents have the same name
+ and the same contents. (Their parent directories are
+ not checked)
+
+
+
+ A DirectoryEntry filter, which exposes another DirectoryEntry less certain parts.
+ This is typically used when copying or comparing Filesystems.
+
+
+
+
+ Creates a filter round the specified directory, which will exclude entries such as
+ "MyNode" and "MyDir/IgnoreNode". The excludes can stretch into children, if they contain a /.
+
+ The Directory to filter
+ The Entries to exclude
+
+
+ This class provides methods to write a DocumentEntry managed by a
+ {@link NPOIFSFileSystem} instance.
+
+
+ the Document's size
+
+
+ have we been closed?
+
+
+ the actual Document
+
+
+ and its Property
+
+
+ our buffer, when null we're into normal blocks
+
+
+ our main block stream, when we're into normal blocks
+
+
+ Create an OutputStream from the specified DocumentEntry.
+ The specified entry will be emptied.
+
+ @param document the DocumentEntry to be written
+
+
+ Create an OutputStream to create the specified new Entry
+
+ @param parent Where to create the Entry
+ @param name Name of the new entry
+
+
+ This exception is thrown when we try to open a file that doesn't
+ seem to actually be an OLE2 file After all
+
+
+
+ This abstract class describes a way to read, store, chain
+ and free a series of blocks (be they Big or Small ones)
+
+
+
+
+ Returns the size of the blocks managed through the block store.
+
+
+
+
+
+ Load the block at the given offset.
+
+
+
+
+
+
+ Extends the file if required to hold blocks up to
+ the specified offset, and return the block from there.
+
+
+
+
+
+
+ Returns the BATBlock that handles the specified offset,
+ and the relative index within it
+
+
+
+
+
+
+ Works out what block follows the specified one.
+
+
+
+
+
+
+ Changes the record of what block follows the specified one.
+
+
+
+
+
+
+ Finds a free block, and returns its offset.
+ This method will extend the file/stream if needed, and if doing
+ so, allocate new FAT blocks to address the extra space.
+
+
+
+
+
+ Creates a Detector for loops in the chain
+
+
+
+
+
+ Used to detect if a chain has a loop in it, so
+ we can bail out with an error rather than
+ spinning away for ever...
+
+
+
+ This class provides methods to read a DocumentEntry managed by a
+ {@link POIFSFileSystem} or {@link NPOIFSFileSystem} instance.
+ It Creates the appropriate one, and delegates, allowing us to
+ work transparently with the two.
+
+
+ returned by read operations if we're at end of document
+
+
+ For use by downstream implementations
+
+
+ Create an InputStream from the specified DocumentEntry
+
+ @param document the DocumentEntry to be read
+
+ @exception IOException if the DocumentEntry cannot be opened (like, maybe it has
+ been deleted?)
+
+
+ Create an InputStream from the specified Document
+
+ @param document the Document to be read
+
+
+ Create an InputStream from the specified Document
+
+ @param document the Document to be read
+
+
+ Tests if this input stream supports the mark and reset methods.
+
+ @return true always
+
+
+ Repositions this stream to the position at the time the mark() method was
+ last called on this input stream. If mark() has not been called this
+ method repositions the stream to its beginning.
+
+
+ This class provides a wrapper over an OutputStream so that Document
+ Writers can't accidently go over their size limits
+
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+ Create a DocumentOutputStream
+
+ @param stream the OutputStream to which the data is actually
+ read
+ @param limit the maximum number of bytes that can be written
+
+
+ Writes the specified byte to this output stream. The general
+ contract for write is that one byte is written to the output
+ stream. The byte to be written is the eight low-order bits of
+ the argument b. The 24 high-order bits of b are ignored.
+
+ @param b the byte.
+ @exception IOException if an I/O error occurs. In particular,
+ an IOException may be thrown if the
+ output stream has been closed, or if the
+ Writer tries to write too much data.
+
+
+ Writes b.Length bytes from the specified byte array
+ to this output stream.
+
+ @param b the data.
+ @exception IOException if an I/O error occurs.
+
+
+
+ Writes len bytes from the specified byte array starting at
+ offset off to this output stream. The general contract for
+ Write(b, off, len) is that some of the bytes in the array b are
+ written to the output stream in order; element b[off] is the
+ first byte written and b[off+len-1] is the last byte written by
+ this operation.
+
+ the data.
+ the start offset in the data.
+ the number of bytes to Write.
+
+
+
+ Flushes this output stream and forces any buffered output bytes to be written out
+
+
+
+ Closes this output stream and releases any system resources
+ associated with this stream. The general contract of close is
+ that it closes the output stream. A closed stream cannot
+ perform output operations and cannot be reopened.
+
+ @exception IOException if an I/O error occurs.
+
+
+ write the rest of the document's data (fill in at the end)
+
+ @param totalLimit the actual number of bytes the corresponding
+ document must fill
+ @param fill the byte to fill remaining space with
+
+ @exception IOException on I/O error
+
+
+ This class provides methods to read a DocumentEntry managed by a
+ {@link NPOIFSFileSystem} instance.
+
+
+ current offset into the Document
+
+
+ current block count
+
+
+ current marked offset into the Document (used by mark and Reset)
+
+
+ and the block count for it
+
+
+ the Document's size
+
+
+ have we been closed?
+
+
+ the actual Document
+
+
+ Create an InputStream from the specified DocumentEntry
+
+ @param document the DocumentEntry to be read
+
+ @exception IOException if the DocumentEntry cannot be opened (like, maybe it has
+ been deleted?)
+
+
+ Create an InputStream from the specified Document
+
+ @param document the Document to be read
+
+
+ Repositions this stream to the position at the time the mark() method was
+ last called on this input stream. If mark() has not been called this
+ method repositions the stream to its beginning.
+
+
+ This class manages a document in the NIO POIFS filesystem.
+ This is the {@link NPOIFSFileSystem} version.
+
+
+ Constructor for an existing Document
+
+
+ Constructor for an existing Document
+
+
+ Constructor for a new Document
+
+ @param name the name of the POIFSDocument
+ @param stream the InputStream we read data from
+
+
+ Frees the underlying stream and property
+
+
+ @return size of the document
+
+
+ @return the instance's DocumentProperty
+
+
+ Get an array of objects, some of which may implement POIFSViewable
+
+ @return an array of Object; may not be null, but may be empty
+
+
+ Get an Iterator of objects, some of which may implement POIFSViewable
+
+ @return an Iterator; may not be null, but may have an empty back end
+ store
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ @return short description
+
+
+ This is the main class of the POIFS system; it manages the entire
+ life cycle of the filesystem.
+ This is the new NIO version
+
+
+ Convenience method for clients that want to avoid the auto-close behaviour of the constructor.
+
+
+ What big block size the file uses. Most files
+ use 512 bytes, but a few use 4096
+
+
+ Constructor, intended for writing
+
+
+
Creates a POIFSFileSystem from a File. This uses less memory than
+ creating from an InputStream.
+
+
Note that with this constructor, you will need to call {@link #close()}
+ when you're done to have the underlying file closed, as the file is
+ kept open during normal operation to read the data out.
+
+ @param file the File from which to read or read/write the data
+ @param readOnly whether the POIFileSystem will only be used in read-only mode
+
+ @exception IOException on errors reading, or on invalid data
+
+
+ *
Creates a POIFSFileSystem from an open FileChannel. This uses
+ * less memory than creating from an InputStream. The stream will
+ * be used in read-only mode.
+ *
+ *
Note that with this constructor, you will need to call {@link #close()}
+ * when you're done to have the underlying Channel closed, as the channel is
+ * kept open during normal operation to read the data out.
+ *
+ * @param channel the FileChannel from which to read the data
+ *
+ * @exception IOException on errors reading, or on invalid data
+
+
+
Creates a POIFSFileSystem from an open FileChannel. This uses
+ less memory than creating from an InputStream.
+
+
Note that with this constructor, you will need to call {@link #close()}
+ when you're done to have the underlying Channel closed, as the channel is
+ kept open during normal operation to read the data out.
+
+ @param channel the FileChannel from which to read or read/write the data
+ @param readOnly whether the POIFileSystem will only be used in read-only mode
+
+ @exception IOException on errors reading, or on invalid data
+
+
+ Create a POIFSFileSystem from an InputStream. Normally the stream is read until
+ EOF. The stream is always closed.
+
+ Some streams are usable After reaching EOF (typically those that return true
+ for markSupported()). In the unlikely case that the caller has such a stream
+ and needs to use it After this constructor completes, a work around is to wrap the
+ stream in order to trap the close() call. A convenience method (
+ CreateNonClosingInputStream()) has been provided for this purpose:
+
+ Note also the special case of MemoryStream for which the close()
+ method does nothing.
+
+ MemoryStream bais = ...
+ HSSFWorkbook wb = new HSSFWorkbook(bais); // calls bais.Close() !
+ bais.Reset(); // no problem
+ doSomethingElse(bais);
+
+
+ @param stream the InputStream from which to read the data
+
+ @exception IOException on errors Reading, or on invalid data
+
+
+ @param stream the stream to be closed
+ @param success false if an exception is currently being thrown in the calling method
+
+
+ Checks that the supplied InputStream (which MUST
+ support mark and reset, or be a PushbackInputStream)
+ has a POIFS (OLE2) header at the start of it.
+ If your InputStream does not support mark / reset,
+ then wrap it in a PushBackInputStream, then be
+ sure to always use that, and not the original!
+ @param inp An InputStream which supports either mark/reset, or is a PushbackInputStream
+
+
+ Checks if the supplied first 8 bytes of a stream / file
+ has a POIFS (OLE2) header.
+
+
+ Read and process the PropertiesTable and the
+ FAT / XFAT blocks, so that we're Ready to
+ work with the file
+
+
+ Load the block at the given offset.
+
+
+ Load the block at the given offset,
+ extending the file if needed
+
+
+ Returns the BATBlock that handles the specified offset,
+ and the relative index within it
+
+
+ Works out what block follows the specified one.
+
+
+ Changes the record of what block follows the specified one.
+
+
+ Finds a free block, and returns its offset.
+ This method will extend the file if needed, and if doing
+ so, allocate new FAT blocks to Address the extra space.
+
+
+ For unit Testing only! Returns the underlying
+ properties table
+
+
+ Returns the MiniStore, which performs a similar low
+ level function to this, except for the small blocks.
+
+
+ add a new POIFSDocument to the FileSytem
+
+ @param document the POIFSDocument being Added
+
+
+ add a new DirectoryProperty to the FileSystem
+
+ @param directory the DirectoryProperty being Added
+
+
+ Create a new document to be Added to the root directory
+
+ @param stream the InputStream from which the document's data
+ will be obtained
+ @param name the name of the new POIFSDocument
+
+ @return the new DocumentEntry
+
+ @exception IOException on error creating the new POIFSDocument
+
+
+ create a new DocumentEntry in the root entry; the data will be
+ provided later
+
+ @param name the name of the new DocumentEntry
+ @param size the size of the new DocumentEntry
+ @param Writer the Writer of the new DocumentEntry
+
+ @return the new DocumentEntry
+
+ @exception IOException
+
+
+ create a new DirectoryEntry in the root directory
+
+ @param name the name of the new DirectoryEntry
+
+ @return the new DirectoryEntry
+
+ @exception IOException on name duplication
+
+
+ Write the filesystem out to the open file. Will thrown an
+ {@link ArgumentException} if opened from an
+ {@link InputStream}.
+
+ @exception IOException thrown on errors writing to the stream
+
+
+ Write the filesystem out
+
+ @param stream the OutputStream to which the filesystem will be
+ written
+
+ @exception IOException thrown on errors writing to the stream
+
+
+ Has our in-memory objects write their state
+ to their backing blocks
+
+
+ Closes the FileSystem, freeing any underlying files, streams
+ and buffers. After this, you will be unable to read or
+ write from the FileSystem.
+
+
+ Get the root entry
+
+ @return the root entry
+
+
+ open a document in the root entry's list of entries
+
+ @param documentName the name of the document to be opened
+
+ @return a newly opened DocumentInputStream
+
+ @exception IOException if the document does not exist or the
+ name is that of a DirectoryEntry
+
+
+ remove an entry
+
+ @param entry to be Removed
+
+
+ Get an array of objects, some of which may implement
+ POIFSViewable
+
+ @return an array of Object; may not be null, but may be empty
+
+
+ Get an Iterator of objects, some of which may implement
+ POIFSViewable
+
+ @return an Iterator; may not be null, but may have an empty
+ back end store
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ @return short description
+
+
+ @return The Big Block size, normally 512 bytes, sometimes 4096 bytes
+
+
+ @return The Big Block size, normally 512 bytes, sometimes 4096 bytes
+
+
+ This class handles the MiniStream (small block store)
+ in the NIO case for {@link NPOIFSFileSystem}
+
+
+ Load the block at the given offset.
+
+
+ Load the block, extending the underlying stream if needed
+
+
+ Returns the BATBlock that handles the specified offset,
+ and the relative index within it
+
+
+ Works out what block follows the specified one.
+
+
+ Changes the record of what block follows the specified one.
+
+
+ Finds a free block, and returns its offset.
+ This method will extend the file if needed, and if doing
+ so, allocate new FAT blocks to Address the extra space.
+
+
+ Writes the SBATs to their backing blocks
+
+
+ This handles Reading and writing a stream within a
+ {@link NPOIFSFileSystem}. It can supply an iterator
+ to read blocks, and way to write out to existing and
+ new blocks.
+ Most users will want a higher level version of this,
+ which deals with properties to track which stream
+ this is.
+ This only works on big block streams, it doesn't
+ handle small block ones.
+ This uses the new NIO code
+
+ TODO Implement a streaming write method, and append
+
+
+ Constructor for an existing stream. It's up to you
+ to know how to Get the start block (eg from a
+ {@link HeaderBlock} or a {@link Property})
+
+
+ Constructor for a new stream. A start block won't
+ be allocated until you begin writing to it.
+
+
+ What block does this stream start at?
+ Will be {@link POIFSConstants#END_OF_CHAIN} for a
+ new stream that hasn't been written to yet.
+
+
+ Returns an iterator that'll supply one {@link ByteBuffer}
+ per block in the stream.
+
+
+ Updates the contents of the stream to the new
+ Set of bytes.
+ Note - if this is property based, you'll still
+ need to update the size in the property yourself
+
+
+ Frees all blocks in the stream
+
+
+ This class provides methods to read a DocumentEntry managed by a
+ {@link POIFSFileSystem} instance.
+
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+ current offset into the Document
+
+
+ current marked offset into the Document (used by mark and Reset)
+
+
+ the Document's size
+
+
+ have we been closed?
+
+
+ the actual Document
+
+
+ the data block Containing the current stream pointer
+
+
+ Create an InputStream from the specified DocumentEntry
+
+ @param document the DocumentEntry to be read
+
+ @exception IOException if the DocumentEntry cannot be opened (like, maybe it has
+ been deleted?)
+
+
+ Create an InputStream from the specified Document
+
+ @param document the Document to be read
+
+
+ Repositions this stream to the position at the time the mark() method was
+ last called on this input stream. If mark() has not been called this
+ method repositions the stream to its beginning.
+
+
+
+ This class manages a document in the POIFS filesystem.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ the name of the POIFSDocument
+ the InputStream we read data from
+
+
+
+ Constructor from small blocks
+
+ the name of the POIFSDocument
+ the small blocks making up the POIFSDocument
+ the actual length of the POIFSDocument
+
+
+
+ read data from the internal stores
+
+ the buffer to write to
+ the offset into our storage to read from
+
+
+
+ Writes the blocks.
+
+ The stream.
+
+
+
+ Gets the number of BigBlock's this instance uses
+
+ count of BigBlock instances
+
+
+
+ Gets the document property.
+
+ The document property.
+
+
+
+ Provides a short description of the object to be used when a
+ POIFSViewable object has not provided its contents.
+
+ true if [prefer array]; otherwise, false.
+
+
+
+ Gets the short description.
+
+ The short description.
+
+
+
+ Gets the size.
+
+ The size.
+
+
+
+ Gets the small blocks.
+
+ The small blocks.
+
+
+
+ Sets the start block for this instance
+
+
+ index into the array of BigBlock instances making up the the filesystem
+
+
+
+
+ Get an array of objects, some of which may implement POIFSViewable
+
+ The viewable array.
+
+
+
+ Give viewers a hint as to whether to call ViewableArray or ViewableIterator
+
+ The viewable iterator.
+
+
+
+ This interface defines behaviors for objects managed by the Block
+ Allocation Table (BAT).
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Gets the number of BigBlock's this instance uses
+
+ count of BigBlock instances
+
+
+
+ Sets the start block for this instance
+
+ index into the array of BigBlock instances making up the the filesystem
+
+
+
+ This interface defines methods specific to Directory objects
+ managed by a Filesystem instance.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ get an iterator of the Entry instances contained directly in
+ this instance (in other words, children only; no grandchildren
+ etc.)
+
+ The entries.never null, but hasNext() may return false
+ immediately (i.e., this DirectoryEntry is empty). All
+ objects retrieved by next() are guaranteed to be
+ implementations of Entry.
+
+
+
+ get the names of all the Entries contained directly in this
+ instance (in other words, names of children only; no grandchildren etc).
+
+ the names of all the entries that may be retrieved with
+ getEntry(String), which may be empty (if this DirectoryEntry is empty
+
+
+
+
+ is this DirectoryEntry empty?
+
+ true if this instance contains no Entry instances; otherwise, false.
+
+
+
+ find out how many Entry instances are contained directly within
+ this DirectoryEntry
+
+ number of immediately (no grandchildren etc.) contained
+ Entry instances
+
+
+
+ get a specified Entry by name
+
+ the name of the Entry to obtain.
+ the specified Entry, if it is directly contained in
+ this DirectoryEntry
+
+
+
+ Create a new DocumentEntry
+
+ the name of the new DocumentEntry
+ the Stream from which to Create the new DocumentEntry
+ the new DocumentEntry
+
+
+
+ Create a new DocumentEntry; the data will be provided later
+
+ the name of the new DocumentEntry
+ the size of the new DocumentEntry
+ BeforeWriting event handler
+ the new DocumentEntry
+
+
+
+ Create a new DirectoryEntry
+
+ the name of the new DirectoryEntry
+ the name of the new DirectoryEntry
+
+
+
+ Gets or sets the storage ClassID.
+
+ The storage ClassID.
+
+
+
+ Checks if entry with specified name present
+
+ entry name
+ true if have
+
+
+
+ Simple implementation of DirectoryEntry
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Create a DirectoryNode. This method Is not public by design; it
+ Is intended strictly for the internal use of this package
+
+ the DirectoryProperty for this DirectoryEntry
+ the POIFSFileSystem we belong to
+ the parent of this entry
+
+
+
+ open a document in the directory's entry's list of entries
+
+ the name of the document to be opened
+ a newly opened DocumentStream
+
+
+
+ Create a new DocumentEntry; the data will be provided later
+
+ the name of the new documentEntry
+ the new DocumentEntry
+
+
+
+ Change a contained Entry's name
+
+ the original name
+ the new name
+ true if the operation succeeded, else false
+
+
+
+ Deletes the entry.
+
+ the EntryNode to be Deleted
+ true if the entry was Deleted, else false
+
+
+
+ Gets the path.
+
+ this directory's path representation
+
+
+
+ get an iterator of the Entry instances contained directly in
+ this instance (in other words, children only; no grandchildren
+ etc.)
+
+
+ The entries.never null, but hasNext() may return false
+ immediately (i.e., this DirectoryEntry is empty). All
+ objects retrieved by next() are guaranteed to be
+ implementations of Entry.
+
+
+
+ get the names of all the Entries contained directly in this
+ instance (in other words, names of children only; no grandchildren
+ etc).
+
+ @return the names of all the entries that may be retrieved with
+ getEntry(String), which may be empty (if this
+ DirectoryEntry is empty)
+
+
+
+ is this DirectoryEntry empty?
+
+
+ true if this instance contains no Entry instances; otherwise, false.
+
+
+
+
+ find out how many Entry instances are contained directly within
+ this DirectoryEntry
+
+
+ number of immediately (no grandchildren etc.) contained
+ Entry instances
+
+
+
+
+ get a specified Entry by name
+
+ the name of the Entry to obtain.
+
+ the specified Entry, if it is directly contained in
+ this DirectoryEntry
+
+
+
+
+ Create a new DirectoryEntry
+
+ the name of the new DirectoryEntry
+ the name of the new DirectoryEntry
+
+
+
+ Gets or Sets the storage clsid for the directory entry
+
+ The storage ClassID.
+
+
+
+ Is this a DirectoryEntry?
+
+ true if the Entry Is a DirectoryEntry, else false
+
+
+
+ extensions use this method to verify internal rules regarding
+ deletion of the underlying store.
+
+ true if it's ok to Delete the underlying store, else
+ false
+
+
+
+ Get an array of objects, some of which may implement POIFSViewable
+
+ an array of Object; may not be null, but may be empty
+
+
+
+ Get an Iterator of objects, some of which may implement
+ POIFSViewable
+
+ an Iterator; may not be null, but may have an empty
+ back end store
+
+
+
+ Give viewers a hint as to whether to call GetViewableArray or
+ GetViewableIterator
+
+ true if a viewer should call GetViewableArray; otherwise, falseif
+ a viewer should call GetViewableIterator
+
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ The short description.
+
+
+
+ Class DocumentDescriptor
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ the Document path
+ the Document name
+
+
+
+ Gets the path.
+
+ The path.
+
+
+
+ Gets the name.
+
+ The name.
+
+
+
+ equality. Two DocumentDescriptor instances are equal if they
+ have equal paths and names
+
+ the object we're checking equality for
+ true if the object is equal to this object
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ hashcode
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ This interface defines methods specific to Document objects
+ managed by a Filesystem instance.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ get the size of the document, in bytes
+
+ size in bytes
+
+
+
+ Simple implementation of DocumentEntry
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+ create a DocumentNode. This method Is not public by design; it
+ Is intended strictly for the internal use of this package
+
+ @param property the DocumentProperty for this DocumentEntry
+ @param parent the parent of this entry
+
+
+ get the POIFSDocument
+
+ @return the internal POIFSDocument
+
+
+ get the zize of the document, in bytes
+
+ @return size in bytes
+
+
+ Is this a DocumentEntry?
+
+ @return true if the Entry Is a DocumentEntry, else false
+
+
+ extensions use this method to verify internal rules regarding
+ deletion of the underlying store.
+
+ @return true if it's ok to delete the underlying store, else
+ false
+
+
+ Get an array of objects, some of which may implement
+ POIFSViewable
+
+ @return an array of Object; may not be null, but may be empty
+
+
+ Get an Iterator of objects, some of which may implement
+ POIFSViewable
+
+ @return an Iterator; may not be null, but may have an empty
+ back end store
+
+
+ Give viewers a hint as to whether to call getViewableArray or
+ getViewableIterator
+
+ @return true if a viewer should call getViewableArray, false if
+ a viewer should call getViewableIterator
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ @return short description
+
+
+
+ This interface provides access to an object managed by a Filesystem
+ instance. Entry objects are further divided into DocumentEntry and
+ DirectoryEntry instances.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Get the name of the Entry
+
+ The name.
+
+
+
+ Is this a DirectoryEntry?
+
+
+ true if the Entry Is a DirectoryEntry; otherwise, false.
+
+
+
+
+ Is this a DocumentEntry?
+
+
+ true if the Entry Is a DocumentEntry; otherwise, false.
+
+
+
+
+ Get this Entry's parent (the DirectoryEntry that owns this
+ Entry). All Entry objects, except the root Entry, has a parent.
+
+ this Entry's parent; null iff this Is the root Entry
+ This property is moved to EntryNode
+
+
+
+ Delete this Entry. ThIs operation should succeed, but there are
+ special circumstances when it will not:
+ If this Entry Is the root of the Entry tree, it cannot be
+ deleted, as there Is no way to Create another one.
+ If this Entry Is a directory, it cannot be deleted unless it Is
+ empty.
+
+ true if the Entry was successfully deleted, else false
+
+
+
+ Rename this Entry. ThIs operation will fail if:
+ There Is a sibling Entry (i.e., an Entry whose parent Is the
+ same as this Entry's parent) with the same name.
+ ThIs Entry Is the root of the Entry tree. Its name Is dictated
+ by the Filesystem and many not be Changed.
+
+ the new name for this Entry
+ true if the operation succeeded, else false
+
+
+
+ Abstract implementation of Entry
+ Extending classes should override isDocument() or isDirectory(), as
+ appropriate
+ Extending classes must override isDeleteOK()
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Create a DocumentNode. ThIs method Is not public by design; it
+ Is intended strictly for the internal use of extending classes
+
+ the Property for this Entry
+ the parent of this entry
+
+
+
+ grant access to the property
+
+ the property backing this entry
+
+
+
+ Is this the root of the tree?
+
+ true if this instance is root; otherwise, false.
+
+
+
+ extensions use this method to verify internal rules regarding
+ deletion of the underlying store.
+
+
+ true if it's ok to Delete the underlying store; otherwise, false.
+
+
+
+
+ Get the name of the Entry
+
+ The name.
+ Get the name of the Entry
+ @return name
+
+
+
+ Is this a DirectoryEntry?
+
+
+ true if the Entry Is a DirectoryEntry; otherwise, false.
+
+
+
+
+ Is this a DocumentEntry?
+
+
+ true if the Entry Is a DocumentEntry; otherwise, false.
+
+
+
+
+ Get this Entry's parent (the DocumentEntry that owns this
+ Entry). All Entry objects, except the root Entry, has a parent.
+
+ this Entry's parent; null iff this Is the root Entry
+
+
+
+ Delete this Entry. ThIs operation should succeed, but there are
+ special circumstances when it will not:
+ If this Entry Is the root of the Entry tree, it cannot be
+ deleted, as there Is no way to Create another one.
+ If this Entry Is a directory, it cannot be deleted unless it Is
+ empty.
+
+
+ true if the Entry was successfully deleted, else false
+
+
+
+
+ Rename this Entry. ThIs operation will fail if:
+ There Is a sibling Entry (i.e., an Entry whose parent Is the
+ same as this Entry's parent) with the same name.
+ ThIs Entry Is the root of the Entry tree. Its name Is dictated
+ by the Filesystem and many not be Changed.
+
+ the new name for this Entry
+
+ true if the operation succeeded, else false
+
+
+
+
+ This exception is thrown when we try to open a file that's actually
+ an Office 2007+ XML file, rather than an OLE2 file (which is what
+ POIFS works with)
+
+
+
+ Represents an Ole10Native record which is wrapped around certain binary
+ files being embedded in OLE2 documents.
+
+ @author Rainer Schwarze
+
+
+ the field encoding mode - merely a try-and-error guess ...
+
+
+
+ the data is stored in parsed format - including label, command, etc.
+
+
+ the data is stored raw after the length field
+
+
+ the data is stored raw after the length field and the flags1 field
+
+
+
+ Creates an instance of this class from an embedded OLE Object. The OLE Object is expected
+ to include a stream "{01}Ole10Native" which Contains the actual
+ data relevant for this class.
+
+ poifs POI Filesystem object
+ Returns an instance of this class
+
+
+
+ Creates an instance of this class from an embedded OLE Object. The OLE Object is expected
+ to include a stream "{01}Ole10Native" which contains the actual
+ data relevant for this class.
+
+ directory POI Filesystem object
+ Returns an instance of this class
+
+
+ Creates an instance and fills the fields based on ... the fields
+
+
+ Creates an instance and Fills the fields based on the data in the given buffer.
+
+ @param data The buffer Containing the Ole10Native record
+ @param offset The start offset of the record in the buffer
+ @param plain as of POI 3.11 this parameter is ignored
+ @throws Ole10NativeException on invalid or unexcepted data format
+
+
+ Creates an instance and Fills the fields based on the data in the given buffer.
+
+ @param data The buffer Containing the Ole10Native record
+ @param offset The start offset of the record in the buffer
+ @throws Ole10NativeException on invalid or unexcepted data format
+
+
+ Returns the value of the totalSize field - the total length of the structure
+ is totalSize + 4 (value of this field + size of this field).
+
+ @return the totalSize
+
+
+ Returns flags1 - currently unknown - usually 0x0002.
+
+ @return the flags1
+
+
+ Returns the label field - usually the name of the file (without directory) but
+ probably may be any name specified during packaging/embedding the data.
+
+ @return the label
+
+
+ Returns the fileName field - usually the name of the file being embedded
+ including the full path.
+
+ @return the fileName
+
+
+ Returns flags2 - currently unknown - mostly 0x0000.
+
+ @return the flags2
+
+
+ Returns unknown1 field - currently unknown.
+
+ @return the unknown1
+
+
+ Returns the command field - usually the name of the file being embedded
+ including the full path, may be a command specified during embedding the file.
+
+ @return the command
+
+
+ Returns the size of the embedded file. If the size is 0 (zero), no data has been
+ embedded. To be sure, that no data has been embedded, check whether
+ {@link #getDataBuffer()} returns null.
+
+ @return the dataSize
+
+
+ Returns the buffer Containing the embedded file's data, or null
+ if no data was embedded. Note that an embedding may provide information about
+ the data, but the actual data is not included. (So label, filename etc. are
+ available, but this method returns null.)
+
+ @return the dataBuffer
+
+
+ Returns the flags3 - currently unknown.
+
+ @return the flags3
+
+
+ Have the contents printer out into an OutputStream, used when writing a
+ file back out to disk (Normally, atom classes will keep their bytes
+ around, but non atom classes will just request the bytes from their
+ children, then chuck on their header and return)
+
+
+
+ Class POIFSDocumentPath
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ simple constructor for the path of a document that is in the
+ root of the POIFSFileSystem. The constructor that takes an
+ array of Strings can also be used to create such a
+ POIFSDocumentPath by passing it a null or empty String array
+
+
+
+
+ constructor for the path of a document that is not in the root
+ of the POIFSFileSystem
+
+ the Strings making up the path to a document.
+ The Strings must be ordered as they appear in
+ the directory hierarchy of the the document
+ -- the first string must be the name of a
+ directory in the root of the POIFSFileSystem,
+ and every Nth (for N > 1) string thereafter
+ must be the name of a directory in the
+ directory identified by the (N-1)th string.
+ If the components parameter is null or has
+ zero length, the POIFSDocumentPath is
+ appropriate for a document that is in the
+ root of a POIFSFileSystem
+
+
+
+ constructor that adds additional subdirectories to an existing
+ path
+
+ the existing path
+ the additional subdirectory names to be added
+
+
+
+ equality. Two POIFSDocumentPath instances are equal if they
+ have the same number of component Strings, and if each
+ component String is equal to its coresponding component String
+
+ the object we're checking equality for
+ true if the object is equal to this object
+
+
+
+ get the specified component
+
+ which component (0 ... length() - 1)
+ the nth component;
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the length.
+
+ the number of components
+
+
+
+ Returns the path's parent or null if this path
+ is the root path.
+
+ path of parent, or null if this path is the root path
+
+
+
+ This class provides methods to read a DocumentEntry managed by a
+ Filesystem instance.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Create an InputStream from the specified DocumentEntry
+
+ the DocumentEntry to be read
+
+
+
+ Create an InputStream from the specified Document
+
+ the Document to be read
+
+
+
+ at the end Of document.
+
+
+
+
+
+ Returns the number of bytes that can be read (or skipped over)
+ from this input stream without blocking by the next caller of a
+ method for this input stream. The next caller might be the same
+ thread or or another thread.
+
+ the number of bytes that can be read from this input
+ stream without blocking.
+
+
+
+ Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
+
+
+
+
+ Reads some number of bytes from the input stream and stores
+ them into the buffer array b. The number of bytes actually read
+ is returned as an integer. The definition of this method in
+ java.io.InputStream allows this method to block, but it won't.
+ If b is null, a NullPointerException is thrown. If the length
+ of b is zero, then no bytes are read and 0 is returned;
+ otherwise, there is an attempt to read at least one byte. If no
+ byte is available because the stream is at end of file, the
+ value -1 is returned; otherwise, at least one byte is read and
+ stored into b.
+ The first byte read is stored into element b[0], the next one
+ into b[1], and so on. The number of bytes read is, at most,
+ equal to the length of b. Let k be the number of bytes actually
+ read; these bytes will be stored in elements b[0] through
+ b[k-1], leaving elements b[k] through b[b.length-1] unaffected.
+ If the first byte cannot be read for any reason other than end
+ of file, then an IOException is thrown. In particular, an
+ IOException is thrown if the input stream has been closed.
+ The read(b) method for class InputStream has the same effect as:
+
+ the buffer into which the data is read.
+ the total number of bytes read into the buffer, or -1
+ if there is no more data because the end of the stream
+ has been reached.
+
+
+
+ Reads up to len bytes of data from the input stream into an
+ array of bytes. An attempt is made to read as many as len
+ bytes, but a smaller number may be read, possibly zero. The
+ number of bytes actually read is returned as an integer.
+ The definition of this method in java.io.InputStream allows it
+ to block, but it won't.
+ If b is null, a NullPointerException is thrown.
+ If off is negative, or len is negative, or off+len is greater
+ than the length of the array b, then an
+ IndexOutOfBoundsException is thrown.
+ If len is zero, then no bytes are read and 0 is returned;
+ otherwise, there is an attempt to read at least one byte. If no
+ byte is available because the stream is at end of file, the
+ value -1 is returned; otherwise, at least one byte is read and
+ stored into b.
+ The first byte read is stored into element b[off], the next one
+ into b[off+1], and so on. The number of bytes read is, at most,
+ equal to len. Let k be the number of bytes actually read; these
+ bytes will be stored in elements b[off] through b[off+k-1],
+ leaving elements b[off+k] through b[off+len-1] unaffected.
+ In every case, elements b[0] through b[off] and elements
+ b[off+len] through b[b.length-1] are unaffected.
+ If the first byte cannot be read for any reason other than end
+ of file, then an IOException is thrown. In particular, an
+ IOException is thrown if the input stream has been closed.
+
+ the buffer into which the data is read.
+ the start offset in array b at which the data is
+ written.
+ the maximum number of bytes to read.
+ the total number of bytes read into the buffer, or -1
+ if there is no more data because the end of the stream
+ has been reached.
+
+
+
+ Reads the next byte of data from the input stream. The value
+ byte is returned as an int in the range 0 to 255. If no byte is
+ available because the end of the stream has been reached, the
+ value -1 is returned. The definition of this method in
+ java.io.InputStream allows this method to block, but it won't.
+
+ the next byte of data, or -1 if the end of the stream
+ is reached.
+
+
+
+
+ When overridden in a derived class, sets the position within the current stream.
+
+ A byte offset relative to the parameter.
+ A value of type indicating the reference point used to obtain the new position.
+
+ The new position within the current stream.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ Skips the specified n.
+
+ The n.
+
+
+
+
+ When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
+
+ An array of bytes. This method copies bytes from to the current stream.
+ The zero-based byte offset in at which to begin copying bytes to the current stream.
+ The number of bytes to be written to the current stream.
+
+ The sum of and is greater than the buffer length.
+
+
+ is null.
+
+
+ or is negative.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support writing.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports reading.
+
+
+ true if the stream supports reading; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
+
+
+ true if the stream supports seeking; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports writing.
+
+
+ true if the stream supports writing; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the length in bytes of the stream.
+
+
+
+ A long value representing the length of the stream in bytes.
+
+
+ A class derived from Stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, gets or sets the position within the current stream.
+
+
+
+ The current position within the stream.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ This class provides a wrapper over an OutputStream so that Document
+ writers can't accidently go over their size limits
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Create a POIFSDocumentWriter
+
+ the OutputStream to which the data is actually
+ the maximum number of bytes that can be written
+
+
+
+ Closes this output stream and releases any system resources
+ associated with this stream. The general contract of close is
+ that it closes the output stream. A closed stream cannot
+ perform output operations and cannot be reopened.
+
+
+
+
+ Flushes this output stream and forces any buffered output bytes
+ to be written out.
+
+
+
+
+ Writes b.length bytes from the specified byte array
+ to this output stream.
+
+ the data.
+
+
+
+ Writes len bytes from the specified byte array starting at
+ offset off to this output stream. The general contract for
+ write(b, off, len) is that some of the bytes in the array b are
+ written to the output stream in order; element b[off] is the
+ first byte written and b[off+len-1] is the last byte written by
+ this operation.
+ If b is null, a NullPointerException is thrown.
+ If off is negative, or len is negative, or off+len is greater
+ than the length of the array b, then an
+ IndexOutOfBoundsException is thrown.
+
+ the data.
+ the start offset in the data.
+ the number of bytes to write.
+
+
+
+ Writes the specified byte to this output stream. The general
+ contract for write is that one byte is written to the output
+ stream. The byte to be written is the eight low-order bits of
+ the argument b. The 24 high-order bits of b are ignored.
+
+ the byte.
+
+
+
+ write the rest of the document's data (fill in at the end)
+
+ the actual number of bytes the corresponding
+ document must fill
+ the byte to fill remaining space with
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports reading.
+
+
+ true if the stream supports reading; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
+
+
+ true if the stream supports seeking; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports writing.
+
+
+ true if the stream supports writing; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the length in bytes of the stream.
+
+
+
+ A long value representing the length of the stream in bytes.
+
+
+ A class derived from Stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, gets or sets the position within the current stream.
+
+
+
+ The current position within the stream.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ This is the main class of the POIFS system; it manages the entire
+ life cycle of the filesystem.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Convenience method for clients that want to avoid the auto-Close behaviour of the constructor.
+
+ The stream.
+
+ A convenience method (
+ CreateNonClosingInputStream()) has been provided for this purpose:
+ StreamwrappedStream = POIFSFileSystem.CreateNonClosingInputStream(is);
+ HSSFWorkbook wb = new HSSFWorkbook(wrappedStream);
+ is.reset();
+ doSomethingElse(is);
+
+
+
+
+ What big block size the file uses. Most files
+ use 512 bytes, but a few use 4096
+
+
+
+ Initializes a new instance of the class. intended for writing
+
+
+
+
+ Create a POIFSFileSystem from an Stream. Normally the stream is Read until
+ EOF. The stream is always Closed. In the unlikely case that the caller has such a stream and
+ needs to use it after this constructor completes, a work around is to wrap the
+ stream in order to trap the Close() call.
+
+ the Streamfrom which to Read the data
+
+
+ @param stream the stream to be Closed
+ @param success false if an exception is currently being thrown in the calling method
+
+
+
+ Checks that the supplied Stream(which MUST
+ support mark and reset, or be a PushbackInputStream)
+ has a POIFS (OLE2) header at the start of it.
+ If your Streamdoes not support mark / reset,
+ then wrap it in a PushBackInputStream, then be
+ sure to always use that, and not the original!
+
+ An Streamwhich supports either mark/reset, or is a PushbackStream
+
+ true if [has POIFS header] [the specified inp]; otherwise, false.
+
+
+
+
+ Create a new document to be Added to the root directory
+
+ the Streamfrom which the document's data will be obtained
+ the name of the new POIFSDocument
+ the new DocumentEntry
+
+
+
+ Create a new DocumentEntry in the root entry; the data will be
+ provided later
+
+ the name of the new DocumentEntry
+ the size of the new DocumentEntry
+ the Writer of the new DocumentEntry
+ the new DocumentEntry
+
+
+
+ Create a new DirectoryEntry in the root directory
+
+ the name of the new DirectoryEntry
+ the new DirectoryEntry
+
+
+ open a document in the root entry's list of entries
+
+ @param documentName the name of the document to be opened
+
+ @return a newly opened DocumentInputStream
+
+ @exception IOException if the document does not exist or the
+ name is that of a DirectoryEntry
+
+
+
+ Writes the file system.
+
+ the OutputStream to which the filesystem will be
+ written
+
+
+
+ Get the root entry
+
+ The root.
+
+
+
+ Add a new POIFSDocument
+
+ the POIFSDocument being Added
+
+
+
+ Add a new DirectoryProperty
+
+ The directory.
+
+
+
+ Removes the specified entry.
+
+ The entry.
+
+
+
+ Get an array of objects, some of which may implement
+ POIFSViewable
+
+ an array of Object; may not be null, but may be empty
+
+
+
+ Get an Iterator of objects, some of which may implement
+ POIFSViewable
+
+ an Iterator; may not be null, but may have an empty
+ back end store
+
+
+
+ Give viewers a hint as to whether to call GetViewableArray or
+ GetViewableIterator
+
+ true if a viewer should call GetViewableArray, false if
+ a viewer should call GetViewableIterator
+
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ The short description.
+
+
+
+ Gets The Big Block size, normally 512 bytes, sometimes 4096 bytes
+
+ The size of the big block.
+
+
+ Class POIFSWriterEvent
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @version %I%, %G%
+
+
+ namespace scoped constructor
+
+ @param stream the DocumentOutputStream, freshly opened
+ @param path the path of the document
+ @param documentName the name of the document
+ @param limit the limit, in bytes, that can be written to the
+ stream
+
+
+ @return the DocumentOutputStream, freshly opened
+
+
+ @return the document's path
+
+
+ @return the document's name
+
+
+ @return the limit on writing, in bytes
+
+
+
+ EventArgs for POIFSWriter
+ author: Tony Qu
+
+
+
+
+ Initializes a new instance of the class.
+
+ the POIFSDocumentWriter, freshly opened
+ the path of the document
+ the name of the document
+ the limit, in bytes, that can be written to the stream
+
+
+
+ Gets the limit on writing, in bytes
+
+ The limit.
+
+
+
+ Gets the document's name
+
+ The name.
+
+
+
+ Gets the document's path
+
+ The path.
+
+
+
+ the POIFSDocumentWriter, freshly opened
+
+ The stream.
+
+
+ Interface POIFSWriterListener
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @version %I%, %G%
+
+
+ Process a POIFSWriterEvent that this listener had registered
+ for
+
+ @param event the POIFSWriterEvent
+
+
+
+ An event-driven Reader for POIFS file systems. Users of this class
+ first Create an instance of it, then use the RegisterListener
+ methods to Register POIFSReaderListener instances for specific
+ documents. Once all the listeners have been Registered, the Read()
+ method is called, which results in the listeners being notified as
+ their documents are Read.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Read from an InputStream and Process the documents we Get
+
+ the InputStream from which to Read the data
+ POIFSDocument list
+
+
+ Register a POIFSReaderListener for all documents
+
+ @param listener the listener to be registered
+
+ @exception NullPointerException if listener is null
+ @exception IllegalStateException if read() has already been
+ called
+
+
+ Register a POIFSReaderListener for a document in the root
+ directory
+
+ @param listener the listener to be registered
+ @param name the document name
+
+ @exception NullPointerException if listener is null or name is
+ null or empty
+ @exception IllegalStateException if read() has already been
+ called
+
+
+ Register a POIFSReaderListener for a document in the specified
+ directory
+
+ @param listener the listener to be registered
+ @param path the document path; if null, the root directory is
+ assumed
+ @param name the document name
+
+ @exception NullPointerException if listener is null or name is
+ null or empty
+ @exception IllegalStateException if read() has already been
+ called
+
+
+
+ Processes the properties.
+
+ The small_blocks.
+ The big_blocks.
+ The properties.
+ The path.
+
+
+
+ Class POIFSReaderEvent
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @version %I%, %G%
+
+
+ package scoped constructor
+
+ @param stream the DocumentInputStream, freshly opened
+ @param path the path of the document
+ @param documentName the name of the document
+
+
+ @return the DocumentInputStream, freshly opened
+
+
+ @return the document's path
+
+
+ @return the document's name
+
+
+
+ EventArgs for POIFSReader
+ author: Tony Qu
+
+
+
+ Interface POIFSReaderListener
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @version %I%, %G%
+
+
+ Process a POIFSReaderEvent that this listener had Registered
+ for
+
+ @param event the POIFSReaderEvent
+
+
+ A registry for POIFSReaderListeners and the DocumentDescriptors of
+ the documents those listeners are interested in
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @version %I%, %G%
+
+
+ Construct the registry
+
+
+ Register a POIFSReaderListener for a particular document
+
+ @param listener the listener
+ @param path the path of the document of interest
+ @param documentName the name of the document of interest
+
+
+ Register for all documents
+
+ @param listener the listener who wants to Get all documents
+
+
+ Get am iterator of listeners for a particular document
+
+ @param path the document path
+ @param name the name of the document
+
+ @return an Iterator POIFSReaderListeners; may be empty
+
+
+
+ A POIFS backed by a byte array.
+
+
+
+
+ A POIFS DataSource backed by a File
+ TODO - Return the ByteBuffers in such a way that in RW mode,
+ changes to the buffer end up on the disk (will fix the HPSF TestWrite
+ currently failing unit test when done)
+
+
+
+
+ Reads a sequence of bytes from this FileStream starting at the given file position.
+
+
+ The file position at which the transfer is to begin;
+
+
+
+
+ Writes a sequence of bytes to this FileStream from the given Stream,
+ starting at the given file position.
+
+ The Stream from which bytes are to be transferred
+ The file position at which the transfer is to begin;
+ must be non-negative
+
+
+
+ Common definition of how we read and write bytes
+
+
+
+
+ Close the underlying stream
+
+
+
+
+ Copies the contents to the specified Stream
+
+
+
+
+ Prepare to be written
+
+
+
+ This interface defines methods for finding and setting sibling
+ Property instances
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Gets or sets the previous child.
+
+ The previous child.
+
+
+
+ Gets or sets the next child.
+
+ The next child.
+
+
+
+ Trivial extension of Property for POIFSDocuments
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ the name of the directory
+
+
+
+ Initializes a new instance of the class.
+
+ index number
+ byte data
+ offset into byte data
+
+
+
+ Change a Property's name
+
+ the Property whose name Is being Changed.
+ the new name for the Property
+ true if the name Change could be made, else false
+
+
+
+ Delete a Property
+
+ the Property being Deleted
+ true if the Property could be Deleted, else false
+
+
+
+ Directory Property Comparer
+
+
+
+
+ Object equality, implemented as object identity
+
+ Object we're being Compared to
+ true if identical, else false
+
+
+
+ Compare method. Assumes both parameters are non-null
+ instances of Property. One property is less than another if
+ its name is shorter than the other property's name. If the
+ names are the same length, the property whose name comes
+ before the other property's name, alphabetically, is less
+ than the other property.
+
+ first object to compare, better be a Property
+ second object to compare, better be a Property
+ negative value if o1 smaller than o2,
+ zero if o1 equals o2,
+ positive value if o1 bigger than o2.
+
+
+
+ Gets a value indicating whether this instance is directory.
+
+
+ true if a directory type Property; otherwise, false.
+
+
+
+
+ Perform whatever activities need to be performed prior to
+ writing
+
+
+
+
+ Get an iterator over the children of this Parent; all elements
+ are instances of Property.
+
+ Iterator of children; may refer to an empty collection
+
+
+
+ Add a new child to the collection of children
+
+ the new child to be added; must not be null
+
+
+
+ Trivial extension of Property for POIFSDocuments
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ POIFSDocument name
+ POIFSDocument size
+
+
+
+ Initializes a new instance of the class.
+
+ index number
+ byte data
+ offset into byte data
+
+
+
+ Gets or sets the document.
+
+ the associated POIFSDocument
+
+
+
+ Determines whether this instance is directory.
+
+
+ true if this instance is directory; otherwise, false.
+
+
+
+
+ Perform whatever activities need to be performed prior to
+ writing
+
+
+
+ Update the size of the property's data
+
+
+
+ Behavior for parent (directory) properties
+ @author Marc Johnson27591@hotmail.com
+
+
+
+
+ Get an iterator over the children of this Parent
+ all elements are instances of Property.
+
+
+
+
+
+ Add a new child to the collection of children
+
+ the new child to be added; must not be null
+
+
+
+ Sets the previous child.
+
+
+
+
+ Sets the next child.
+
+
+
+
+ This abstract base class is the ancestor of all classes
+ implementing POIFS Property behavior.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Constructor from byte data
+
+ index number
+ byte data
+ offset into byte data
+
+
+
+ Write the raw data to an OutputStream.
+
+ the OutputStream to which the data Should be
+ written.
+
+
+
+ Gets or sets the start block for the document referred to by this
+ Property.
+
+ the start block index
+
+
+
+ Based on the currently defined size, Should this property use
+ small blocks?
+
+ true if the size Is less than _big_block_minimum_bytes
+
+
+
+ does the length indicate a small document?
+
+ length in bytes
+
+ true if the length Is less than
+ _big_block_minimum_bytes; otherwise, false.
+
+
+
+
+ Gets or sets the name of this property
+
+ property name
+
+
+
+ Gets a value indicating whether this instance is directory.
+
+
+ true if a directory type Property; otherwise, false.
+
+
+
+
+ Gets or sets the storage class ID for this property stream. ThIs Is the Class ID
+ of the COM object which can read and write this property stream
+ Storage Class ID
+
+
+
+ Set the property type. Makes no attempt to validate the value.
+
+ the property type (root, file, directory)
+
+
+
+ Sets the color of the node.
+
+ the node color (red or black)
+
+
+
+ Sets the child property.
+
+ the child property's index in the Property Table
+
+
+
+ Get the child property (its index in the Property Table)
+
+ The index of the child.
+
+
+
+ Gets or sets the size of the document associated with this Property
+
+ the size of the document, in bytes
+
+
+
+ Gets or sets the index.
+
+ The index.
+ Get the index for this Property
+ @return the index of this Property within its Property Table
+
+
+
+ Perform whatever activities need to be performed prior to
+ writing
+
+
+
+
+ Gets the index of the next child.
+
+ The index of the next child.
+
+
+
+ Gets the index of the previous child.
+
+ The index of the previous child.
+
+
+
+ Determines whether the specified index Is valid
+
+ value to be checked
+
+ true if the index Is valid; otherwise, false.
+
+
+
+
+ Gets or sets the previous child.
+
+ the new 'previous' child; may be null, which has
+ the effect of saying there Is no 'previous' child
+
+
+
+ Gets or sets the next Child
+
+ the new 'next' child; may be null, which has the
+ effect of saying there Is no 'next' child
+
+
+
+ Get an array of objects, some of which may implement
+ POIFSViewable
+
+ an array of Object; may not be null, but may be empty
+
+
+
+ Get an Iterator of objects, some of which may implement POIFSViewable
+
+ may not be null, but may have an empty
+ back end store
+
+
+
+ Give viewers a hint as to whether to call GetViewableArray or
+ GetViewableIterator
+
+ true if a viewer Should call GetViewableArray; otherwise, false
+ if a viewer Should call GetViewableIterator
+
+
+
+
+ Provides a short description of the object, to be used when a
+ POIFSViewable object has not provided its contents.
+
+ The short description.
+
+
+
+ Constants used by Properties namespace
+
+
+
+
+ Convert raw data blocks to an array of Property's
+
+ The blocks to be converted
+ the converted List of Property objects. May contain
+ nulls, but will not be null
+
+
+ Default constructor
+
+
+ reading constructor (used when we've read in a file and we want
+ to extract the property table from it). Populates the
+ properties thoroughly
+
+ @param startBlock the first block of the property table
+ @param blockList the list of blocks
+
+ @exception IOException if anything goes wrong (which should be
+ a result of the input being NFG)
+
+
+ Prepare to be written Leon
+
+
+ Return the number of BigBlock's this instance uses
+
+ @return count of BigBlock instances
+
+
+ Write the storage to an Stream
+
+ @param stream the Stream to which the stored data should
+ be written
+
+ @exception IOException on problems writing to the specified
+ stream
+
+
+
+ Initializes a new instance of the class.
+
+ index number
+ byte data
+ offset into byte data
+
+
+
+ Gets or sets the size of the document associated with this Property
+
+ the size of the document, in bytes
+
+
+
+ The block containing the archive header
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+ What big block Size the file uses. Most files
+ use 512 bytes, but a few use 4096
+
+
+ Number of small block allocation table blocks (int)
+ (Number of MiniFAT Sectors in Microsoft parlance)
+
+
+
+ create a new HeaderBlockReader from an Stream
+
+ the source Stream
+
+
+
+ Alerts the short read.
+
+ The read.
+ The expected size.
+
+
+
+ Get start of Property Table
+
+ the index of the first block of the Property Table
+
+
+
+ Gets start of small block allocation table
+
+ The SBAT start.
+
+
+
+ Gets number of BAT blocks
+
+ The BAT count.
+
+
+
+ Gets the BAT array.
+
+ The BAT array.
+
+
+
+ Gets the XBAT count.
+
+ The XBAT count.
+ @return XBAT count
+
+
+
+ Gets the index of the XBAT.
+
+ The index of the XBAT.
+
+
+
+ Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes
+
+ The size of the big block.
+ @return
+
+
+
+ A block of block allocation table entries. BATBlocks are created
+ only through a static factory method: createBATBlocks.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+ For a regular fat block, these are 128 / 1024
+ next sector values.
+ For a XFat (DIFat) block, these are 127 / 1023
+ next sector values, then a chaining value.
+
+
+ Does this BATBlock have any free sectors in it?
+
+
+ Where in the file are we?
+
+
+
+ Create a single instance initialized with default values
+
+
+
+ Create a single instance initialized (perhaps partially) with entries
+
+ @param entries the array of block allocation table entries
+ @param start_index the index of the first entry to be written
+ to the block
+ @param end_index the index, plus one, of the last entry to be
+ written to the block (writing is for all index
+ k, start_index <= k < end_index)
+
+
+ Create a single BATBlock from the byte buffer, which must hold at least
+ one big block of data to be read.
+
+
+ **
+
+
+
+ Create an array of BATBlocks from an array of int block
+ allocation table entries
+
+ the poifs bigBlockSize
+ the array of int entries
+ the newly created array of BATBlocks
+
+
+
+ Create an array of XBATBlocks from an array of int block
+ allocation table entries
+
+
+ the array of int entries
+ the start block of the array of XBAT blocks
+ the newly created array of BATBlocks
+
+
+
+ Calculate how many BATBlocks are needed to hold a specified
+ number of BAT entries.
+
+ the number of entries
+ the number of BATBlocks needed
+
+
+
+ Calculate how many XBATBlocks are needed to hold a specified
+ number of BAT entries.
+
+ the number of entries
+ the number of XBATBlocks needed
+
+
+ Calculates the maximum size of a file which is addressable given the
+ number of FAT (BAT) sectors specified. (We don't care if those BAT
+ blocks come from the 109 in the header, or from header + XBATS, it
+ won't affect the calculation)
+
+ The actual file size will be between [size of fatCount-1 blocks] and
+ [size of fatCount blocks].
+ For 512 byte block sizes, this means we may over-estimate by up to 65kb.
+ For 4096 byte block sizes, this means we may over-estimate by up to 4mb
+
+
+
+ Gets the entries per block.
+
+ The number of entries per block
+
+
+
+ Gets the entries per XBAT block.
+
+ number of entries per XBAT block
+
+
+
+ Gets the XBAT chain offset.
+
+ offset of chain index of XBAT block
+
+
+ Does this BATBlock have any free sectors in it, or
+ is it full?
+
+
+ Retrieve where in the file we live
+
+
+
+ Create a single instance initialized (perhaps partially) with entries
+
+ the array of block allocation table entries
+ the index of the first entry to be written
+ to the block
+ the index, plus one, of the last entry to be
+ written to the block (writing is for all index
+ k, start_index less than k less than end_index)
+
+
+
+
+ Write the block's data to an Stream
+
+ the Stream to which the stored data should
+ be written
+
+
+
+ Abstract base class of all POIFS block storage classes. All
+ extensions of BigBlock should write 512 bytes of data when
+ requested to write their data.
+ This class has package scope, as there is no reason at this time to
+ make the class public.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Default implementation of write for extending classes that
+ contain their data in a simple array of bytes.
+
+ the OutputStream to which the data should be written.
+ the byte array of to be written.
+
+
+
+ Write the block's data to an OutputStream
+
+ the OutputStream to which the stored data should be written
+
+
+
+ Write the storage to an OutputStream
+
+ the OutputStream to which the stored data should be written
+
+
+
+ This class manages and creates the Block Allocation Table, which is
+ basically a set of linked lists of block indices.
+ Each block of the filesystem has an index. The first block, the
+ header, is skipped; the first block after the header is index 0,
+ the next is index 1, and so on.
+ A block's index is also its index into the Block Allocation
+ Table. The entry that it finds in the Block Allocation Table is the
+ index of the next block in the linked list of blocks making up a
+ file, or it is set to -2: end of list.
+
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ create a BlockAllocationTableReader for an existing filesystem. Side
+ effect: when this method finishes, the BAT blocks will have
+ been Removed from the raw block list, and any blocks labeled as
+ 'unused' in the block allocation table will also have been
+ Removed from the raw block list.
+ the poifs bigBlockSize
+ the number of BAT blocks making up the block allocation table
+ the array of BAT block indices from the
+ filesystem's header
+ the number of XBAT blocks
+ the index of the first XBAT block
+ the list of RawDataBlocks
+
+
+
+ create a BlockAllocationTableReader from an array of raw data blocks
+
+
+ the raw data
+ the list holding the managed blocks
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ walk the entries from a specified point and return the
+ associated blocks. The associated blocks are Removed from the block list
+
+ the first block in the chain
+
+ the raw data block list
+ array of ListManagedBlocks, in their correct order
+
+
+
+ determine whether the block specified by index is used or not
+
+ determine whether the block specified by index is used or not
+
+ true if the specified block is used; otherwise, false.
+
+
+
+
+ return the next block index
+
+ The index of the current block
+ index of the next block (may be
+ POIFSConstants.END_OF_CHAIN, indicating end of chain
+ (duh))
+
+
+
+ Convert an array of blocks into a Set of integer indices
+
+ the array of blocks containing the indices
+ the list of blocks being managed. Unused
+ blocks will be eliminated from the list
+
+
+
+ This class manages and creates the Block Allocation Table, which is
+ basically a set of linked lists of block indices.
+ Each block of the filesystem has an index. The first block, the
+ header, is skipped; the first block after the header is index 0,
+ the next is index 1, and so on.
+ A block's index is also its index into the Block Allocation
+ Table. The entry that it finds in the Block Allocation Table is the
+ index of the next block in the linked list of blocks making up a
+ file, or it is set to -2: end of list.
+ *
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Create the BATBlocks we need
+
+ start block index of BAT blocks
+
+
+
+ Allocate space for a block of indices
+
+ the number of blocks to allocate space for
+ the starting index of the blocks
+
+
+
+ Sets the start block for this instance
+
+
+ index into the array of BigBlock instances making up the the filesystem
+
+
+
+
+ create the BATBlocks
+
+
+
+
+ Write the storage to an OutputStream
+
+ the OutputStream to which the stored data should be written
+
+
+
+ Gets the number of BigBlock's this instance uses
+
+ count of BigBlock instances
+
+
+
+ Interface for lists of blocks that are mapped by block allocation
+ tables
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ remove the specified block from the list
+
+ the index of the specified block; if the index is
+ out of range, that's ok
+
+
+
+ Remove and return the specified block from the list
+
+ the index of the specified block
+ the specified block
+
+
+
+ get the blocks making up a particular stream in the list. The
+ blocks are removed from the list.
+
+ the index of the first block in the stream
+
+ the stream as an array of correctly ordered blocks
+
+
+
+ set the associated BlockAllocationTable
+
+ the associated BlockAllocationTable
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ provide blocks to manage
+
+ blocks to be managed
+
+
+
+ remove the specified block from the list
+
+ the index of the specified block; if the index is
+ out of range, that's ok
+
+
+
+ Remove and return the specified block from the list
+
+ the index of the specified block
+ the specified block
+
+
+
+ get the blocks making up a particular stream in the list. The
+ blocks are removed from the list.
+
+ the index of the first block in the stream
+
+
+ the stream as an array of correctly ordered blocks
+
+
+
+
+ set the associated BlockAllocationTable
+
+ the associated BlockAllocationTable
+
+
+
+ An interface for persisting block storage of POIFS components.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Writes the blocks.
+
+ The stream.
+
+
+ Wraps a byte array and provides simple data input access.
+ Internally, this class maintains a buffer read index, so that for the most part, primitive
+ data can be read in a data-input-stream-like manner.
+
+ Note - the calling class should call the {@link #available()} method to detect end-of-buffer
+ and Move to the next data block when the current is exhausted.
+ For optimisation reasons, no error handling is performed in this class. Thus, mistakes in
+ calling code ran may raise ugly exceptions here, like {@link ArrayIndexOutOfBoundsException},
+ etc .
+
+ The multi-byte primitive input methods ({@link #readUshortLE()}, {@link #readIntLE()} and
+ {@link #readLongLE()}) have corresponding 'spanning Read' methods which (when required) perform
+ a read across the block boundary. These spanning read methods take the previous
+ {@link DataInputBlock} as a parameter.
+ Reads of larger amounts of data (into byte array buffers) must be managed by the caller
+ since these could conceivably involve more than two blocks.
+
+ @author Josh Micich
+
+
+ Possibly any size (usually 512K or 64K). Assumed to be at least 8 bytes for all blocks
+ before the end of the stream. The last block in the stream can be any size except zero.
+
+
+ Reads a short which was encoded in little endian format.
+
+
+ Reads a short which spans the end of prevBlock and the start of this block.
+
+
+ Reads an int which was encoded in little endian format.
+
+
+ Reads an int which spans the end of prevBlock and the start of this block.
+
+
+ Reads a long which was encoded in little endian format.
+
+
+ Reads a long which spans the end of prevBlock and the start of this block.
+
+
+ Reads a small amount of data from across the boundary between two blocks.
+ The {@link #_readIndex} of this (the second) block is updated accordingly.
+ Note- this method (and other code) assumes that the second {@link DataInputBlock}
+ always is big enough to complete the read without being exhausted.
+
+
+ Reads len bytes from this block into the supplied buffer.
+
+
+
+ create a document block from a raw data block
+
+ The block.
+
+
+
+ Create a single instance initialized with data.
+
+ the InputStream delivering the data.
+ the poifs bigBlockSize
+
+
+
+ Get the number of bytes Read for this block.
+
+ bytes Read into the block
+
+
+
+ Was this a partially Read block?
+
+ true if the block was only partially filled with data
+
+
+
+ Gets the fill byte used
+
+ The fill byte.
+
+
+
+ convert a single long array into an array of DocumentBlock
+ instances
+
+ the poifs bigBlockSize
+ the byte array to be converted
+ the intended size of the array (which may be smaller)
+ an array of DocumentBlock instances, filled from the
+ input array
+
+
+
+ Read data from an array of DocumentBlocks
+
+ the blocks to Read from
+ the buffer to Write the data into
+ the offset into the array of blocks to Read from
+
+
+
+ Write the storage to an OutputStream
+
+ the OutputStream to which the stored data should
+ be written
+
+
+
+ Constants used in reading/writing the Header block
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ The block containing the archive header
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+ What big block Size the file uses. Most files
+ use 512 bytes, but a few use 4096
+
+
+ Number of small block allocation table blocks (int)
+ (Number of MiniFAT Sectors in Microsoft parlance)
+
+
+
+ create a new HeaderBlockReader from an Stream
+
+ the source Stream
+
+
+
+ Alerts the short read.
+
+ The read.
+ expected size to read
+
+
+
+ Get start of Property Table
+
+ the index of the first block of the Property Table
+
+
+
+ Gets start of small block allocation table
+
+ The SBAT start.
+
+
+
+ Gets number of BAT blocks
+
+ The BAT count.
+
+
+
+ Gets the BAT array.
+
+ The BAT array.
+
+
+
+ Gets the XBAT count.
+
+ The XBAT count.
+ @return XBAT count
+
+
+
+ Gets the index of the XBAT.
+
+ The index of the XBAT.
+
+
+
+ Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes
+
+ The size of the big block.
+ @return
+
+
+
+ The block containing the archive header
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Set BAT block parameters. Assumes that all BAT blocks are
+ contiguous. Will construct XBAT blocks if necessary and return
+ the array of newly constructed XBAT blocks.
+
+ count of BAT blocks
+ index of first BAT block
+ array of XBAT blocks; may be zero Length, will not be
+ null
+
+
+
+ Set start of Property Table
+
+ the index of the first block of the Property
+ Table
+
+
+
+ Set start of small block allocation table
+
+ the index of the first big block of the small
+ block allocation table
+
+
+
+ Set count of SBAT blocks
+
+ the number of SBAT blocks
+
+
+
+ For a given number of BAT blocks, calculate how many XBAT
+ blocks will be needed
+
+
+ number of BAT blocks
+ number of XBAT blocks needed
+
+
+
+ Write the block's data to an Stream
+
+ the Stream to which the stored data should
+ be written
+
+
+
+
+ An interface for blocks managed by a list that works with a
+ BlockAllocationTable to keep block sequences straight
+ @author Marc Johnson (mjohnson at apache dot org
+
+
+
+
+ Get the data from the block
+
+ the block's data as a byte array
+
+
+
+ A block of Property instances
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Create a single instance initialized with default values
+
+
+ the properties to be inserted
+ the offset into the properties array
+
+
+
+ Create an array of PropertyBlocks from an array of Property
+ instances, creating empty Property instances to make up any
+ shortfall
+
+
+ the Property instances to be converted into PropertyBlocks, in a java List
+ the array of newly created PropertyBlock instances
+
+
+
+ Write the block's data to an OutputStream
+
+ the OutputStream to which the stored data should be written
+
+
+
+ A big block created from an InputStream, holding the raw data
+ @author Marc Johnson (mjohnson at apache dot org
+
+
+
+
+ Constructor RawDataBlock
+
+ the Stream from which the data will be read
+
+
+
+ Initializes a new instance of the class.
+
+ the Stream from which the data will be read
+ the size of the POIFS blocks, normally 512 bytes {@link POIFSConstants#BIG_BLOCK_SIZE}
+
+
+
+ When we read the data, did we hit end of file?
+
+ true if the EoF was hit during this block, or; otherwise, falseif not. If you have a dodgy short last block, then
+ it's possible to both have data, and also hit EoF...
+
+
+
+ Did we actually find any data to read? It's possible,
+ in the event of a short last block, to both have hit
+ the EoF, but also to have data
+
+ true if this instance has data; otherwise, false.
+
+
+
+ Get the data from the block
+
+ the block's data as a byte array
+
+
+
+ A list of RawDataBlocks instances, and methods to manage the list
+ @author Marc Johnson (mjohnson at apache dot org
+
+
+
+
+ Initializes a new instance of the class.
+
+ the InputStream from which the data will be read
+ The big block size, either 512 bytes or 4096 bytes
+
+
+
+ This class implements reading the small document block list from an
+ existing file
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ fetch the small document block list from an existing file
+
+ the poifs bigBlockSize
+ the raw data from which the small block table will be extracted
+ the root property (which contains the start block and small block table size)
+ the start block of the SBAT
+ the small document block list
+
+
+
+ This class implements reading the small document block list from an
+ existing file
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ the poifs bigBlockSize
+ a IList of POIFSDocument instances
+ the Filesystem's root property
+
+
+
+ Get the number of SBAT blocks
+
+ number of SBAT big blocks
+
+
+
+ Gets the SBAT.
+
+ the Small Block Allocation Table
+
+
+
+ Return the number of BigBlock's this instance uses
+
+ count of BigBlock instances
+
+
+
+ Sets the start block.
+
+ The start block.
+
+
+
+ Write the storage to an OutputStream
+
+ the OutputStream to which the stored data should be written
+
+
+
+ Storage for documents that are too small to use regular
+ DocumentBlocks for their data
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ convert a single long array into an array of SmallDocumentBlock
+ instances
+
+ the poifs bigBlockSize
+ the byte array to be converted
+ the intended size of the array (which may be smaller)
+ an array of SmallDocumentBlock instances, filled from
+ the array
+
+
+
+ fill out a List of SmallDocumentBlocks so that it fully occupies
+ a Set of big blocks
+
+
+ the List to be filled out.
+ number of big blocks the list encompasses
+
+
+
+ Factory for creating SmallDocumentBlocks from DocumentBlocks
+
+
+ the original DocumentBlocks
+ the total document size
+ an array of new SmallDocumentBlocks instances
+
+
+
+ create a list of SmallDocumentBlock's from raw data
+
+
+ the raw data containing the SmallDocumentBlock
+ a List of SmallDocumentBlock's extracted from the input
+
+
+
+ Read data from an array of SmallDocumentBlocks
+
+ the blocks to Read from.
+ the buffer to Write the data into.
+ the offset into the array of blocks to Read from
+
+
+
+ Calculate the storage size of a Set of SmallDocumentBlocks
+
+ number of SmallDocumentBlocks
+ total size
+
+
+
+ Makes the empty small document block.
+
+
+
+
+
+ Converts to block count.
+
+ The size.
+
+
+
+
+ Write the storage to an OutputStream
+
+ the OutputStream to which the stored data should
+ be written
+
+
+
+ Get the data from the block
+
+ the block's data as a byte array
+
+
+
+ A list of SmallDocumentBlocks instances, and methods to manage the list
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+ a list of SmallDocumentBlock instances
+
+
+
A class describing attributes of the Big Block Size
+
+
+ Returns the value that Gets written into the
+ header.
+ Is the power of two that corresponds to the
+ size of the block, eg 512 => 9
+
+
+
+ A repository for constants shared by POI classes.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+ Most files use 512 bytes as their big block size
+
+
+ Some use 4096 bytes
+
+
+ Most files use 512 bytes as their big block size
+
+
+ Most files use 512 bytes as their big block size
+
+
+ How big a block in the small block stream is. Fixed size
+
+
+ How big a single property is
+
+
+ The minimum size of a document before it's stored using
+ Big Blocks (normal streams). Smaller documents go in the
+ Mini Stream (SBAT / Small Blocks)
+
+
+ The highest sector number you're allowed, 0xFFFFFFFA
+
+
+ Indicates the sector holds a FAT block (0xFFFFFFFD)
+
+
+ Indicates the sector holds a DIFAT block (0xFFFFFFFC)
+
+
+ Indicates the sector is the end of a chain (0xFFFFFFFE)
+
+
+ Indicates the sector is not used (0xFFFFFFFF)
+
+
+ The first 4 bytes of an OOXML file, used in detection
+
+
+
+ Interface for a drill-down viewable object. Such an object has
+ content that may or may not be displayed, at the discretion of the
+ viewer. The content is returned to the viewer as an array or as an
+ Iterator, and the object provides a clue as to which technique the
+ viewer should use to get its content.
+ A POIFSViewable object is also expected to provide a short
+ description of itself, that can be used by a viewer when the
+ viewable object is collapsed.
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Provides a short description of the object to be used when a
+ POIFSViewable object has not provided its contents.
+
+ true if [prefer array]; otherwise, false.
+
+
+
+ Gets the short description.
+
+ The short description.
+
+
+
+ Get an array of objects, some of which may implement POIFSViewable
+
+ The viewable array.
+
+
+
+ Give viewers a hint as to whether to call ViewableArray or ViewableIterator
+
+ The viewable iterator.
+
+
+
+ This class contains methods used to inspect POIFSViewable objects
+ @author Marc Johnson (mjohnson at apache dot org)
+
+
+
+
+ Inspect an object that may be viewable, and drill down if told to
+
+ the object to be viewed
+ if true and the object implements POIFSViewable, inspect the objects' contents
+ how far in to indent each string
+ string to use for indenting
+ a List of Strings holding the content
+
+
+
+ Indents the specified indent level.
+
+ how far in to indent each string
+ string to use for indenting
+ The data.
+
+
+
+ Copies an Entry into a target POIFS directory, recursively
+
+
+ Copies nodes from one POIFS to the other minus the excepts
+
+ @param source
+ is the source POIFS to copy from
+ @param target
+ is the target POIFS to copy to
+ @param excepts
+ is a list of Strings specifying what nodes NOT to copy
+
+
+ Copies nodes from one POIFS to the other minus the excepts
+
+ @param source
+ is the source POIFS to copy from
+ @param target
+ is the target POIFS to copy to
+ @param excepts
+ is a list of Strings specifying what nodes NOT to copy
+
+
+ Implementation of a BlockingInputStream to provide data to
+ RawDataBlock that expects data in 512 byte chunks. Useful to read
+ data from slow (ie, non FileInputStream) sources, for example when
+ Reading an OLE2 Document over a network.
+
+ Possible extentions: add a timeout. Curently a call to Read(byte[]) on this
+ class is blocking, so use at your own peril if your underlying stream blocks.
+
+ @author Jens Gerhard
+ @author aviks - documentation cleanups.
+
+
+ We had to revert to byte per byte Reading to keep
+ with slow network connections on one hand, without
+ missing the end-of-file.
+ This is the only method that does its own thing in this class
+ everything else is delegated to aggregated stream.
+ THIS IS A BLOCKING BLOCK READ!!!
+
+
+
+ Returns the number of elements between the current position and the limit.
+
+ The number of elements remaining in this buffer
+
+
+
+ Tells whether there are any elements between the current position and the limit.
+
+ true if, and only if, there is at least one element remaining in this buffer
+
+
+
+ Represents a class ID (16 bytes). Unlike other little-endian
+ type the {@link ClassID} is not just 16 bytes stored in the wrong
+ order. Instead, it is a double word (4 bytes) followed by two
+ words (2 bytes each) followed by 8 bytes.
+ @author Rainer Klute
+ klute@rainer-klute.de
+ @version $Id: ClassID.java 489730 2006-12-22 19:18:16Z bayard $
+ @since 2002-02-09
+
+
+
+ The bytes making out the class ID in correct order,
+ i.e. big-endian.
+
+
+
+ Creates a and Reads its value from a byte array.
+
+ The byte array to Read from.
+ The offset of the first byte to Read.
+
+
+
+ Creates a and initializes its value with 0x00 bytes.
+
+
+
+
Creates a {@link ClassID} from a human-readable representation of the Class ID in standard
+ format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}".
+
+ @param externalForm representation of the Class ID represented by this object.
+
+
+ The number of bytes occupied by this object in the byte
+ stream.
+
+
+
+ Gets the length.
+
+ The number of bytes occupied by this object in the byte stream.
+
+
+
+ Gets or sets the bytes making out the class ID. They are returned in correct order, i.e. big-endian.
+
+ the bytes making out the class ID..
+
+
+
+ Reads the class ID's value from a byte array by turning little-endian into big-endian.
+
+ The byte array to Read from
+ The offset within the
+ A byte array containing the class ID.
+
+
+
+ Writes the class ID to a byte array in the little-endian format.
+
+ The byte array to Write to.
+ The offset within the
+
+
+
+ Checks whether this ClassID is equal to another
+ object.
+
+ the object to compare this PropertySet with
+ true if the objects are equal, else
+ false
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a human-Readable representation of the Class ID in standard
+ format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}".
+
+
+ A String representation of the Class ID represented by this object..
+
+
+
+
+ Fills the specified array.
+
+ The array.
+ The default value.
+
+
+
+ Assigns the specified byte value to each element of the specified
+ range of the specified array of bytes. The range to be filled
+ extends from index fromIndex, inclusive, to index
+ toIndex, exclusive. (If fromIndex==toIndex, the
+ range to be filled is empty.)
+
+ the array to be filled
+ the index of the first element (inclusive) to be filled with the specified value
+ the index of the last element (exclusive) to be filled with the specified value
+ the value to be stored in all elements of the array
+ if fromIndex > toIndex
+ if fromIndex < 0 or toIndex > a.length
+
+
+
+ Checks that {@code fromIndex} and {@code toIndex} are in
+ the range and throws an appropriate exception, if they aren't.
+
+
+
+
+
+
+
+ Convert Array to ArrayList
+
+ source array
+
+
+
+
+ Fills the specified array.
+
+ The array.
+ The default value.
+
+
+
+ Equals the specified a1.
+
+ The a1.
+ The b1.
+
+
+
+ Returns true if the two specified arrays of Objects are
+ equal to one another. The two arrays are considered equal if
+ both arrays contain the same number of elements, and all corresponding
+ pairs of elements in the two arrays are equal. Two objects e1
+ and e2 are considered equal if (e1==null ? e2==null
+ : e1.equals(e2)). In other words, the two arrays are equal if
+ they contain the same elements in the same order. Also, two array
+ references are considered equal if both are null.
+
+ @param a one array to be tested for equality
+ @param a2 the other array to be tested for equality
+ @return true if the two arrays are equal
+
+
+
+ Moves a number of entries in an array to another point in the array, shifting those inbetween as required.
+
+ The array to alter
+ The (0 based) index of the first entry to move
+ The (0 based) index of the positition to move to
+ The number of entries to move
+
+
+
+ Copies the specified array, truncating or padding with zeros (if
+ necessary) so the copy has the specified length. This method is temporary
+ replace for Arrays.copyOf() until we start to require JDK 1.6.
+
+ the array to be copied
+ the length of the copy to be returned
+ a copy of the original array, truncated or padded with zeros to obtain the specified length
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two long arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Long}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two non-null int arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link int}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two short arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link short}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two char arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Character}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two byte arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Byte}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two bool arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Boolean}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two float arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Float}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array.
+ For any two double arrays a and b
+ such that Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is the same value that would be
+ obtained by invoking the {@link List#hashCode() hashCode}
+ method on a {@link List} Containing a sequence of {@link Double}
+ instances representing the elements of a in the same order.
+ If a is null, this method returns 0.
+
+ @param a the array whose hash value to compute
+ @return a content-based hash code for a
+ @since 1.5
+
+
+ Returns a hash code based on the contents of the specified array. If
+ the array Contains other arrays as elements, the hash code is based on
+ their identities rather than their contents. It is therefore
+ acceptable to invoke this method on an array that Contains itself as an
+ element, either directly or indirectly through one or more levels of
+ arrays.
+
+ For any two arrays a and b such that
+ Arrays.Equals(a, b), it is also the case that
+ Arrays.HashCode(a) == Arrays.HashCode(b).
+
+ The value returned by this method is equal to the value that would
+ be returned by Arrays.AsList(a).HashCode(), unless a
+ is null, in which case 0 is returned.
+
+ @param a the array whose content-based hash code to compute
+ @return a content-based hash code for a
+ @see #deepHashCode(Object[])
+ @since 1.5
+
+
+ Returns a hash code based on the "deep contents" of the specified
+ array. If the array Contains other arrays as elements, the
+ hash code is based on their contents and so on, ad infInitum.
+ It is therefore unacceptable to invoke this method on an array that
+ Contains itself as an element, either directly or indirectly through
+ one or more levels of arrays. The behavior of such an invocation is
+ undefined.
+
+ For any two arrays a and b such that
+ Arrays.DeepEquals(a, b), it is also the case that
+ Arrays.DeepHashCode(a) == Arrays.DeepHashCode(b).
+
+ The computation of the value returned by this method is similar to
+ that of the value returned by {@link List#hashCode()} on a list
+ Containing the same elements as a in the same order, with one
+ difference: If an element e of a is itself an array,
+ its hash code is computed not by calling e.HashCode(), but as
+ by calling the appropriate overloading of Arrays.HashCode(e)
+ if e is an array of a primitive type, or as by calling
+ Arrays.DeepHashCode(e) recursively if e is an array
+ of a reference type. If a is null, this method
+ returns 0.
+
+ @param a the array whose deep-content-based hash code to compute
+ @return a deep-content-based hash code for a
+ @see #hashCode(Object[])
+ @since 1.5
+
+
+ Returns true if the two specified arrays are deeply
+ Equal to one another. Unlike the {@link #Equals(Object[],Object[])}
+ method, this method is appropriate for use with nested arrays of
+ arbitrary depth.
+
+ Two array references are considered deeply equal if both
+ are null, or if they refer to arrays that contain the same
+ number of elements and all corresponding pairs of elements in the two
+ arrays are deeply Equal.
+
+ Two possibly null elements e1 and e2 are
+ deeply equal if any of the following conditions hold:
+
+
e1 and e2 are both arrays of object reference
+ types, and Arrays.DeepEquals(e1, e2) would return true
+
e1 and e2 are arrays of the same primitive
+ type, and the appropriate overloading of
+ Arrays.Equals(e1, e2) would return true.
+
e1 == e2
+
e1.Equals(e2) would return true.
+
+ Note that this defInition permits null elements at any depth.
+
+ If either of the specified arrays contain themselves as elements
+ either directly or indirectly through one or more levels of arrays,
+ the behavior of this method is undefined.
+
+ @param a1 one array to be tested for Equality
+ @param a2 the other array to be tested for Equality
+ @return true if the two arrays are equal
+ @see #Equals(Object[],Object[])
+ @see Objects#deepEquals(Object, Object)
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(long). Returns "null" if a
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(int). Returns "null" if a is
+ null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(short). Returns "null" if a
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(char). Returns "null" if a
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements
+ are Separated by the characters ", " (a comma followed
+ by a space). Elements are Converted to strings as by
+ String.ValueOf(byte). Returns "null" if
+ a is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(bool). Returns "null" if
+ a is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(float). Returns "null" if a
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ The string representation consists of a list of the array's elements,
+ enclosed in square brackets ("[]"). Adjacent elements are
+ Separated by the characters ", " (a comma followed by a
+ space). Elements are Converted to strings as by
+ String.ValueOf(double). Returns "null" if a
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @since 1.5
+
+
+ Returns a string representation of the "deep contents" of the specified
+ array. If the array Contains other arrays as elements, the string
+ representation Contains their contents and so on. This method is
+ designed for Converting multidimensional arrays to strings.
+
+ The string representation consists of a list of the array's
+ elements, enclosed in square brackets ("[]"). Adjacent
+ elements are Separated by the characters ", " (a comma
+ followed by a space). Elements are Converted to strings as by
+ String.ValueOf(Object), unless they are themselves
+ arrays.
+
+ If an element e is an array of a primitive type, it is
+ Converted to a string as by invoking the appropriate overloading of
+ Arrays.ToString(e). If an element e is an array of a
+ reference type, it is Converted to a string as by invoking
+ this method recursively.
+
+ To avoid infInite recursion, if the specified array Contains itself
+ as an element, or Contains an indirect reference to itself through one
+ or more levels of arrays, the self-reference is Converted to the string
+ "[...]". For example, an array Containing only a reference
+ to itself would be rendered as "[[...]]".
+
+ This method returns "null" if the specified array
+ is null.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @see #ToString(Object[])
+ @since 1.5
+
+
+ Returns a string representation of the contents of the specified array.
+ If the array contains other arrays as elements, they are converted to
+ strings by the {@link Object#toString} method inherited from
+ Object, which describes their identities rather than
+ their contents.
+
+
The value returned by this method is equal to the value that would
+ be returned by Arrays.asList(a).toString(), unless a
+ is null, in which case "null" is returned.
+
+ @param a the array whose string representation to return
+ @return a string representation of a
+ @see #deepToString(Object[])
+ @since 1.5
+
+
+ The signum of this BigInteger: -1 for negative, 0 for zero, or
+ 1 for positive. Note that the BigInteger zero must have
+ a signum of 0. This is necessary to ensures that there is exactly one
+ representation for each BigInteger value.
+
+ @serial
+
+
+ The magnitude of this BigInteger, in big-endian order: the
+ zeroth element of this array is the most-significant int of the
+ magnitude. The magnitude must be "minimal" in that the most-significant
+ int ({@code mag[0]}) must be non-zero. This is necessary to
+ ensure that there is exactly one representation for each BigInteger
+ value. Note that this implies that the BigInteger zero has a
+ zero-length mag array.
+
+
+ One plus the bitCount of this BigInteger. Zeros means unitialized.
+
+ @serial
+ @see #bitCount
+ @deprecated Deprecated since logical value is offset from stored
+ value and correction factor is applied in accessor method.
+
+
+ One plus the bitLength of this BigInteger. Zeros means unitialized.
+ (either value is acceptable).
+
+ @serial
+ @see #bitLength()
+ @deprecated Deprecated since logical value is offset from stored
+ value and correction factor is applied in accessor method.
+
+
+ Two plus the index of the lowest-order int in the magnitude of this
+ BigInteger that contains a nonzero int, or -2 (either value is acceptable).
+ The least significant int has int-number 0, the next int in order of
+ increasing significance has int-number 1, and so forth.
+ @deprecated Deprecated since logical value is offset from stored
+ value and correction factor is applied in accessor method.
+
+
+ This mask is used to obtain the value of an int as if it were unsigned.
+
+
+ This internal constructor differs from its public cousin
+ with the arguments reversed in two ways: it assumes that its
+ arguments are correct, and it doesn't copy the magnitude array.
+
+
+ Translates a byte array containing the two's-complement binary
+ representation of a BigInteger into a BigInteger. The input array is
+ assumed to be in big-endian byte-order: the most significant
+ byte is in the zeroth element.
+
+ @param val big-endian two's-complement binary representation of
+ BigInteger.
+ @throws NumberFormatException {@code val} is zero bytes long.
+
+
+ This private constructor translates an int array containing the
+ two's-complement binary representation of a BigInteger into a
+ BigInteger. The input array is assumed to be in big-endian
+ int-order: the most significant int is in the zeroth element.
+
+
+ Constructs a BigInteger with the specified value, which may not be zero.
+
+
+ Returns the input array stripped of any leading zero bytes.
+ Since the source is trusted the copying may be skipped.
+
+
+ Returns the String representation of this BigInteger in the
+ given radix. If the radix is outside the range from {@link
+ Character#Min_RADIX} to {@link Character#Max_RADIX} inclusive,
+ it will default to 10 (as is the case for
+ {@code Integer.toString}). The digit-to-character mapping
+ provided by {@code Character.forDigit} is used, and a minus
+ sign is prepended if appropriate. (This representation is
+ compatible with the {@link #BigInteger(String, int) (String,
+ int)} constructor.)
+
+ @param radix radix of the String representation.
+ @return String representation of this BigInteger in the given radix.
+ @see Integer#toString
+ @see Character#forDigit
+ @see #BigInteger(java.lang.String, int)
+
+
+ The BigInteger constant zero.
+
+ @since 1.2
+
+
+ The BigInteger constant one.
+
+ @since 1.2
+
+
+ The BigInteger constant two. (Not exported.)
+
+
+ The BigInteger constant ten.
+
+ @since 1.5
+
+
+ Returns a BigInteger whose value is equal to that of the
+ specified {@code long}. This "static factory method" is
+ provided in preference to a ({@code long}) constructor
+ because it allows for reuse of frequently used BigIntegers.
+
+ @param val value of the BigInteger to return.
+ @return a BigInteger with the specified value.
+
+
+ Returns a BigInteger with the given two's complement representation.
+ Assumes that the input array will not be modified (the returned
+ BigInteger will reference the input array if feasible).
+
+
+ Package private method to return bit length for an integer.
+
+
+ Returns the number of bits in the two's complement representation
+ of this BigInteger that differ from its sign bit. This method is
+ useful when implementing bit-vector style sets atop BigIntegers.
+
+ @return number of bits in the two's complement representation
+ of this BigInteger that differ from its sign bit.
+
+
+ Returns a BigInteger whose value is the absolute value of this
+ BigInteger.
+
+ @return {@code abs(this)}
+
+
+ Returns a BigInteger whose value is {@code (-this)}.
+
+ @return {@code -this}
+
+
+ Returns a BigInteger whose value is (thisexponent).
+ Note that {@code exponent} is an integer rather than a BigInteger.
+
+ @param exponent exponent to which this BigInteger is to be raised.
+ @return thisexponent
+ @throws ArithmeticException {@code exponent} is negative. (This would
+ cause the operation to yield a non-integer value.)
+
+
+ Multiplies int arrays x and y to the specified lengths and places
+ the result into z. There will be no leading zeros in the resultant array.
+
+
+ Multiply an array by one word k and add to result, return the carry
+
+
+ Squares the contents of the int array x. The result is placed into the
+ int array z. The contents of x are not changed.
+
+
+ Add one word to the number a mlen words into a. Return the resulting
+ carry.
+
+
+ Returns the signum function of this BigInteger.
+
+ @return -1, 0 or 1 as the value of this BigInteger is negative, zero or
+ positive.
+
+
+ Returns a byte array containing the two's-complement
+ representation of this BigInteger. The byte array will be in
+ big-endian byte-order: the most significant byte is in
+ the zeroth element. The array will contain the minimum number
+ of bytes required to represent this BigInteger, including at
+ least one sign bit, which is {@code (ceil((this.bitLength() +
+ 1)/8))}. (This representation is compatible with the
+ {@link #BigInteger(byte[]) (byte[])} constructor.)
+
+ @return a byte array containing the two's-complement representation of
+ this BigInteger.
+ @see #BigInteger(byte[])
+
+
+ Returns the length of the two's complement representation in ints,
+ including space for at least one sign bit.
+
+
+ Returns the specified int of the little-endian two's complement
+ representation (int 0 is the least significant). The int number can
+ be arbitrarily high (values are logically preceded by infinitely many
+ sign ints).
+
+
+ Returns the index of the int that contains the first nonzero int in the
+ little-endian binary representation of the magnitude (int 0 is the
+ least significant). If the magnitude is zero, return value is undefined.
+
+
+ Returns a copy of the input array stripped of any leading zero bytes.
+
+
+ Takes an array a representing a negative 2's-complement number and
+ returns the minimal (no leading zero bytes) unsigned whose value is -a.
+
+
+ Takes an array a representing a negative 2's-complement number and
+ returns the minimal (no leading zero ints) unsigned whose value is -a.
+
+
+ Returns the number of zero bits preceding the highest-order
+ ("leftmost") one-bit in the two's complement binary representation
+ of the specified {@code int} value. Returns 32 if the
+ specified value has no one-bits in its two's complement representation,
+ in other words if it is equal to zero.
+
+ Note that this method is closely related to the logarithm base 2.
+ For all positive {@code int} values x:
+
+
+ @return the number of zero bits preceding the highest-order
+ ("leftmost") one-bit in the two's complement binary representation
+ of the specified {@code int} value, or 32 if the value
+ is equal to zero.
+ @since 1.5
+
+
+ Returns the number of zero bits following the lowest-order ("rightmost")
+ one-bit in the two's complement binary representation of the specified
+ {@code int} value. Returns 32 if the specified value has no
+ one-bits in its two's complement representation, in other words if it is
+ equal to zero.
+
+ @return the number of zero bits following the lowest-order ("rightmost")
+ one-bit in the two's complement binary representation of the
+ specified {@code int} value, or 32 if the value is equal
+ to zero.
+ @since 1.5
+
+
+ Returns the number of one-bits in the two's complement binary
+ representation of the specified {@code int} value. This function is
+ sometimes referred to as the population count.
+
+ @return the number of one-bits in the two's complement binary
+ representation of the specified {@code int} value.
+ @since 1.5
+
+
+ Compares the magnitude array of this BigInteger with the specified
+ BigInteger's. This is the version of compareTo ignoring sign.
+
+ @param val BigInteger whose magnitude array to be compared.
+ @return -1, 0 or 1 as this magnitude array is less than, equal to or
+ greater than the magnitude aray for the specified BigInteger's.
+
+
+ Compares this BigInteger with the specified Object for equality.
+
+ @param x Object to which this BigInteger is to be compared.
+ @return {@code true} if and only if the specified Object is a
+ BigInteger whose value is numerically equal to this BigInteger.
+
+
+ Returns the minimum of this BigInteger and {@code val}.
+
+ @param val value with which the minimum is to be computed.
+ @return the BigInteger whose value is the lesser of this BigInteger and
+ {@code val}. If they are equal, either may be returned.
+
+
+ Returns the maximum of this BigInteger and {@code val}.
+
+ @param val value with which the maximum is to be computed.
+ @return the BigInteger whose value is the greater of this and
+ {@code val}. If they are equal, either may be returned.
+
+
+ Returns the hash code for this BigInteger.
+
+ @return hash code for this BigInteger.
+
+
+ Converts this BigInteger to an {@code int}. This
+ conversion is analogous to a
+ narrowing primitive conversion from {@code long} to
+ {@code int} as defined in section 5.1.3 of
+ The Java(TM) Language Specification:
+ if this BigInteger is too big to fit in an
+ {@code int}, only the low-order 32 bits are returned.
+ Note that this conversion can lose information about the
+ overall magnitude of the BigInteger value as well as return a
+ result with the opposite sign.
+
+ @return this BigInteger converted to an {@code int}.
+
+
+ Converts this BigInteger to a {@code long}. This
+ conversion is analogous to a
+ narrowing primitive conversion from {@code long} to
+ {@code int} as defined in section 5.1.3 of
+ The Java(TM) Language Specification:
+ if this BigInteger is too big to fit in a
+ {@code long}, only the low-order 64 bits are returned.
+ Note that this conversion can lose information about the
+ overall magnitude of the BigInteger value as well as return a
+ result with the opposite sign.
+
+ @return this BigInteger converted to a {@code long}.
+
+
+ Returns a BigInteger whose value is {@code (this >> n)}. Sign
+ extension is performed. The shift distance, {@code n}, may be
+ negative, in which case this method performs a left shift.
+ (Computes floor(this / 2n).)
+
+ @param n shift distance, in bits.
+ @return {@code this >> n}
+ @throws ArithmeticException if the shift distance is {@code
+ Integer.Min_VALUE}.
+ @see #shiftLeft
+
+
+ Returns a BigInteger whose value is {@code (~this)}. (This method
+ returns a negative value if and only if this BigInteger is
+ non-negative.)
+
+ @return {@code ~this}
+
+
+ Returns a BigInteger whose value is {@code (this | val)}. (This method
+ returns a negative BigInteger if and only if either this or val is
+ negative.)
+
+ @param val value to be OR'ed with this BigInteger.
+ @return {@code this | val}
+
+
+ Package private methods used by BigDecimal code to multiply a BigInteger
+ with a long. Assumes v is not equal to INFLATED.
+
+
+ Returns a BigInteger whose value is {@code (this * val)}.
+
+ @param val value to be multiplied by this BigInteger.
+ @return {@code this * val}
+
+
+ Returns a BigInteger whose value is {@code (this + val)}.
+
+ @param val value to be added to this BigInteger.
+ @return {@code this + val}
+
+
+ Adds the contents of the int arrays x and y. This method allocates
+ a new int array to hold the answer and returns a reference to that
+ array.
+
+
+ Returns a BigInteger whose value is {@code (this - val)}.
+
+ @param val value to be subtracted from this BigInteger.
+ @return {@code this - val}
+
+
+ Subtracts the contents of the second int arrays (little) from the
+ first (big). The first int array (big) must represent a larger number
+ than the second. This method allocates the space necessary to hold the
+ answer.
+
+
+ Returns a BigInteger whose value is {@code (this / val)}.
+
+ @param val value by which this BigInteger is to be divided.
+ @return {@code this / val}
+ @throws ArithmeticException if {@code val} is zero.
+
+
+ Holds the magnitude of this MutableBigInteger in big endian order.
+ The magnitude may start at an offset into the value array, and it may
+ end before the length of the value array.
+
+
+ The number of ints of the value array that are currently used
+ to hold the magnitude of this MutableBigInteger. The magnitude starts
+ at an offset and offset + intLen may be less than value.Length.
+
+
+ The offset into the value array where the magnitude of this
+ MutableBigInteger begins.
+
+
+ MutableBigInteger with one element value array with the value 1. Used by
+ BigDecimal divideAndRound to increment the quotient. Use this constant
+ only when the method is not going to modify this object.
+
+
+ The default constructor. An empty MutableBigInteger is created with
+ a one word capacity.
+
+
+ Construct a new MutableBigInteger with a magnitude specified by
+ the int val.
+
+
+ Construct a new MutableBigInteger with the specified value array
+ up to the length of the array supplied.
+
+
+ Construct a new MutableBigInteger with a magnitude equal to the
+ specified BigInteger.
+
+
+ Construct a new MutableBigInteger with a magnitude equal to the
+ specified MutableBigInteger.
+
+
+ Internal helper method to return the magnitude array. The caller is not
+ supposed to modify the returned array.
+
+
+ Convert this MutableBigInteger to a long value. The caller has to make
+ sure this MutableBigInteger can be fit into long.
+
+
+ Convert this MutableBigInteger to a BigInteger object.
+
+
+ Clear out a MutableBigInteger for reuse.
+
+
+ Set a MutableBigInteger to zero, removing its offset.
+
+
+ Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1
+ as this MutableBigInteger is numerically less than, equal to, or
+ greater than b.
+
+
+ Compare this against half of a MutableBigInteger object (Needed for
+ remainder tests).
+ Assumes no leading unnecessary zeros, which holds for results
+ from divide().
+
+
+ Return the index of the lowest set bit in this MutableBigInteger. If the
+ magnitude of this MutableBigInteger is zero, -1 is returned.
+
+
+ Return the int in use in this MutableBigInteger at the specified
+ index. This method is not used because it is not inlined on all
+ platforms.
+
+
+ Return a long which is equal to the unsigned value of the int in
+ use in this MutableBigInteger at the specified index. This method is
+ not used because it is not inlined on all platforms.
+
+
+ Ensure that the MutableBigInteger is in normal form, specifically
+ making sure that there are no leading zeros, and that if the
+ magnitude is zero, then intLen is zero.
+
+
+ If this MutableBigInteger cannot hold len words, increase the size
+ of the value array to len words.
+
+
+ Convert this MutableBigInteger into an int array with no leading
+ zeros, of a length that is equal to this MutableBigInteger's intLen.
+
+
+ Sets the int at index+offset in this MutableBigInteger to val.
+ This does not get inlined on all platforms so it is not used
+ as often as originally intended.
+
+
+ Sets this MutableBigInteger's value array to the specified array.
+ The intLen is set to the specified length.
+
+
+ Sets this MutableBigInteger's value array to a copy of the specified
+ array. The intLen is set to the length of the new array.
+
+
+ Sets this MutableBigInteger's value array to a copy of the specified
+ array. The intLen is set to the length of the specified array.
+
+
+ Returns true iff this MutableBigInteger has a value of one.
+
+
+ Returns true iff this MutableBigInteger has a value of zero.
+
+
+ Returns true iff this MutableBigInteger is even.
+
+
+ Returns true iff this MutableBigInteger is odd.
+
+
+ Returns true iff this MutableBigInteger is in normal form. A
+ MutableBigInteger is in normal form if it has no leading zeros
+ after the offset, and intLen + offset <= value.Length.
+
+
+ Returns a String representation of this MutableBigInteger in radix 10.
+
+
+ Right shift this MutableBigInteger n bits. The MutableBigInteger is left
+ in normal form.
+
+
+ Left shift this MutableBigInteger n bits.
+
+
+ A primitive used for division. This method adds in one multiple of the
+ divisor a back to the dividend result at a specified offset. It is used
+ when qhat was estimated too large, and must be adjusted.
+
+
+ This method is used for division. It multiplies an n word input a by one
+ word input x, and subtracts the n word product from q. This is needed
+ when subtracting qhat*divisor from dividend.
+
+
+ Right shift this MutableBigInteger n bits, where n is
+ less than 32.
+ Assumes that intLen > 0, n > 0 for speed
+
+
+ Left shift this MutableBigInteger n bits, where n is
+ less than 32.
+ Assumes that intLen > 0, n > 0 for speed
+
+
+ Adds the contents of two MutableBigInteger objects.The result
+ is placed within this MutableBigInteger.
+ The contents of the addend are not changed.
+
+
+ Subtracts the smaller of this and b from the larger and places the
+ result into this MutableBigInteger.
+
+
+ Subtracts the smaller of a and b from the larger and places the result
+ into the larger. Returns 1 if the answer is in a, -1 if in b, 0 if no
+ operation was performed.
+
+
+ Multiply the contents of two MutableBigInteger objects. The result is
+ placed into MutableBigInteger z. The contents of y are not changed.
+
+
+ Multiply the contents of this MutableBigInteger by the word y. The
+ result is placed into z.
+
+
+ This method is used for division of an n word dividend by a one word
+ divisor. The quotient is placed into quotient. The one word divisor is
+ specified by divisor.
+
+ @return the remainder of the division is returned.
+
+
+
+ Calculates the quotient of this div b and places the quotient in the
+ provided MutableBigInteger objects and the remainder object is returned.
+
+ Uses Algorithm D in Knuth section 4.3.1.
+ Many optimizations to that algorithm have been adapted from the Colin
+ Plumb C library.
+ It special cases one word divisors for speed. The content of b is not
+ changed.
+
+
+
+ Internally used to calculate the quotient of this div v and places the
+ quotient in the provided MutableBigInteger object and the remainder is
+ returned.
+
+ @return the remainder of the division will be returned.
+
+
+ Divide this MutableBigInteger by the divisor represented by its magnitude
+ array. The quotient will be placed into the provided quotient object &
+ the remainder object is returned.
+
+
+ Compare two longs as if they were unsigned.
+ Returns true iff one is bigger than two.
+
+
+ This method divides a long quantity by an int to estimate
+ qhat for two multi precision numbers. It is used when
+ the signed value of n is less than zero.
+
+
+ Calculate GCD of this and b. This and b are changed by the computation.
+
+
+ Calculate GCD of this and v.
+ Assumes that this and v are not zero.
+
+
+ Calculate GCD of a and b interpreted as unsigned integers.
+
+
+ Returns the modInverse of this mod p. This and p are not affected by
+ the operation.
+
+
+ Calculate the multiplicative inverse of this mod mod, where mod is odd.
+ This and mod are not changed by the calculation.
+
+ This method implements an algorithm due to Richard Schroeppel, that uses
+ the same intermediate representation as Montgomery Reduction
+ ("Montgomery Form"). The algorithm is described in an unpublished
+ manuscript entitled "Fast Modular Reciprocals."
+
+
+ Uses the extended Euclidean algorithm to compute the modInverse of base
+ mod a modulus that is a power of 2. The modulus is 2^k.
+
+
+
+ Manage operations dealing with bit-mapped fields.
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+
+
+ Create a instance
+
+
+ the mask specifying which bits apply to this
+ BitField. Bits that are set in this mask are the
+ bits that this BitField operates on
+
+
+
+
+ Create a instance
+
+
+ the mask specifying which bits apply to this
+ BitField. Bits that are set in this mask are the
+ bits that this BitField operates on
+
+
+
+
+ Clear the bits.
+
+ the int data containing the bits we're interested in
+ the value of holder with the specified bits cleared (set to 0)
+
+
+
+ Clear the bits.
+
+ the short data containing the bits we're interested in
+ the value of holder with the specified bits cleared (set to 0)
+
+
+
+ Obtain the value for the specified BitField, appropriately
+ shifted right. Many users of a BitField will want to treat the
+ specified bits as an int value, and will not want to be aware
+ that the value is stored as a BitField (and so shifted left so
+ many bits)
+
+ the int data containing the bits we're interested in
+ the selected bits, shifted right appropriately
+
+
+
+ Obtain the value for the specified BitField, unshifted
+
+ the short data containing the bits we're interested in
+ the selected bits
+
+
+
+ Obtain the value for the specified BitField, appropriately
+ shifted right, as a short. Many users of a BitField will want
+ to treat the specified bits as an int value, and will not want
+ to be aware that the value is stored as a BitField (and so
+ shifted left so many bits)
+
+ the short data containing the bits we're interested in
+ the selected bits, shifted right appropriately
+
+
+
+ Obtain the value for the specified BitField, appropriately
+ shifted right. Many users of a BitField will want to treat the
+ specified bits as an int value, and will not want to be aware
+ that the value is stored as a BitField (and so shifted left so
+ many bits)
+
+ the int data containing the bits we're interested in
+ the selected bits, shifted right appropriately
+
+
+
+ Are all of the bits set or not? This is a stricter test than
+ isSet, in that all of the bits in a multi-bit set must be set
+ for this method to return true
+
+ the int data containing the bits we're interested in
+
+ true if all of the bits are set otherwise, false.
+
+
+
+
+ is the field set or not? This is most commonly used for a
+ single-bit field, which is often used to represent a boolean
+ value; the results of using it for a multi-bit field is to
+ determine whether *any* of its bits are set
+
+ the int data containing the bits we're interested in
+
+ true if any of the bits are set; otherwise, false.
+
+
+
+
+ Set the bits.
+
+ the int data containing the bits we're interested in
+ the value of holder with the specified bits set to 1
+
+
+
+ Set a boolean BitField
+
+ the int data containing the bits we're interested in
+ indicating whether to set or clear the bits
+ the value of holder with the specified bits set or cleared
+
+
+
+ Set the bits.
+
+ the short data containing the bits we're interested in
+ the value of holder with the specified bits set to 1
+
+
+
+ Set a boolean BitField
+
+ the short data containing the bits we're interested in
+ indicating whether to set or clear the bits
+ the value of holder with the specified bits set or cleared
+
+
+
+ Obtain the value for the specified BitField, appropriately
+ shifted right, as a short. Many users of a BitField will want
+ to treat the specified bits as an int value, and will not want
+ to be aware that the value is stored as a BitField (and so
+ shifted left so many bits)
+
+ the short data containing the bits we're interested in
+ the new value for the specified bits
+ the selected bits, shifted right appropriately
+
+
+
+ Sets the value.
+
+ the byte data containing the bits we're interested in
+ The value.
+
+
+
+
+ Set a boolean BitField
+
+ the byte data containing the bits we're interested in
+ indicating whether to set or clear the bits
+ the value of holder with the specified bits set or cleared
+
+
+
+ Clears the bits.
+
+ the byte data containing the bits we're interested in
+ the value of holder with the specified bits cleared
+
+
+
+ Set the bits.
+
+ the byte data containing the bits we're interested in
+ the value of holder with the specified bits set to 1
+
+
+
+ Returns immutable Btfield instances.
+ @author Jason Height (jheight at apache dot org)
+
+
+
+
+ Gets the instance.
+
+ The mask.
+
+
+
+
+ representation of a byte (8-bit) field at a fixed location within a
+ byte array
+ @author Marc Johnson (mjohnson at apache dot org
+
+
+
+
+ Initializes a new instance of the class.
+
+ The offset.
+
+
+
+ Initializes a new instance of the class.
+
+ The offset.
+ The value.
+
+
+
+ Initializes a new instance of the class.
+
+ The offset.
+ The data.
+
+
+
+ Initializes a new instance of the class.
+
+ The offset.
+ The _value.
+ The data.
+
+
+
+ Gets or sets the value.
+
+ The value.
+
+
+
+ set the value from its offset into an array of bytes
+
+ the byte array from which the value is to be read
+
+
+
+ set the value from an Stream
+
+ the Stream from which the value is to be read
+
+
+
+ set the ByteField's current value and write it to a byte array
+
+ value to be set
+ the byte array to write the value to
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ write the value out to an array of bytes at the appropriate offset
+
+ the array of bytes to which the value is to be written
+
+
+ Utilities for working with Microsoft CodePages.
+
+
Provides constants for understanding numeric codepages,
+ along with utilities to translate these into Java Character Sets.
+
+
+
Codepage 037, a special case
+
+
+
Codepage for SJIS
+
+
+
Codepage for GBK, aka MS936
+
+
+
Codepage for MS949
+
+
+
Codepage for UTF-16
+
+
+
Codepage for UTF-16 big-endian
+
+
+
Codepage for Windows 1250
+
+
+
Codepage for Windows 1251
+
+
+
Codepage for Windows 1252
+
+
+
Codepage for Windows 1253
+
+
+
Codepage for Windows 1254
+
+
+
Codepage for Windows 1255
+
+
+
Codepage for Windows 1256
+
+
+
Codepage for Windows 1257
+
+
+
Codepage for Windows 1258
+
+
+
Codepage for Johab
+
+
+
Codepage for Macintosh Roman (Java: MacRoman)
+
+
+
Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or
+ cp943)
+
+
+
Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5,
+ MS950, or cp937)
+
+
+
Codepage for Macintosh Korean (Java: unknown - use EUC_KR or
+ cp949)
+
+
+
Codepage for Macintosh Arabic (Java: MacArabic)
+
+
+
Codepage for Macintosh Hebrew (Java: MacHebrew)
+
+
+
Codepage for Macintosh Greek (Java: MacGreek)
+
+
+
Codepage for Macintosh Cyrillic (Java: MacCyrillic)
+
+
+
Codepage for Macintosh Chinese Simplified (Java: unknown - use
+ EUC_CN, ISO2022_CN_GB, MS936 or cp935)
+
+
+
Codepage for Macintosh Romanian (Java: MacRomania)
+
+
+
Codepage for Macintosh Ukrainian (Java: MacUkraine)
+
+
+
Codepage for Macintosh Thai (Java: MacThai)
+
+
+
Codepage for Macintosh Central Europe (Latin-2)
+ (Java: MacCentralEurope)
+
+
+
Codepage for Macintosh Iceland (Java: MacIceland)
+
+
+
Codepage for Macintosh Turkish (Java: MacTurkish)
+
+
+
Codepage for Macintosh Croatian (Java: MacCroatian)
+
+
+
Codepage for US-ASCII
+
+
+
Codepage for KOI8-R
+
+
+
Codepage for ISO-8859-1
+
+
+
Codepage for ISO-8859-2
+
+
+
Codepage for ISO-8859-3
+
+
+
Codepage for ISO-8859-4
+
+
+
Codepage for ISO-8859-5
+
+
+
Codepage for ISO-8859-6
+
+
+
Codepage for ISO-8859-7
+
+
+
Codepage for ISO-8859-8
+
+
+
Codepage for ISO-8859-9
+
+
+
Codepage for ISO-2022-JP
+
+
+
Another codepage for ISO-2022-JP
+
+
+
Yet another codepage for ISO-2022-JP
+
+
+
Codepage for ISO-2022-KR
+
+
+
Codepage for EUC-JP
+
+
+
Codepage for EUC-KR
+
+
+
Codepage for GB2312
+
+
+
Codepage for GB18030
+
+
+
Another codepage for US-ASCII
+
+
+
Codepage for UTF-8
+
+
+
Codepage for Unicode
+
+
+ Converts a string into bytes, in the equivalent character encoding
+ to the supplied codepage number.
+ @param string The string to convert
+ @param codepage The codepage number
+
+
+ Converts the bytes into a String, based on the equivalent character encoding
+ to the supplied codepage number.
+ @param string The byte of the string to convert
+ @param codepage The codepage number
+
+
+ Converts the bytes into a String, based on the equivalent character encoding
+ to the supplied codepage number.
+ @param string The byte of the string to convert
+ @param codepage The codepage number
+
+
+
Turns a codepage number into the equivalent character encoding's
+ name.
+
+ @param codepage The codepage number
+
+ @return The character encoding's name. If the codepage number is 65001,
+ the encoding name is "UTF-8". All other positive numbers are mapped to
+ "cp" followed by the number, e.g. if the codepage number is 1252 the
+ returned character encoding name will be "cp1252".
+
+ @exception UnsupportedEncodingException if the specified codepage is
+ less than zero.
+
+
+
+ This class comes from Java
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Adds the specified o.
+
+ The o.
+
+
+
+ Determines whether [contains] [the specified o].
+
+ The o.
+
+ true if [contains] [the specified o]; otherwise, false.
+
+
+
+
+ Copies the elements of the to an , starting at a particular index.
+
+ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
+ The zero-based index in at which copying begins.
+
+ is null.
+
+
+ is less than zero.
+
+
+ is multidimensional.
+ -or-
+ is equal to or greater than the length of .
+ -or-
+ The number of elements in the source is greater than the available space from to the end of the destination .
+
+
+ The type of the source cannot be cast automatically to the type of the destination .
+
+
+
+
+ Gets the number of elements contained in the .
+
+
+
+ The number of elements contained in the .
+
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+
+ An object that can be used to iterate through the collection.
+
+
+
+
+ Removes the specified o.
+
+ The o.
+
+
+
+ Removes all of the elements from this set.
+ The set will be empty after this call returns.
+
+
+
+
+ This class comes from Java
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Removes the specified key.
+
+ The key.
+
+
+
+
+ Gets the enumerator.
+
+
+
+
+
+ Determines whether the specified key contains key.
+
+ The key.
+
+ true if the specified key contains key; otherwise, false.
+
+
+
+
+ Adds the specified key.
+
+ The key.
+ The value.
+
+
+
+ Gets the count.
+
+ The count.
+
+
+
+ Gets or sets the with the specified key.
+
+
+
+
+
+ Gets the keys.
+
+ The keys.
+
+
+
+ Clears this instance.
+
+
+
+
+ Loads the specified in stream.
+
+ The in stream.
+
+
+
+ Loads the convert.
+
+ The string.
+
+
+ Converts encoded \uxxxx to unicode chars
+ and changes special saved chars to their original forms
+
+
+
+
+ Continues the line.
+
+ The line.
+
+
+
+
+ CRC Verification
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ CRC Bytes.
+
+ The buffer.
+
+
+
+
+ String CRC
+
+ the string
+
+
+
+
+ File CRC
+
+ the input file
+
+
+
+
+ Stream CRC
+
+ the input stream
+
+
+
+
+ behavior of a field at a fixed location within a byte array
+ @author Marc Johnson (mjohnson at apache dot org
+
+
+
+
+ set the value from its offset into an array of bytes
+
+ the byte array from which the value is to be read
+
+
+
+ set the value from an Stream
+
+ the Stream from which the value is to be read
+
+
+
+ return the value as a String
+
+
+
+
+
+ write the value out to an array of bytes at the appropriate offset
+
+ the array of bytes to which the value is to be written
+
+
+
+ dump data in hexadecimal format; derived from a HexDump utility I
+ wrote in June 2001.
+ @author Marc Johnson
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+
+ Dumps bytesToDump bytes to an output stream.
+
+ @param in The stream to read from
+ @param out The output stream
+ @param start The index to use as the starting position for the left hand side label
+ @param bytesToDump The number of bytes to output. Use -1 to read until the end of file.
+
+
+
+ Shorts to hex.
+
+ The value.
+ char array of 2 (zero padded) uppercase hex chars and prefixed with '0x'
+
+
+
+ Bytes to hex.
+
+ The value.
+ char array of 1 (zero padded) uppercase hex chars and prefixed with '0x'
+
+
+
+ Ints to hex.
+
+ The value.
+ char array of 4 (zero padded) uppercase hex chars and prefixed with '0x'
+
+
+
+ char array of 4 (zero padded) uppercase hex chars and prefixed with '0x'
+
+ The value.
+ char array of 4 (zero padded) uppercase hex chars and prefixed with '0x'
+
+
+
+ Toes the hex chars.
+
+ The p value.
+ The n bytes.
+ char array of uppercase hex chars, zero padded and prefixed with '0x'
+
+
+
+ This method reads hex data from a filename and returns a byte array.
+ The file may contain line comments that are preceeded with a # symbol.
+
+ The filename to read
+ The bytes read from the file.
+ If there was a problem while reading the file.
+
+
+
+ Same as ReadData(String) except that this method allows you to specify sections within
+ a file. Sections are referenced using section headers in the form:
+
+ The stream.
+ The section.
+
+
+
+
+ Reads the data.
+
+ The filename.
+ The section.
+
+
+
+
+ Reads the data.
+
+ The stream.
+ The EOF char.
+
+
+
+
+ Reads from string.
+
+ The data.
+
+
+
+
+ Reads to EOL.
+
+ The stream.
+
+
+
+ construct the with its offset into its containing byte array class.
+
+ offset of the field within its byte array.
+
+
+
+ construct the with its offset into its containing
+ byte array and initialize its value
+
+ offset of the field within its byte array
+ the initial value
+
+
+
+ Construct the with its offset into its containing
+ byte array and initialize its value from its byte array
+
+ offset of the field within its byte array
+ the byte array to Read the value from
+
+
+
+ construct the with its offset into its containing
+ byte array, initialize its value, and write the value to a byte
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ get or Set the IntegerField's current value
+
+ The value.
+
+
+
+
+ Set the IntegerField's current value and write it to a byte array
+
+ value to be Set
+ the byte array to write the value to
+
+
+
+ Set the value from its offset into an array of bytes
+
+ The data.
+
+
+
+ Set the value from an Stream
+
+ the Stream from which the value is to be Read
+
+
+
+ write the value out to an array of bytes at the appropriate offset
+
+ the array of bytes to which the value is to be written
+
+
+
+ Same as using the constructor with the same
+ parameter list. Avoid creation of an useless object.
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ A List of int's; as full an implementation of the java.Util.List interface as possible, with an eye toward minimal creation of objects
+
+ the mimicry of List is as follows:
+
+
if possible, operations designated 'optional' in the List
+ interface are attempted
+
wherever the List interface refers to an Object, substitute
+ int
+
wherever the List interface refers to a Collection or List,
+ substitute IntList
+
+
+ the mimicry is not perfect, however:
+
+
operations involving Iterators or ListIterators are not
+ supported
+
Remove(Object) becomes RemoveValue to distinguish it from
+ Remove(int index)
+
subList is not supported
+
+ @author Marc Johnson
+
+
+
+
+ create an IntList of default size
+
+
+
+
+ create a copy of an existing IntList
+
+ the existing IntList
+
+
+
+ create an IntList with a predefined Initial size
+
+ the size for the internal array
+
+
+
+
+ add the specfied value at the specified index
+
+ the index where the new value is to be Added
+ the new value
+
+
+
+ Appends the specified element to the end of this list
+
+ element to be Appended to this list.
+ return true (as per the general contract of the Collection.add method
+
+
+
+ Appends all of the elements in the specified collection to the
+ end of this list, in the order that they are returned by the
+ specified collection's iterator. The behavior of this
+ operation is unspecified if the specified collection is
+ modified while the operation is in progress. (Note that this
+ will occur if the specified collection is this list, and it's
+ nonempty.)
+
+ collection whose elements are to be Added to this list.
+ return true if this list Changed as a result of the call.
+
+
+
+ Inserts all of the elements in the specified collection into
+ this list at the specified position. Shifts the element
+ currently at that position (if any) and any subsequent elements
+ to the right (increases their indices). The new elements will
+ appear in this list in the order that they are returned by the
+ specified collection's iterator. The behavior of this
+ operation is unspecified if the specified collection is
+ modified while the operation is in progress. (Note that this
+ will occur if the specified collection is this list, and it's
+ nonempty.)
+
+ index at which to insert first element from the specified collection.
+ elements to be inserted into this list.
+ return true if this list Changed as a result of the call.
+
+
+
+ Removes all of the elements from this list. This list will be
+ empty After this call returns (unless it throws an exception).
+
+
+
+
+ Returns true if this list Contains the specified element. More
+ formally, returns true if and only if this list Contains at
+ least one element e such that o == e
+
+ element whose presence in this list is to be Tested.
+ return true if this list Contains the specified element.
+
+
+
+ Returns true if this list Contains all of the elements of the
+ specified collection.
+
+ collection to be Checked for Containment in this list.
+ return true if this list Contains all of the elements of the specified collection.
+
+
+
+ Compares the specified object with this list for Equality.
+ Returns true if and only if the specified object is also a
+ list, both lists have the same size, and all corresponding
+ pairs of elements in the two lists are Equal. (Two elements e1
+ and e2 are equal if e1 == e2.) In other words, two lists are
+ defined to be equal if they contain the same elements in the
+ same order. This defInition ensures that the Equals method
+ works properly across different implementations of the List
+ interface.
+
+ the object to be Compared for Equality with this list.
+ return true if the specified object is equal to this list.
+
+
+
+ Returns the element at the specified position in this list.
+
+ index of element to return.
+ return the element at the specified position in this list.
+
+
+
+ Returns the hash code value for this list. The hash code of a
+ list is defined to be the result of the following calculation:
+
+
+ hashCode = 1;
+ Iterator i = list.Iterator();
+ while (i.HasNext()) {
+ Object obj = i.Next();
+ hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode());
+ }
+
+
+ This ensures that list1.Equals(list2) implies that
+ list1.HashCode()==list2.HashCode() for any two lists, list1 and
+ list2, as required by the general contract of Object.HashCode.
+
+
+ return the hash code value for this list.
+
+
+
+ Returns the index in this list of the first occurrence of the
+ specified element, or -1 if this list does not contain this
+ element. More formally, returns the lowest index i such that
+ (o == Get(i)), or -1 if there is no such index.
+
+ element to search for.
+ return the index in this list of the first occurrence of the
+ specified element, or -1 if this list does not contain
+ this element.
+
+
+
+ Returns true if this list Contains no elements.
+
+ return true if this list Contains no elements.
+
+
+
+ Returns the index in this list of the last occurrence of the
+ specified element, or -1 if this list does not contain this
+ element. More formally, returns the highest index i such that
+ (o == Get(i)), or -1 if there is no such index.
+
+ element to search for.
+ the index in this list of the last occurrence of the
+ specified element, or -1 if this list does not contain
+ this element.
+
+
+
+
+ Removes the element at the specified position in this list.
+ Shifts any subsequent elements to the left (subtracts one from
+ their indices). Returns the element that was Removed from the
+ list.
+
+ the index of the element to Removed.
+ return the element previously at the specified position.
+
+
+
+ Removes the first occurrence in this list of the specified
+ element (optional operation). If this list does not contain
+ the element, it is unChanged. More formally, Removes the
+ element with the lowest index i such that (o.Equals(get(i)))
+ (if such an element exists).
+
+ element to be Removed from this list, if present.
+ return true if this list Contained the specified element.
+
+
+
+ Removes from this list all the elements that are Contained in
+ the specified collection
+
+ collection that defines which elements will be Removed from the list.
+ return true if this list Changed as a result of the call.
+
+
+
+ Retains only the elements in this list that are Contained in
+ the specified collection. In other words, Removes from this
+ list all the elements that are not Contained in the specified
+ collection.
+
+ collection that defines which elements this Set will retain.
+ return true if this list Changed as a result of the call.
+
+
+
+ Replaces the element at the specified position in this list with the specified element
+
+ index of element to Replace.
+ element to be stored at the specified position.
+ the element previously at the specified position.
+
+
+
+ Returns the number of elements in this list. If this list
+ Contains more than Int32.MaxValue elements, returns
+ Int32.MaxValue.
+
+ the number of elements in this IntList
+
+
+
+ the number of elements in this IntList
+
+
+
+
+ Returns an array Containing all of the elements in this list in
+ proper sequence. Obeys the general contract of the
+ Collection.ToArray method.
+
+ an array Containing all of the elements in this list in proper sequence.
+
+
+
+ Returns an array Containing all of the elements in this list in
+ proper sequence. Obeys the general contract of the
+ Collection.ToArray(Object[]) method.
+
+ the array into which the elements of this list are to
+ be stored, if it is big enough; otherwise, a new array
+ is allocated for this purpose.
+ return an array Containing the elements of this list.
+
+
+
+ A List of objects that are indexed AND keyed by an int; also allows for Getting
+ the index of a value in the list
+
+
I am happy is someone wants to re-implement this without using the
+ internal list and hashmap. If so could you please make sure that
+ you can add elements half way into the list and have the value-key mappings
+ update
+
+
+ @author Jason Height
+
+
+
+ create an IntMapper of default size
+
+
+
+
+ Appends the specified element to the end of this list
+
+ element to be Appended to this list.
+ return true (as per the general contract of the Collection.add method)
+
+
+
+ Gets the size.
+
+
+
+
+ Gets the T object at the specified index.
+
+
+
+
+
+
+ Gets the index of T object.
+
+ The o.
+
+
+
+
+ Gets the enumerator.
+
+
+
+
+
+ Implementors of this interface allow client code to 'delay' writing to a certain section of a
+ data output stream.
+ A typical application is for writing BIFF records when the size is not known until well after
+ the header has been written. The client code can call
+ to reserve two bytes of the output for the 'ushort size' header field. The delayed output can
+ be written at any stage.
+
+ @author Josh Micich
+
+
+
+ Creates an output stream intended for outputting a sequence of size bytes.
+
+
+
+
+
+
+ Reads all the data from the input stream, and returns
+ the bytes Read.
+
+ The stream.
+
+ Tony Qu changed the code
+
+
+
+ Reads the fully.
+
+ The stream.
+ The b.
+
+
+
+
+ Same as the normal
+ in.Read(b, off, len)
+ , but tries to ensure that the entire len number of bytes is Read.
+ If the end of file is reached before any bytes are Read, returns -1.
+ If the end of the file is reached after some bytes are
+ Read, returns the number of bytes Read.
+ If the end of the file isn't reached before len
+ bytes have been Read, will return len bytes.
+
+ The stream.
+ The b.
+ The off.
+ The len.
+
+
+
+
+ Copies all the data from the given InputStream to the OutputStream. It
+ leaves both streams open, so you will still need to close them once done.
+
+
+
+
+
+
+ Adapts a plain byte array to
+
+ @author Josh Micich
+
+
+
+ Adapts a plain byte array to
+
+ @author Josh Micich
+
+
+
+ @author Josh Micich
+
+
+
+ Wraps an providing
+
+ This class does not buffer any input, so the stream Read position maintained
+ by this class is consistent with that of the inner stream.
+
+
+ @author Josh Micich
+
+
+
+
+ @author Josh Micich
+
+
+
+ Wraps an providing
+
+ @author Josh Micich
+
+
+
+ a utility class for handling little-endian numbers, which the 80x86 world is
+ replete with. The methods are all static, and input/output is from/to byte
+ arrays, or from InputStreams.
+
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Andrew Oliver (acoliver at apache dot org)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ get a short value from a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the short (16-bit) value
+
+
+
+ get an unsigned short value from a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the unsigned short (16-bit) value in an integer
+
+
+
+ get a short value from a byte array
+
+ a starting offset into the byte array
+ the short (16-bit) value
+
+
+
+ get a short value from a byte array
+
+ the unsigned short (16-bit) value in an integer
+
+
+
+
+ get an int value from a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the int (32-bit) value
+
+
+
+ get an int value from the beginning of a byte array
+
+ the byte array
+ the int (32-bit) value
+
+
+
+ Gets the U int.
+
+ the byte array
+ a starting offset into the byte array
+ the unsigned int (32-bit) value in a long
+
+
+
+ Gets the U int.
+
+ the byte array
+ the unsigned int (32-bit) value in a long
+
+
+
+ get a long value from a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the long (64-bit) value
+
+
+
+ get a double value from a byte array, reads it in little endian format
+ then converts the resulting revolting IEEE 754 (curse them) floating
+ point number to a c# double
+
+ the byte array
+ a starting offset into the byte array
+ the double (64-bit) value
+
+
+
+ Puts the short.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ Added for consistency with other put~() methods
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ Puts the U short.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ put a short value into beginning of a byte array
+
+ the byte array
+ the short (16-bit) value
+
+
+ Put signed short into output stream
+
+ @param value
+ the short (16-bit) value
+ @param outputStream
+ output stream
+ @throws IOException
+ if an I/O error occurs
+
+
+
+ put an int value into a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the int (32-bit) value
+
+
+
+ put an int value into beginning of a byte array
+
+ the byte array
+ the int (32-bit) value
+
+
+
+ Put int into output stream
+
+ the int (32-bit) value
+ output stream
+
+
+
+ put a long value into a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the long (64-bit) value
+
+
+
+ put a double value into a byte array
+
+ the byte array
+ a starting offset into the byte array
+ the double (64-bit) value
+
+
+
+ Reads the short.
+
+ The stream.
+
+
+
+
+ get an int value from an Stream
+
+ the Stream from which the int is to be read
+ the int (32-bit) value
+ will be propagated back to the caller
+ if the stream cannot provide enough bytes
+
+
+
+ get a long value from a Stream
+
+ the Stream from which the long is to be read
+ the long (64-bit) value
+ will be propagated back to the caller
+ if the stream cannot provide enough bytes
+
+
+
+ Us the byte to int.
+
+ The b.
+
+
+
+
+ get the unsigned value of a byte.
+
+ the byte array.
+ a starting offset into the byte array.
+ the unsigned value of the byte as a 32 bit integer
+
+
+
+ Copy a portion of a byte array
+
+ the original byte array
+ Where to start copying from.
+ Number of bytes to copy.
+ The byteArray value
+
+ if copying would cause access ofdata outside array bounds.
+
+
+
+
+ Gets the unsigned byte.
+
+ the byte array
+
+
+
+
+ Gets the unsigned byte.
+
+ the byte array
+ a starting offset into the byte array
+
+
+
+
+ Puts the double.
+
+ the byte array
+ The value.
+
+
+ put a double value into a byte array
+
+ @param value
+ the double (64-bit) value
+ @param outputStream
+ output stream
+ @throws IOException
+ if an I/O error occurs
+
+
+
+ Puts the uint.
+
+ the byte array
+ The value.
+
+
+ Put unsigned int into output stream
+
+ @param value
+ the int (32-bit) value
+ @param outputStream
+ output stream
+ @throws IOException
+ if an I/O error occurs
+
+
+
+ Puts the uint.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ Puts the long.
+
+ the byte array
+ The value.
+
+
+ Put long into output stream
+
+ @param value
+ the long (64-bit) value
+ @param outputStream
+ output stream
+ @throws IOException
+ if an I/O error occurs
+
+
+
+ Puts the long.
+
+ the byte array
+ The value.
+
+
+
+ Puts the ulong.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ Puts the number.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+ The size.
+
+
+
+ Puts the number.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+ The size.
+
+
+
+ Puts the short array.
+
+ the byte array
+ a starting offset into the byte array
+ The value.
+
+
+
+ Puts the U short.
+
+ the byte array
+ The value.
+
+
+ Put unsigned short into output stream
+
+ @param value
+ the unsigned short (16-bit) value
+ @param outputStream
+ output stream
+ @throws IOException
+ if an I/O error occurs
+
+
+
+ Reads from stream.
+
+ The stream.
+ The size.
+
+
+
+
+ Reads the long.
+
+ The stream.
+
+
+
+
+ construct the with its offset into its containing byte array
+
+ The offset.
+
+
+
+ construct the LongField with its offset into its containing
+ byte array and initialize its value
+
+ offset of the field within its byte array
+ the initial value
+
+
+
+ Construct the class with its offset into its containing
+ byte array and initialize its value from its byte array
+
+ The offset of the field within its byte array
+ the byte array to read the value from
+
+
+
+ construct the class with its offset into its containing
+ byte array, initialize its value, and write the value to a byte
+ array
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ Getg or sets the LongField's current value
+
+ The current value
+
+
+
+ set the LongField's current value and write it to a byte array
+
+ value to be set
+ the byte array to write the value to
+
+
+
+ set the value from its offset into an array of bytes
+
+ the byte array from which the value is to be read
+
+
+
+ set the value from an Stream
+
+ the Stream from which the value is to be
+
+
+
+ write the value out to an array of bytes at the appropriate offset
+
+ the array of bytes to which the value is to be written
+
+
+
+ Same as using the constructor with the same
+ parameter list. Avoid creation of an useless object.
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+ This class provides common functionality for the
+ various LZW implementations in the different file
+ formats.
+ It's currently used by HDGF and HMEF.
+
+ Two good resources on LZW are:
+ http://en.wikipedia.org/wiki/LZW
+ http://marknelson.us/1989/10/01/lzw-data-compression/
+
+
+ Does the mask bit mean it's compressed or uncompressed?
+
+
+ How much to append to the code length in the stream
+ to Get the real code length? Normally 2 or 3
+
+
+ Does the 12 bits of the position Get stored in
+ Little Endian or Big Endian form?
+ This controls whether a pos+length of 0x12 0x34
+ becomes a position of 0x123 or 0x312
+
+
+ Populates the dictionary, and returns where in it
+ to begin writing new codes.
+ Generally, if the dictionary is pre-populated, then new
+ codes should be placed at the end of that block.
+ Equally, if the dictionary is left with all zeros, then
+ usually the new codes can go in at the start.
+
+
+ Adjusts the position offset if needed when looking
+ something up in the dictionary.
+
+
+ Decompresses the given input stream, returning the array of bytes
+ of the decompressed input.
+
+
+ Perform a streaming decompression of the input.
+ Works by:
+ 1) Reading a flag byte, the 8 bits of which tell you if the
+ following 8 codes are compressed our un-compressed
+ 2) Consider the 8 bits in turn
+ 3) If the bit is Set, the next code is un-compressed, so
+ add it to the dictionary and output it
+ 4) If the bit isn't Set, then read in the length and start
+ position in the dictionary, and output the bytes there
+ 5) Loop until we've done all 8 bits, then read in the next
+ flag byte
+
+
+ Given an integer, turn it into a java byte, handling
+ the wrapping.
+ This is a convenience method
+
+
+ Given a java byte, turn it into an integer between 0
+ and 255 (i.e. handle the unwrapping).
+ This is a convenience method
+
+
+
+ A Logger class that strives to make it as easy as possible for
+ developers to write Log calls, while simultaneously making those
+ calls as cheap as possible by performing lazy evaluation of the Log
+ message.
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Nicola Ken Barozzi (nicolaken at apache.org)
+
+
+
+ Log a message
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 The object to Log.
+
+
+ Check if a Logger is enabled to Log at the specified level
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first object to place in the message
+ @param obj2 second object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+ @param obj7 seventh Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+ @param obj7 seventh Object to place in the message
+ @param obj8 eighth Object to place in the message
+
+
+ Log a message
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 The object to Log. This is converted to a string.
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param exception An error message to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param obj7 seventh object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param obj7 seventh object to place in the message
+ @param obj8 eighth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+ @param obj3 The third object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+ @param obj3 The third object to match against.
+ @param obj4 The forth object to match against.
+
+
+ File header for PNG format.
+
+
+ Checks if the offset matches the PNG header.
+
+ @param data the data to check.
+ @param offset the offset to check at.
+ @return {@code true} if the offset matches.
+
+
+ Map of POILogger instances, with classes as keys
+
+
+ A common instance of NullLogger, as it does nothing
+ we only need the one
+
+
+ The name of the class to use. Initialised the
+ first time we need it
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Get a logger, based on a class name
+
+ the class whose name defines the log
+ a POILogger for the specified class
+
+
+
+ Get a logger, based on a String
+
+ the String that defines the log
+ a POILogger for the specified class
+
+
+ package scope so it cannot be instantiated outside of the util
+ package. You need a POILogger? Go to the POILogFactory for one
+
+
+
+ Log a message
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 The object to Log. This is converted to a string.
+
+
+ Log a message
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 The object to Log. This is converted to a string.
+ @param exception An exception to be Logged
+
+
+ Check if a Logger is enabled to Log at the specified level
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first object to place in the message
+ @param obj2 second object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+ @param obj7 seventh Object to place in the message
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third Object to place in the message
+ @param obj4 fourth Object to place in the message
+ @param obj5 fifth Object to place in the message
+ @param obj6 sixth Object to place in the message
+ @param obj7 seventh Object to place in the message
+ @param obj8 eighth Object to place in the message
+
+
+ Log an exception, without a message
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param exception An error message to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param obj7 seventh object to place in the message
+ @param exception An exception to be Logged
+
+
+ Log a message. Lazily appends Object parameters together.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param obj1 first Object to place in the message
+ @param obj2 second Object to place in the message
+ @param obj3 third object to place in the message
+ @param obj4 fourth object to place in the message
+ @param obj5 fifth object to place in the message
+ @param obj6 sixth object to place in the message
+ @param obj7 seventh object to place in the message
+ @param obj8 eighth object to place in the message
+ @param exception An exception to be Logged
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+ @param obj3 The third object to match against.
+
+
+ Logs a formated message. The message itself may contain %
+ characters as place holders. This routine will attempt to match
+ the placeholder by looking at the type of parameter passed to
+ obj1.
+
+ If the parameter is an array, it traverses the array first and
+ matches parameters sequentially against the array items.
+ Otherwise the parameters after message are matched
+ in order.
+
+ If the place holder matches against a number it is printed as a
+ whole number. This can be overridden by specifying a precision
+ in the form %n.m where n is the padding for the whole part and
+ m is the number of decimal places to display. n can be excluded
+ if desired. n and m may not be more than 9.
+
+ If the last parameter (after flattening) is a Exception it is
+ Logged specially.
+
+ @param level One of DEBUG, INFO, WARN, ERROR, FATAL
+ @param message The message to Log.
+ @param obj1 The first object to match against.
+ @param obj2 The second object to match against.
+ @param obj3 The third object to match against.
+ @param obj4 The forth object to match against.
+
+
+ Flattens any contained objects. Only tranverses one level deep.
+
+
+
+ Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
+
+
+ The unsigned byte cast to an Int32, or -1 if at the end of the stream.
+
+
+ The stream does not support reading.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
+
+ An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source.
+ The zero-based byte offset in at which to begin storing the data read from the current stream.
+ The maximum number of bytes to be read from the current stream.
+
+ The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
+
+
+ The sum of and is larger than the buffer length.
+
+
+ is null.
+
+
+ or is negative.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support reading.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ Unreads the specified b.
+
+ The b.
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports reading.
+
+
+ true if the stream supports reading; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
+
+
+ true if the stream supports seeking; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether the current stream supports writing.
+
+
+ true if the stream supports writing; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the length in bytes of the stream.
+
+
+
+ A long value representing the length of the stream in bytes.
+
+
+ A class derived from Stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, gets or sets the position within the current stream.
+
+
+
+ The current position within the stream.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support seeking.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
+
+
+
+
+ When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
+
+
+ An I/O error occurs.
+
+
+
+
+ When overridden in a derived class, sets the position within the current stream.
+
+ A byte offset relative to the parameter.
+ A value of type indicating the reference point used to obtain the new position.
+
+ The new position within the current stream.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, sets the length of the current stream.
+
+ The desired length of the current stream in bytes.
+
+ An I/O error occurs.
+
+
+ The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
+
+ An array of bytes. This method copies bytes from to the current stream.
+ The zero-based byte offset in at which to begin copying bytes to the current stream.
+ The number of bytes to be written to the current stream.
+
+ The sum of and is greater than the buffer length.
+
+
+ is null.
+
+
+ or is negative.
+
+
+ An I/O error occurs.
+
+
+ The stream does not support writing.
+
+
+ Methods were called after the stream was closed.
+
+
+
+
+ Writes a byte to the current position in the stream and advances the position within the stream by one byte.
+
+ The byte to write to the stream.
+
+ An I/O error occurs.
+
+
+ The stream does not support writing, or the stream is already closed.
+
+
+ Methods were called after the stream was closed.
+
+
+
+ A common exception thrown by our binary format Parsers
+ (especially HSSF and DDF), when they hit invalid
+ format or data when Processing a record.
+
+
+
+ construct the ShortField with its offset into its containing
+ byte array
+
+ offset of the field within its byte array
+ if offset is negative
+
+
+
+ construct the ShortField with its offset into its containing byte array and initialize its value
+
+ offset of the field within its byte array
+ the initial value
+ if offset is negative
+
+
+
+ Construct the ShortField with its offset into its containing
+ byte array and initialize its value from its byte array
+
+ offset of the field within its byte array
+ the byte array to read the value from
+ if the offset is not
+ within the range of 0..(data.length - 1)
+
+
+
+ construct the ShortField with its offset into its containing
+ byte array, initialize its value, and write its value to its
+ byte array
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+ if offset is negative
+
+
+
+ Gets or sets the value.
+
+ The value.
+
+
+
+ set the ShortField's current value and write it to a byte array
+
+ value to be set
+ the byte array to write the value to
+ if the offset is out
+ of range
+
+
+
+ set the value from its offset into an array of bytes
+
+ the byte array from which the value is to be read
+ if the offset is out
+ of range
+
+
+
+ set the value from an Stream
+
+ the Stream from which the value is to be
+ read
+ if an IOException is thrown from reading
+ the Stream
+ if there is not enough data
+ available from the Stream
+
+
+
+ write the value out to an array of bytes at the appropriate
+ offset
+
+ the array of bytes to which the value is to be
+ written
+ if the offset is out
+ of range
+
+
+
+ Same as using the constructor with the same
+ parameter list. Avoid creation of an useless object.
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ A List of short's; as full an implementation of the java.Util.List
+ interface as possible, with an eye toward minimal creation of
+ objects
+
+ the mimicry of List is as follows:
+
+
if possible, operations designated 'optional' in the List
+ interface are attempted
+
wherever the List interface refers to an Object, substitute
+ short
+
wherever the List interface refers to a Collection or List,
+ substitute shortList
+
+
+ the mimicry is not perfect, however:
+
+
operations involving Iterators or ListIterators are not
+ supported
+
Remove(Object) becomes RemoveValue to distinguish it from
+ Remove(short index)
+
subList is not supported
+
+
+
+
+
+ create an shortList of default size
+
+
+
+
+ create a copy of an existing shortList
+
+ the existing shortList
+
+
+
+ create an shortList with a predefined Initial size
+
+ the size for the internal array
+
+
+
+ add the specfied value at the specified index
+
+ the index where the new value is to be Added
+ the new value
+
+
+
+ Appends the specified element to the end of this list
+
+ element to be Appended to this list.
+ return true (as per the general contract of the Collection.add method).
+
+
+
+ Appends all of the elements in the specified collection to the
+ end of this list, in the order that they are returned by the
+ specified collection's iterator. The behavior of this
+ operation is unspecified if the specified collection is
+ modified while the operation is in progress. (Note that this
+ will occur if the specified collection is this list, and it's
+ nonempty.)
+
+ collection whose elements are to be Added to this list.
+ return true if this list Changed as a result of the call.
+
+
+
+ Inserts all of the elements in the specified collection into
+ this list at the specified position. Shifts the element
+ currently at that position (if any) and any subsequent elements
+ to the right (increases their indices). The new elements will
+ appear in this list in the order that they are returned by the
+ specified collection's iterator. The behavior of this
+ operation is unspecified if the specified collection is
+ modified while the operation is in progress. (Note that this
+ will occur if the specified collection is this list, and it's
+ nonempty.)
+
+ index at which to insert first element from the specified collection.
+ elements to be inserted into this list.
+ return true if this list Changed as a result of the call.
+ if the index is out of range (index < 0 || index > size())
+
+
+
+ Removes all of the elements from this list. This list will be
+ empty After this call returns (unless it throws an exception).
+
+
+
+
+ Returns true if this list Contains the specified element. More
+ formally, returns true if and only if this list Contains at
+ least one element e such that o == e
+
+ element whose presence in this list is to be Tested.
+ return true if this list Contains the specified element.
+
+
+
+ Returns true if this list Contains all of the elements of the specified collection.
+
+ collection to be Checked for Containment in this list.
+ return true if this list Contains all of the elements of the specified collection.
+
+
+
+ Compares the specified object with this list for Equality.
+ Returns true if and only if the specified object is also a
+ list, both lists have the same size, and all corresponding
+ pairs of elements in the two lists are Equal. (Two elements e1
+ and e2 are equal if e1 == e2.) In other words, two lists are
+ defined to be equal if they contain the same elements in the
+ same order. This defInition ensures that the Equals method
+ works properly across different implementations of the List
+ interface.
+
+ the object to be Compared for Equality with this list.
+ return true if the specified object is equal to this list.
+
+
+
+ Returns the element at the specified position in this list.
+
+ index of element to return.
+ return the element at the specified position in this list.
+
+
+
+ Returns the hash code value for this list. The hash code of a
+ list is defined to be the result of the following calculation:
+
+
+ hashCode = 1;
+ Iterator i = list.Iterator();
+ while (i.HasNext()) {
+ Object obj = i.Next();
+ hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode());
+ }
+
+
+ This ensures that list1.Equals(list2) implies that
+ list1.HashCode()==list2.HashCode() for any two lists, list1 and
+ list2, as required by the general contract of Object.HashCode.
+
+ return the hash code value for this list.
+
+
+
+ Returns the index in this list of the first occurrence of the
+ specified element, or -1 if this list does not contain this
+ element. More formally, returns the lowest index i such that
+ (o == Get(i)), or -1 if there is no such index.
+
+ element to search for.
+ the index in this list of the first occurrence of the
+ specified element, or -1 if this list does not contain
+ this element.
+
+
+
+
+ Returns true if this list Contains no elements.
+
+ return true if this list Contains no elements.
+
+
+
+ Returns the index in this list of the last occurrence of the
+ specified element, or -1 if this list does not contain this
+ element. More formally, returns the highest index i such that
+ (o == Get(i)), or -1 if there is no such index.
+
+ element to search for.
+ return the index in this list of the last occurrence of the
+ specified element, or -1 if this list does not contain this element.
+
+
+
+ Removes the element at the specified position in this list.
+ Shifts any subsequent elements to the left (subtracts one from
+ their indices). Returns the element that was Removed from the
+ list.
+
+ the index of the element to Removed.
+ return the element previously at the specified position.
+
+
+
+ Removes the first occurrence in this list of the specified
+ element (optional operation). If this list does not contain
+ the element, it is unChanged. More formally, Removes the
+ element with the lowest index i such that (o.Equals(get(i)))
+ (if such an element exists).
+
+ element to be Removed from this list, if present.
+ return true if this list Contained the specified element.
+
+
+
+ Removes from this list all the elements that are Contained in the specified collection
+
+ collection that defines which elements will be removed from this list.
+ return true if this list Changed as a result of the call.
+
+
+
+ Retains only the elements in this list that are Contained in
+ the specified collection. In other words, Removes from this
+ list all the elements that are not Contained in the specified
+ collection.
+
+ collection that defines which elements this Set will retain.
+ return true if this list Changed as a result of the call.
+
+
+
+ Replaces the element at the specified position in this list with the specified element
+
+ index of element to Replace.
+ element to be stored at the specified position.
+ return the element previously at the specified position.
+
+
+
+ Returns the number of elements in this list. If this list
+ Contains more than Int32.MaxValue elements, returns
+ Int32.MaxValue.
+
+ return the number of elements in this shortList
+
+
+
+ the number of elements in this shortList
+
+
+
+
+ Returns an array Containing all of the elements in this list in
+ proper sequence. Obeys the general contract of the
+ Collection.ToArray method.
+
+ an array Containing all of the elements in this list in
+ proper sequence.
+
+
+
+ Returns an array Containing all of the elements in this list in
+ proper sequence. Obeys the general contract of the
+ Collection.ToArray(Object[]) method.
+
+ the array into which the elements of this list are to
+ be stored, if it is big enough; otherwise, a new array
+ is allocated for this purpose.
+ return an array Containing the elements of this list.
+
+
+
+ Title: String Utility Description: Collection of string handling utilities
+ @author Andrew C. Oliver
+ @author Sergei Kozello (sergeikozello at mail.ru)
+ @author Toshiaki Kamoshida (kamoshida.toshiaki at future dot co dot jp)
+ @since May 10, 2002
+ @version 1.0
+
+
+
+ Constructor for the StringUtil object
+
+
+
+ Given a byte array of 16-bit unicode characters in Little Endian
+ Format (most important byte last), return a Java String representation
+ of it.
+ { 0x16, 0x00 } -0x16
+
+ the byte array to be converted
+ the initial offset into the
+ byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character
+ the Length of the string
+ the converted string
+
+
+
+ Given a byte array of 16-bit unicode characters in little endian
+ Format (most important byte last), return a Java String representation
+ of it.
+ { 0x16, 0x00 } -0x16
+
+ the byte array to be converted
+ the converted string
+
+
+ Convert String to 16-bit unicode characters in little endian format
+
+ @param string the string
+ @return the byte array of 16-bit unicode characters
+
+
+
+ Given a byte array of 16-bit unicode characters in big endian
+ Format (most important byte first), return a Java String representation
+ of it.
+ { 0x00, 0x16 } -0x16
+
+ the byte array to be converted
+ the initial offset into the
+ byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character
+ the Length of the string
+ the converted string
+
+
+
+ Given a byte array of 16-bit unicode characters in big endian
+ Format (most important byte first), return a Java String representation
+ of it.
+ { 0x00, 0x16 } -0x16
+
+ the byte array to be converted
+ the converted string
+
+
+
+ Read 8 bit data (in IsO-8859-1 codepage) into a (unicode) Java
+ String and return.
+ (In Excel terms, read compressed 8 bit unicode as a string)
+
+ byte array to read
+ offset to read byte array
+ Length to read byte array
+ generated String instance by reading byte array
+
+
+
+ Takes a unicode (java) string, and returns it as 8 bit data (in IsO-8859-1
+ codepage).
+ (In Excel terms, write compressed 8 bit unicode)
+
+ the String containing the data to be written
+ the byte array to which the data Is to be written
+ an offset into the byte arrat at which the data Is start when written
+
+
+
+ Takes a unicode string, and returns it as little endian (most
+ important byte last) bytes in the supplied byte array.
+ (In Excel terms, write uncompressed unicode)
+
+ the String containing the unicode data to be written
+ the byte array to hold the uncompressed unicode, should be twice the Length of the String
+ the offset to start writing into the byte array
+
+
+
+ Takes a unicode string, and returns it as big endian (most
+ important byte first) bytes in the supplied byte array.
+ (In Excel terms, write uncompressed unicode)
+
+ the String containing the unicode data to be written
+ the byte array to hold the uncompressed unicode, should be twice the Length of the String.
+ the offset to start writing into the byte array
+
+
+
+ Gets the preferred encoding.
+
+ the encoding we want to use, currently hardcoded to IsO-8859-1
+
+
+
+ check the parameter Has multibyte character
+
+ string to check
+
+ true if Has at least one multibyte character; otherwise, false.
+
+
+
+ InputStream in is expected to contain:
+
+
ushort nChars
+
byte is16BitFlag
+
byte[]/char[] characterData
+
+ For this encoding, the is16BitFlag is always present even if nChars==0.
+
+
+ InputStream in is expected to contain:
+
+
byte is16BitFlag
+
byte[]/char[] characterData
+
+ For this encoding, the is16BitFlag is always present even if nChars==0.
+
+ This method should be used when the nChars field is not stored
+ as a ushort immediately before the is16BitFlag. Otherwise, {@link
+ #readUnicodeString(LittleEndianInput)} can be used.
+
+
+ OutputStream out will get:
+
+
ushort nChars
+
byte is16BitFlag
+
byte[]/char[] characterData
+
+ For this encoding, the is16BitFlag is always present even if nChars==0.
+
+
+ OutputStream out will get:
+
+
byte is16BitFlag
+
byte[]/char[] characterData
+
+ For this encoding, the is16BitFlag is always present even if nChars==0.
+
+ This method should be used when the nChars field is not stored
+ as a ushort immediately before the is16BitFlag. Otherwise, {@link
+ #writeUnicodeString(LittleEndianOutput, String)} can be used.
+
+
+
+ Gets the number of bytes that would be written by WriteUnicodeString(LittleEndianOutput, String)
+
+ The value.
+
+
+
+
+ Checks to see if a given String needs to be represented as Unicode
+
+ The value.
+
+ true if string needs Unicode to be represented.; otherwise, false.
+
+ Tony Qu change the logic
+
+
+
+ Encodes non-US-ASCII characters in a string, good for encoding file names for download
+ http://www.acriticsreview.com/List.aspx?listid=42
+
+
+
+
+
+
+ Encodes a non-US-ASCII character.
+
+
+
+
+
+
+ Encodes a non-US-ASCII character.
+
+
+
+
+
+
+ Encodes a non-US-ASCII character.
+
+
+
+
+
+
+ Encodes a non-US-ASCII character.
+
+
+
+
+
+
+ Determines if the character needs to be encoded.
+ http://www.acriticsreview.com/List.aspx?listid=42
+
+
+
+
+
+ Some strings may contain encoded characters of the unicode private use area.
+ Currently the characters of the symbol fonts are mapped to the corresponding
+ characters in the normal unicode range.
+
+ @param string the original string
+ @return the string with mapped characters
+
+ @see Private Use Area (symbol)
+ @see Symbol font - Unicode alternatives for Greek and special characters in HTML
+
+
+ The minimum value of a
+
+ Unicode high-surrogate code unit
+ in the UTF-16 encoding, constant {@code '\u005CuD800'}.
+ A high-surrogate is also known as a leading-surrogate.
+
+ @since 1.5
+
+
+ The maximum value of a
+
+ Unicode high-surrogate code unit
+ in the UTF-16 encoding, constant {@code '\u005CuDBFF'}.
+ A high-surrogate is also known as a leading-surrogate.
+
+ @since 1.5
+
+
+ The minimum value of a
+
+ Unicode low-surrogate code unit
+ in the UTF-16 encoding, constant {@code '\u005CuDC00'}.
+ A low-surrogate is also known as a trailing-surrogate.
+
+ @since 1.5
+
+
+ The maximum value of a
+
+ Unicode low-surrogate code unit
+ in the UTF-16 encoding, constant {@code '\u005CuDFFF'}.
+ A low-surrogate is also known as a trailing-surrogate.
+
+ @since 1.5
+
+
+ Converts the specified surrogate pair to its supplementary code
+ point value. This method does not validate the specified
+ surrogate pair. The caller must validate it using {@link
+ #isSurrogatePair(char, char) isSurrogatePair} if necessary.
+
+ @param high the high-surrogate code unit
+ @param low the low-surrogate code unit
+ @return the supplementary code point composed from the
+ specified surrogate pair.
+ @since 1.5
+
+
+ Determines the number of {@code char} values needed to
+ represent the specified character (Unicode code point). If the
+ specified character is equal to or greater than 0x10000, then
+ the method returns 2. Otherwise, the method returns 1.
+
+ This method doesn't validate the specified character to be a
+ valid Unicode code point. The caller must validate the
+ character value using {@link #isValidCodePoint(int) isValidCodePoint}
+ if necessary.
+
+ @param codePoint the character (Unicode code point) to be tested.
+ @return 2 if the character is a valid supplementary character; 1 otherwise.
+ @see Character#isSupplementaryCodePoint(int)
+ @since 1.5
+
+
+
+ A logger class that strives to make it as easy as possible for
+ developers to write log calls, while simultaneously making those
+ calls as cheap as possible by performing lazy Evaluation of the log
+ message.
+
+
+ @author Marc Johnson (mjohnson at apache dot org)
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Nicola Ken Barozzi (nicolaken at apache.org)
+
+
+
+
+ Log a message
+
+ One of DEBUG, INFO, WARN, ERROR, FATAL
+ The object to log.
+
+
+
+ Log a message
+
+ One of DEBUG, INFO, WARN, ERROR, FATAL
+ The object to log. This is Converted to a string.
+ An exception to be logged
+
+
+
+ Check if a logger is enabled to log at the specified level
+
+ One of DEBUG, INFO, WARN, ERROR, FATAL
+
+
+
+ Creates a temporary file. Files are collected into one directory and by default are
+ deleted on exit from the VM. Files can be kept by defining the system property
+ poi.keep.tmp.files.
+
+ Dont forget to close all files or it might not be possible to delete them.
+
+
+
+
+
+
+
+
+ construct the with its offset into its containing byte array
+
+ The offset.
+
+
+
+ construct the LongField with its offset into its containing
+ byte array and initialize its value
+
+ offset of the field within its byte array
+ the initial value
+
+
+
+ Construct the class with its offset into its containing
+ byte array and initialize its value from its byte array
+
+ The offset of the field within its byte array
+ the byte array to read the value from
+
+
+
+ construct the class with its offset into its containing
+ byte array, initialize its value, and write the value to a byte
+ array
+
+ offset of the field within its byte array
+ the initial value
+ the byte array to write the value to
+
+
+
+ Getg or sets the LongField's current value
+
+ The current value
+
+
+
+ set the LongField's current value and write it to a byte array
+
+ value to be set
+ the byte array to write the value to
+
+
+
+ set the value from its offset into an array of bytes
+
+ the byte array from which the value is to be read
+
+
+
+ set the value from an Stream
+
+ the Stream from which the value is to be
+
+
+
+ write the value out to an array of bytes at the appropriate offset
+
+ the array of bytes to which the value is to be written
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+ @author Yegor Kozlov
+
+
+ Converts a value of type FixedPoint to a decimal number
+
+ @param fixedPoint
+ @return decimal number
+
+ @see [MS-OSHARED] - 2.2.1.6 FixedPoint
+
+
+ Evaluator for formula arguments.
+
+ @author jfaenomoto@gmail.com
+
+
+ Evaluate a generic {@link ValueEval} argument to a double value that represents a date in POI.
+
+ @param arg {@link ValueEval} an argument.
+ @param srcCellRow number cell row.
+ @param srcCellCol number cell column.
+ @return a double representing a date in POI.
+ @throws EvaluationException exception upon argument evaluation.
+
+
+ Evaluate a generic {@link ValueEval} argument to an array of double values that represents dates in POI.
+
+ @param arg {@link ValueEval} an argument.
+ @param srcCellRow number cell row.
+ @param srcCellCol number cell column.
+ @return an array of doubles representing dates in POI.
+ @throws EvaluationException exception upon argument evaluation.
+
+
+ Evaluate a generic {@link ValueEval} argument to a double value.
+
+ @param arg {@link ValueEval} an argument.
+ @param srcCellRow number cell row.
+ @param srcCellCol number cell column.
+ @return a double value.
+ @throws EvaluationException exception upon argument evaluation.
+
+
+ Parser for java dates.
+
+ @author jfaenomoto@gmail.com
+
+
+ Parses a date from a string.
+
+ @param strVal a string with a date pattern.
+ @return a date parsed from argument.
+ @throws EvaluationException exception upon parsing.
+
+
+ @param month 1-based
+
+
+ Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()
+ Returns the number of workdays given a starting and an ending date, considering an interval of holidays. A workday is any non
+ saturday/sunday date.
+
+ Syntax
+ NETWORKDAYS(startDate, endDate, holidays)
+
+
+ @author jfaenomoto@gmail.com
+
+
+ Constructor.
+
+ @param anEvaluator an injected {@link ArgumentsEvaluator}.
+
+
+ Evaluate for NETWORKDAYS. Given two dates and a optional date or interval of holidays, determines how many working days are there
+ between those dates.
+
+ @return {@link ValueEval} for the number of days between two dates.
+
+
+ A calculator for workdays, considering dates as excel representations.
+
+ @author jfaenomoto@gmail.com
+
+
+ Constructor.
+
+
+ Calculate how many workdays are there between a start and an end date, as excel representations, considering a range of holidays.
+
+ @param start start date.
+ @param end end date.
+ @param holidays an array of holidays.
+ @return number of workdays between start and end dates, including both dates.
+
+
+ Calculate the workday past x workdays from a starting date, considering a range of holidays.
+
+ @param start start date.
+ @param workdays number of workdays to be past from starting date.
+ @param holidays an array of holidays.
+ @return date past x workdays.
+
+
+ Calculates how many days of week past between a start and an end date.
+
+ @param start start date.
+ @param end end date.
+ @param dayOfWeek a day of week as represented by {@link Calendar} constants.
+ @return how many days of week past in this interval.
+
+
+ Calculates how many holidays in a list are workdays, considering an interval of dates.
+
+ @param start start date.
+ @param end end date.
+ @param holidays an array of holidays.
+ @return number of holidays that occur in workdays, between start and end dates.
+
+
+ @param aDate a given date.
+ @return true if date is weekend, false otherwise.
+
+
+ @param aDate a given date.
+ @param holidays an array of holidays.
+ @return true if date is a holiday, false otherwise.
+
+
+ @param aDate a given date.
+ @param holidays an array of holidays.
+ @return 1 is not a workday, 0 otherwise.
+
+
+ @param start start date.
+ @param end end date.
+ @param aDate a date to be analyzed.
+ @return true if aDate is between start and end dates, false otherwise.
+
+
+ Implementation of Excel 'Analysis ToolPak' function WORKDAY()
+ Returns the date past a number of workdays beginning at a start date, considering an interval of holidays. A workday is any non
+ saturday/sunday date.
+
+ Syntax
+ WORKDAY(startDate, days, holidays)
+
+
+ @author jfaenomoto@gmail.com
+
+
+ Evaluate for WORKDAY. Given a date, a number of days and a optional date or interval of holidays, determines which date it is past
+ number of parametrized workdays.
+
+ @return {@link ValueEval} with date as its value.
+
+
+ Returns a collection of ATP function names implemented by POI.
+
+ @return an array of supported functions
+ @since 3.8 beta6
+
+
+ Returns a collection of ATP function names NOT implemented by POI.
+
+ @return an array of not supported functions
+ @since 3.8 beta6
+
+
+ Register a ATP function in runtime.
+
+ @param name the function name
+ @param func the functoin to register
+ @throws ArgumentException if the function is unknown or already registered.
+ @since 3.8 beta6
+
+
+ Implementation of Excel 'Analysis ToolPak' function MROUND()
+
+ Returns a number rounded to the desired multiple.
+
+ Syntax
+ MROUND(number, multiple)
+
+
+
+ @author Yegor Kozlov
+
+
+ Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()
+
+ @author Josh Micich
+
+
+ * Implementation of Excel 'Analysis ToolPak' function RANDBETWEEN()
+ *
+ * Returns a random integer number between the numbers you specify.
+ *
+ * Syntax
+ * RANDBETWEEN(bottom, top)
+ *
+ * bottom is the smallest integer RANDBETWEEN will return.
+ * top is the largest integer RANDBETWEEN will return.
+
+ * @author Brendan Nolan
+
+
+ Evaluate for RANDBETWEEN(). Must be given two arguments. Bottom must be greater than top.
+ Bottom is rounded up and top value is rounded down. After rounding top has to be set greater
+ than top.
+
+ @see org.apache.poi.ss.formula.functions.FreeRefFunction#evaluate(org.apache.poi.ss.formula.eval.ValueEval[], org.apache.poi.ss.formula.OperationEvaluationContext)
+
+
+ Implementation of Excel 'Analysis ToolPak' function YEARFRAC()
+
+ Returns the fraction of the year spanned by two dates.
+
+ Syntax
+ YEARFRAC(startDate, endDate, basis)
+
+ The basis optionally specifies the behaviour of YEARFRAC as follows:
+
+
+
Value
Days per Month
Days per Year
+
0 (default)
30
360
+
1
actual
actual
+
2
actual
360
+
3
actual
365
+
4
30
360
+
+
+
+
+
+ Internal calculation methods for Excel 'Analysis ToolPak' function YEARFRAC()
+ Algorithm inspired by www.dwheeler.com/yearfrac
+ @author Josh Micich
+
+
+ Date Count convention
+ http://en.wikipedia.org/wiki/Day_count_convention
+
+
+ Office Online Help on YEARFRAC
+ http://office.microsoft.com/en-us/excel/HP052093441033.aspx
+
+
+
+ use UTC time-zone to avoid daylight savings issues
+
+
+ the length of normal long months i.e. 31
+
+
+ the length of normal short months i.e. 30
+
+
+
+ Calculates YEARFRAC()
+
+ The start date.
+ The end date.
+ The basis value.
+
+
+
+
+ Basis 0, 30/360 date convention
+
+ The start date value assumed to be less than or equal to endDateVal.
+ The end date value assumed to be greater than or equal to startDateVal.
+
+
+
+
+ Basis 1, Actual/Actual date convention
+
+ The start date value assumed to be less than or equal to endDateVal.
+ The end date value assumed to be greater than or equal to startDateVal.
+
+
+
+
+ Basis 2, Actual/360 date convention
+
+ The start date value assumed to be less than or equal to endDateVal.
+ The end date value assumed to be greater than or equal to startDateVal.
+
+
+
+
+ Basis 3, Actual/365 date convention
+
+ The start date value assumed to be less than or equal to endDateVal.
+ The end date value assumed to be greater than or equal to startDateVal.
+
+
+
+
+ Basis 4, European 30/360 date convention
+
+ The start date value assumed to be less than or equal to endDateVal.
+ The end date value assumed to be greater than or equal to startDateVal.
+
+
+
+
+ Calculates the adjusted.
+
+ The start date.
+ The end date.
+ The date1day.
+ The date2day.
+
+
+
+
+ Determines whether [is last day of month] [the specified date].
+
+ The date.
+
+ true if [is last day of month] [the specified date]; otherwise, false.
+
+
+
+
+ Gets the last day of month.
+
+ The date.
+
+
+
+
+ Assumes dates are no more than 1 year apart.
+
+ The start.
+ The end.
+ true
+ if dates both within a leap year, or span a period including Feb 29
+
+
+
+ return the whole number of days between the two time-stamps. Both time-stamps are
+ assumed to represent 12:00 midnight on the respective day.
+
+ The start date ticks.
+ The end date ticks.
+
+
+
+
+ Averages the length of the year.
+
+ The start year.
+ The end year.
+
+
+
+
+ determine Leap Year
+
+ the year
+
+
+
+
+ Determines whether [is greater than one year] [the specified start].
+
+ The start date.
+ The end date.
+
+ true if [is greater than one year] [the specified start]; otherwise, false.
+
+
+
+
+ Creates the date.
+
+ The day count.
+
+
+
+
+ Simple Date Wrapper
+
+
+
+ 1-based month
+
+
+ day of month
+
+
+ milliseconds since 1970
+
+
+ An exception thrown by implementors of {@link FormulaEvaluator} when
+ attempting to evaluate a formula which requires a function that POI
+ does not (yet) support.
+
+
+ Represents a cell being used for forked Evaluation that has had a value Set different from the
+ corresponding cell in the shared master workbook.
+
+ @author Josh Micich
+
+
+ corresponding cell from master workbook
+
+
+ Represents a sheet being used for forked Evaluation. Initially, objects of this class contain
+ only the cells from the master workbook. By calling {@link #getOrCreateUpdatableCell(int, int)},
+ the master cell object is logically Replaced with a {@link ForkedEvaluationCell} instance, which
+ will be used in all subsequent Evaluations.
+
+ @author Josh Micich
+
+
+ Only cells which have been split are Put in this map. (This has been done to conserve memory).
+
+
+ Represents a workbook being used for forked Evaluation. Most operations are delegated to the
+ shared master workbook, except those that potentially involve cell values that may have been
+ updated After a call to {@link #getOrCreateUpdatableCell(String, int, int)}.
+
+ @author Josh Micich
+
+
+ An alternative workbook Evaluator that saves memory in situations where a single workbook is
+ concurrently and independently Evaluated many times. With standard formula Evaluation, around
+ 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link NPOI.xssf.usermodel.XSSFWorkbook}.
+ This class enables a 'master workbook' to be loaded just once and shared between many Evaluation
+ clients. Each Evaluation client Creates its own {@link ForkedEvaluator} and can Set cell values
+ that will be used for local Evaluations (and don't disturb Evaluations on other Evaluators).
+
+ @author Josh Micich
+
+
+ @deprecated (Sep 2009) (reduce overloading) use {@link #Create(Workbook, IStabilityClassifier, UDFFinder)}
+
+
+ @param udfFinder pass null for default (AnalysisToolPak only)
+
+
+ Sets the specified cell to the supplied value
+ @param sheetName the name of the sheet Containing the cell
+ @param rowIndex zero based
+ @param columnIndex zero based
+
+
+ Copies the values of all updated cells (modified by calls to {@link
+ #updateCell(String, int, int, ValueEval)}) to the supplied workbook.
+ Typically, the supplied workbook is a writable copy of the 'master workbook',
+ but at the very least it must contain sheets with the same names.
+
+
+ If cell Contains a formula, the formula is Evaluated and returned,
+ else the CellValue simply copies the appropriate cell value from
+ the cell and also its cell type. This method should be preferred over
+ EvaluateInCell() when the call should not modify the contents of the
+ original cell.
+
+ @param sheetName the name of the sheet Containing the cell
+ @param rowIndex zero based
+ @param columnIndex zero based
+ @return null if the supplied cell is null or blank
+
+
+ Coordinates several formula Evaluators together so that formulas that involve external
+ references can be Evaluated.
+ @param workbookNames the simple file names used to identify the workbooks in formulas
+ with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1")
+ @param Evaluators all Evaluators for the full Set of workbooks required by the formulas.
+
+
+ Evaluation of 2D (Row+Column) and 3D (Sheet+Row+Column) areas
+
+
+ returns the 0-based index of the first row in
+ this area.
+
+
+ returns the 0-based index of the last row in
+ this area.
+
+
+ returns the 0-based index of the first col in
+ this area.
+
+
+ returns the 0-based index of the last col in
+ this area.
+
+
+ returns true if the cell at row and col specified
+ as absolute indexes in the sheet is contained in
+ this area.
+ @param row
+ @param col
+
+
+ returns true if the specified col is in range
+ @param col
+
+
+ returns true if the specified row is in range
+ @param row
+
+
+ @return the ValueEval from within this area at the specified row and col index. Never
+ null (possibly {@link BlankEval}). The specified indexes should be absolute
+ indexes in the sheet and not relative indexes within the area.
+
+
+ @return the ValueEval from within this area at the specified relativeRowIndex and
+ relativeColumnIndex. Never null (possibly {@link BlankEval}). The
+ specified indexes should relative to the top left corner of this area.
+
+
+ Creates an {@link AreaEval} offset by a relative amount from from the upper left cell
+ of this area
+
+
+ @author Josh Micich
+
+
+ @return whether cell at rowIndex and columnIndex is a subtotal.
+ By default return false which means 'don't care about subtotals'
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com > This class is a
+ marker class. It is a special value for empty cells.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Convenience method for the following:
+ (b ? BoolEval.TRUE : BoolEval.FALSE)
+ @return a BoolEval instance representing b.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ #NULL! - Intersection of two cell ranges is empty
+
+
+ #DIV/0! - Division by zero
+
+
+ #VALUE! - Wrong type of operand
+
+
+ #REF! - Illegal or deleted cell reference
+
+
+ #NAME? - Wrong function or range name
+
+
+ #NUM! - Value range overflow
+
+
+ #N/A - Argument or function not available
+
+
+ Translates an Excel internal error code into the corresponding POI ErrorEval instance
+ @param errorCode
+
+
+ Converts error codes to text. Handles non-standard error codes OK.
+ For debug/test purposes (and for formatting error messages).
+ @return the String representation of the specified Excel error code.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ This class is used to simplify error handling logic within operator and function
+ implementations. Note - OperationEval.Evaluate() and Function.Evaluate()
+ method signatures do not throw this exception so it cannot propagate outside.
+
+ Here is an example coded without EvaluationException, to show how it can help:
+
+ public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
+ // ...
+ Eval arg0 = args[0];
+ if(arg0 is ErrorEval) {
+ return arg0;
+ }
+ if(!(arg0 is AreaEval)) {
+ return ErrorEval.VALUE_INVALID;
+ }
+ double temp = 0;
+ AreaEval area = (AreaEval)arg0;
+ ValueEval[] values = area.LittleEndianConstants.BYTE_SIZE;
+ for (int i = 0; i < values.Length; i++) {
+ ValueEval ve = values[i];
+ if(ve is ErrorEval) {
+ return ve;
+ }
+ if(!(ve is NumericValueEval)) {
+ return ErrorEval.VALUE_INVALID;
+ }
+ temp += ((NumericValueEval)ve).NumberValue;
+ }
+ // ...
+ }
+
+ In this example, if any error is encountered while Processing the arguments, an error is
+ returned immediately. This code is difficult to refactor due to all the points where errors
+ are returned.
+ Using EvaluationException allows the error returning code to be consolidated to one
+ place.
+
+ public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
+ try {
+ // ...
+ AreaEval area = GetAreaArg(args[0]);
+ double temp = sumValues(area.LittleEndianConstants.BYTE_SIZE);
+ // ...
+ } catch (EvaluationException e) {
+ return e.GetErrorEval();
+ }
+ }
+
+ private static AreaEval GetAreaArg(Eval arg0){
+ if (arg0 is ErrorEval) {
+ throw new EvaluationException((ErrorEval) arg0);
+ }
+ if (arg0 is AreaEval) {
+ return (AreaEval) arg0;
+ }
+ throw EvaluationException.InvalidValue();
+ }
+
+ private double sumValues(ValueEval[] values){
+ double temp = 0;
+ for (int i = 0; i < values.Length; i++) {
+ ValueEval ve = values[i];
+ if (ve is ErrorEval) {
+ throw new EvaluationException((ErrorEval) ve);
+ }
+ if (!(ve is NumericValueEval)) {
+ throw EvaluationException.InvalidValue();
+ }
+ temp += ((NumericValueEval) ve).NumberValue;
+ }
+ return temp;
+ }
+
+ It is not mandatory to use EvaluationException, doing so might give the following advantages:
+ - Methods can more easily be extracted, allowing for re-use.
+ - Type management (typecasting etc) is simpler because error conditions have been Separated from
+ intermediate calculation values.
+ - Fewer local variables are required. Local variables can have stronger types.
+ - It is easier to mimic common Excel error handling behaviour (exit upon encountering first
+ error), because exceptions conveniently propagate up the call stack regardless of execution
+ points or the number of levels of nested calls.
+
+ Note - Only standard evaluation errors are represented by EvaluationException (
+ i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions
+ that could never occur in an Excel spReadsheet should result in runtime exceptions. Care should
+ be taken to not translate any POI internal error into an Excel evaluation error code.
+
+ @author Josh Micich
+
+
+ #VALUE! - Wrong type of operand
+
+
+ #REF! - Illegal or deleted cell reference
+
+
+ #NUM! - Value range overflow
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Some function IDs that require special treatment
+
+
+ 1
+
+
+ 78
+
+
+ 100
+
+
+ 148
+
+
+ 255
+
+
+ Register a new function in runtime.
+
+ @param name the function name
+ @param func the functoin to register
+ @throws ArgumentException if the function is unknown or already registered.
+ @since 3.8 beta6
+
+
+ Returns a collection of function names implemented by POI.
+
+ @return an array of supported functions
+ @since 3.8 beta6
+
+
+ Returns an array of function names NOT implemented by POI.
+
+ @return an array of not supported functions
+ @since 3.8 beta6
+
+
+ @author Josh Micich
+
+
+ @return simple rectangular {@link AreaEval} which represents the intersection of areas
+ aeA and aeB. If the two areas do not intersect, the result is null.
+
+
+ @author Josh Micich
+
+
+ Creates a NameEval representing a function name
+
+
+ Evaluation of a Name defined in a Sheet or Workbook scope
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Provides functionality for evaluating arguments to functions and operators.
+
+ @author Josh Micich
+
+
+ Retrieves a single value from a variety of different argument types according to standard
+ Excel rules. Does not perform any type conversion.
+ @param arg the Evaluated argument as passed to the function or operator.
+ @param srcCellRow used when arg is a single column AreaRef
+ @param srcCellCol used when arg is a single row AreaRef
+ @return a NumberEval, StringEval, BoolEval or BlankEval.
+ Never null or ErrorEval.
+ @throws EvaluationException(#VALUE!) if srcCellRow or srcCellCol do not properly index into
+ an AreaEval. If the actual value retrieved is an ErrorEval, a corresponding
+ EvaluationException is thrown.
+
+
+ Implements (some perhaps not well known) Excel functionality to select a single cell from an
+ area depending on the coordinates of the calling cell. Here is an example demonstrating
+ both selection from a single row area and a single column area in the same formula.
+
+
+
A
B
C
D
+
1
15
20
25
+
2
200
+
3
300
+
3
400
+
+
+ If the formula "=1000+A1:B1+D2:D3" is put into the 9 cells from A2 to C4, the spReadsheet
+ will look like this:
+
+
+
A
B
C
D
+
1
15
20
25
+
2
1215
1220
#VALUE!
200
+
3
1315
1320
#VALUE!
300
+
4
#VALUE!
#VALUE!
#VALUE!
400
+
+
+ Note that the row area (A1:B1) does not include column C and the column area (D2:D3) does
+ not include row 4, so the values in C1(=25) and D4(=400) are not accessible to the formula
+ as written, but in the 4 cells A2:B3, the row and column selection works ok.
+
+ The same concept is extended to references across sheets, such that even multi-row,
+ multi-column areas can be useful.
+
+ Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and
+ hence this method can throw a 'circular reference' EvaluationException. Note that
+ this method does not attempt to detect cycles. Every cell in the specified Area ae
+ has already been Evaluated prior to this method call. Any cell (or cells) part of
+ ae that would incur a cyclic reference error if selected by this method, will
+ already have the value ErrorEval.CIRCULAR_REF_ERROR upon entry to this method. It
+ is assumed logic exists elsewhere to produce this behaviour.
+
+ @return whatever the selected cell's Evaluated value Is. Never null. Never
+ ErrorEval.
+ @if there is a problem with indexing into the area, or if the
+ Evaluated cell has an error.
+
+
+ @return possibly ErrorEval, and null
+
+
+ Applies some conversion rules if the supplied value is not already an integer.
+ Value is first Coerced to a double ( See CoerceValueTodouble() ).
+
+ Excel typically Converts doubles to integers by truncating toward negative infinity.
+ The equivalent java code Is:
+ return (int)Math.floor(d);
+ not:
+ return (int)d; // wrong - rounds toward zero
+
+
+
+ Applies some conversion rules if the supplied value is not already a number.
+ Note - BlankEval is not supported and must be handled by the caller.
+ @param ev must be a NumberEval, StringEval or BoolEval
+ @return actual, Parsed or interpreted double value (respectively).
+ @throws EvaluationException(#VALUE!) only if a StringEval is supplied and cannot be Parsed
+ as a double (See Parsedouble() for allowable formats).
+ @throws Exception if the supplied parameter is not NumberEval,
+ StringEval or BoolEval
+
+
+ Converts a string to a double using standard rules that Excel would use.
+ Tolerates currency prefixes, commas, leading and trailing spaces.
+
+ Some examples:
+ " 123 " -> 123.0
+ ".123" -> 0.123
+ These not supported yet:
+ " $ 1,000.00 " -> 1000.0
+ "$1.25E4" -> 12500.0
+ "5**2" -> 500
+ "250%" -> 2.5
+
+ @param text
+ @return null if the specified text cannot be Parsed as a number
+
+
+ @param ve must be a NumberEval, StringEval, BoolEval, or BlankEval
+ @return the Converted string value. never null
+
+
+ @return null to represent blank values
+ @throws EvaluationException if ve is an ErrorEval, or if a string value cannot be converted
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation of Excel formula token '%'.
+ @author Josh Micich
+
+
+
+ @author Josh Micich
+
+
+ @author Amol S Deshmukh < amolweb at ya hoo dot com >
+
+ RefEval is the base interface for Ref2D and Ref3DEval. Basically a RefEval
+ impl should contain reference to the original ReferencePtg or Ref3DPtg as
+ well as the "value" resulting from the evaluation of the cell
+ reference. Thus if the HSSFCell has type CELL_TYPE_NUMERIC, the contained
+ value object should be of type NumberEval; if cell type is CELL_TYPE_STRING,
+ contained value object should be of type StringEval
+
+
+ The (possibly Evaluated) ValueEval contained
+ in this RefEval. eg. if cell A1 Contains "test"
+ then in a formula referring to cell A1
+ the RefEval representing
+ A1 will return as the InnerValueEval the
+ object of concrete type StringEval
+
+
+ returns the zero based column index.
+
+
+ returns the zero based row index.
+
+
+ returns the number of sheets this applies to
+
+
+ Creates an {@link AreaEval} offset by a relative amount from this RefEval
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo Dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @return never null, possibly empty string.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ This is a documentation of the observed behaviour of
+ the '+' operator in Excel:
+
+ - 1+TRUE = 2
+ - 1+FALSE = 1
+ - 1+"true" = #VALUE!
+ - 1+"1" = 2
+ - 1+A1 = #VALUE if A1 Contains "1"
+ - 1+A1 = 2 if A1 Contains ="1"
+ - 1+A1 = 2 if A1 Contains TRUE or =TRUE
+ - 1+A1 = #VALUE! if A1 Contains "TRUE" or ="TRUE"
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation for the Excel function AverageIfs
+
average_range Required. One or more cells to get the average, including numbers or names, ranges,
+ or cell references that contain numbers. Blank and text values are ignored.
+
criteria1_range Required. The first range in which
+ to evaluate the associated criteria.
+
criteria1 Required. The criteria in the form of a number, expression,
+ cell reference, or text that define which cells in the criteria_range1
+ argument will be counted
+
criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria.
+ Up to 127 range/criteria pairs are allowed.
+
+
+
+ @author Yegor Kozlov
+
+
+ Verify that each criteriaRanges argument contains the same number of rows and columns
+ as the avgRange argument
+
+ @throws EvaluationException if
+
+
+
+ @param ranges criteria ranges, each range must be of the same dimensions as aeAvg
+ @param predicates array of predicates, a predicate for each value in ranges
+ @param aeAvg the range to calculate
+
+ @return the computed value
+
+
+
Some utils for Converting from and to any base
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel Bin2Dec() function.
+
+ Syntax: Bin2Dec (number)
+
+ Converts a binary number to decimal.
+
+ Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits).
+ The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits.
+ Negative numbers are represented using two's-complement notation.
+
+ Remark
+ If number is not a valid binary number, or if number contains more than 10 characters (10 bits),
+ BIN2DEC returns the #NUM! error value.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel CODE () function.
+
+ Syntax: CODE (text )
+
+ Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.
+
+ text The text for which you want the code of the first character.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel COMPLEX () function.
+
+ Syntax: COMPLEX (real_num,i_num,suffix )
+
+ Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj.
+
+
+ All complex number functions accept "i" and "j" for suffix, but neither "I" nor "J".
+ Using uppercase results in the #VALUE! error value. All functions that accept two
+ or more complex numbers require that all suffixes match.
+
+ real_num The real coefficient of the complex number.
+ If this argument is nonnumeric, this function returns the #VALUE! error value.
+
+
+ i_num The imaginary coefficient of the complex number.
+ If this argument is nonnumeric, this function returns the #VALUE! error value.
+
+
+ suffix The suffix for the imaginary component of the complex number.
+
+
If omitted, suffix is assumed to be "i".
+
If suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error value.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for the function COUNTIFS
+
+
+
+ Implementation for Excel Bin2Dec() function.
+
+ Syntax: Bin2Dec (number,[places] )
+
+ Converts a decimal number to binary.
+
+ The DEC2BIN function syntax has the following arguments:
+
+
Number Required. The decimal integer you want to Convert. If number is negative, valid place values are ignored and DEC2BIN returns a 10-character (10-bit) binary number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
+
Places Optional. The number of characters to use. If places is omitted, DEC2BIN uses the minimum number of characters necessary. Places is useful for pAdding the return value with leading 0s (zeros).
+
+
+ Remarks
+
+
If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
+
If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
+
If DEC2BIN requires more than places characters, it returns the #NUM! error value.
+
If places is not an integer, it is tRuncated.
+
If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
+
If places is zero or negative, DEC2BIN returns the #NUM! error value.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel DELTA() function.
+
+ Syntax: DEC2HEX (number,places )
+
+ Converts a decimal number to hexadecimal.
+
+ The decimal integer you want to Convert. If number is negative, places is ignored
+ and this function returns a 10-character (40-bit) hexadecimal number in which the
+ most significant bit is the sign bit. The remaining 39 bits are magnitude bits.
+ Negative numbers are represented using two's-complement notation.
+
+
+
If number < -549,755,813,888 or if number > 549,755,813,887, this function returns the #NUM! error value.
+
If number is nonnumeric, this function returns the #VALUE! error value.
+
+
+
places
+
+ The number of characters to use. The places argument is useful for pAdding the
+ return value with leading 0s (zeros).
+
+
+
If this argument is omitted, this function uses the minimum number of characters necessary.
+
If this function requires more than places characters, it returns the #NUM! error value.
+
If this argument is nonnumeric, this function returns the #VALUE! error value.
+
If this argument is negative, this function returns the #NUM! error value.
+
If this argument Contains a decimal value, this function ignores the numbers to the right side of the decimal point.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel DELTA() function.
+
+ Syntax: DELTA (number1,number2 )
+
+ Tests whether two values are Equal. Returns 1 if number1 = number2; returns 0 otherwise.
+ Use this function to filter a Set of values. For example, by summing several DELTA functions
+ you calculate the count of equal pairs. This function is also known as the Kronecker Delta function.
+
+
+
If number1 is nonnumeric, DELTA returns the #VALUE! error value.
+
If number2 is nonnumeric, DELTA returns the #VALUE! error value.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation of the DGet function:
+ Finds the value of a column in an area with given conditions.
+
+ TODO:
+ - wildcards ? and * in string conditions
+ - functions as conditions
+
+
+ Implementation of the DMin function:
+ Finds the minimum value of a column in an area with given conditions.
+
+ TODO:
+ - wildcards ? and * in string conditions
+ - functions as conditions
+
+
+ This class performs a D* calculation. It takes an {@link IDStarAlgorithm} object and
+ uses it for calculating the result value. Iterating a database and Checking the
+ entries against the Set of conditions is done here.
+
+
+ Resolve reference(-chains) until we have a normal value.
+
+ @param field a ValueEval which can be a RefEval.
+ @return a ValueEval which is guaranteed not to be a RefEval
+ @If a multi-sheet reference was found along the way.
+
+
+ Returns the first column index that matches the given name. The name can either be
+ a string or an integer, when it's an integer, then the respective column
+ (1 based index) is returned.
+ @param nameValueEval
+ @param db
+ @return the first column index that matches the given name (or int)
+ @
+
+
+ For a given database returns the column number for a column heading.
+
+ @param db Database.
+ @param name Column heading.
+ @return Corresponding column number.
+ @If it's not possible to turn all headings into strings.
+
+
+ Checks a row in a database against a condition database.
+
+ @param db Database.
+ @param row The row in the database to Check.
+ @param cdb The condition database to use for Checking.
+ @return Whether the row matches the conditions.
+ @If references could not be Resolved or comparison
+ operators and operands didn't match.
+
+
+ Test a value against a simple (< > <= >= = starts-with) condition string.
+
+ @param value The value to Check.
+ @param condition The condition to check for.
+ @return Whether the condition holds.
+ @If comparison operator and operands don't match.
+
+
+ Test whether a value matches a numeric condition.
+ @param valueEval Value to Check.
+ @param op Comparator to use.
+ @param condition Value to check against.
+ @return whether the condition holds.
+ @If it's impossible to turn the condition into a number.
+
+
+ Takes a ValueEval and tries to retrieve a String value from it.
+ It tries to resolve references if there are any.
+
+ @param value ValueEval to retrieve the string from.
+ @return String corresponding to the given ValueEval.
+ @If it's not possible to retrieve a String value.
+
+
+ Implementation for the Excel EOMONTH() function.
+
+ EOMONTH() returns the date of the last day of a month..
+
+ Syntax:
+ EOMONTH(start_date,months)
+
+ start_date is the starting date of the calculation
+ months is the number of months to be Added to start_date,
+ to give a new date. For this new date, EOMONTH returns the date of
+ the last day of the month. months may be positive (in the future),
+ zero or negative (in the past).
+
+
+ Implementation for the ERROR.TYPE() Excel function.
+
+ Syntax:
+ ERROR.TYPE(errorValue)
+
+ Returns a number corresponding to the error type of the supplied argument.
+
+
+
errorValue
Return Value
+
#NULL!
1
+
#DIV/0!
2
+
#VALUE!
3
+
#REF!
4
+
#NAME?
5
+
#NUM!
6
+
#N/A!
7
+
everything else
#N/A!
+
+
+ Note - the results of ERROR.TYPE() are different to the constants defined in
+ ErrorConstants.
+
+
+ @author Josh Micich
+
+
+ Implementation for Excel FACTDOUBLE() function.
+
+ Syntax: FACTDOUBLE (number)
+
+ Returns the double factorial of a number.
+
+ Number is the value for which to return the double factorial. If number is not an integer, it is truncated.
+
+ Remarks
+
+
If number is nonnumeric, FACTDOUBLE returns the #VALUE! error value.
+
If number is negative, FACTDOUBLE returns the #NUM! error value.
+
+ Use a cache for more speed of previously calculated factorial
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation of the financial functions pmt, fv, ppmt, ipmt.
+
+ @author Mike Argyriou micharg@gmail.com
+
+
+ Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type)
+ function, which calculates the payments for a loan or the future value of an investment
+
+ @param r
+ - periodic interest rate represented as a decimal.
+ @param nper
+ - number of total payments / periods.
+ @param pv
+ - present value -- borrowed or invested principal.
+ @param fv
+ - future value of loan or annuity.
+ @param type
+ - when payment is made: beginning of period is 1; end, 0.
+ @return double representing periodic payment amount.
+
+
+ Overloaded pmt() call omitting type, which defaults to 0.
+
+ @see #pmt(double, int, double, double, int)
+
+
+ Overloaded pmt() call omitting fv and type, which both default to 0.
+
+ @see #pmt(double, int, double, double, int)
+
+
+ Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV,
+ FV, Type) function, which calculates the portion of the payment at a
+ given period that is the interest on previous balance.
+
+ @param r
+ - periodic interest rate represented as a decimal.
+ @param per
+ - period (payment number) to check value at.
+ @param nper
+ - number of total payments / periods.
+ @param pv
+ - present value -- borrowed or invested principal.
+ @param fv
+ - future value of loan or annuity.
+ @param type
+ - when payment is made: beginning of period is 1; end, 0.
+ @return double representing interest portion of payment.
+
+ @see #pmt(double, int, double, double, int)
+ @see #fv(double, int, double, double, int)
+
+
+ Emulates Excel/Calc's PPMT(interest_rate, period, number_payments, PV,
+ FV, Type) function, which calculates the portion of the payment at a
+ given period that will apply to principal.
+
+ @param r
+ - periodic interest rate represented as a decimal.
+ @param per
+ - period (payment number) to check value at.
+ @param nper
+ - number of total payments / periods.
+ @param pv
+ - present value -- borrowed or invested principal.
+ @param fv
+ - future value of loan or annuity.
+ @param type
+ - when payment is made: beginning of period is 1; end, 0.
+ @return double representing principal portion of payment.
+
+ @see #pmt(double, int, double, double, int)
+ @see #ipmt(double, int, int, double, double, bool)
+
+
+ Emulates Excel/Calc's FV(interest_rate, number_payments, payment, PV,
+ Type) function, which calculates future value or principal at period N.
+
+ @param r
+ - periodic interest rate represented as a decimal.
+ @param nper
+ - number of total payments / periods.
+ @param pmt
+ - periodic payment amount.
+ @param pv
+ - present value -- borrowed or invested principal.
+ @param type
+ - when payment is made: beginning of period is 1; end, 0.
+ @return double representing future principal value.
+
+
+ Overloaded fv() call omitting type, which defaults to 0.
+
+ @see #fv(double, int, double, double, int)
+
+
+ Implementation for Excel HEX2DEC() function.
+
+ Syntax: HEX2DEC (number)
+
+ Converts a hexadecimal number to decimal.
+
+ Number is the hexadecimal number you want to Convert. Number cannot contain more than 10 characters (40 bits).
+ The most significant bit of number is the sign bit.
+ The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
+ Remark
+ If number is not a valid hexadecimal number, HEX2DEC returns the #NUM! error value.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation of Excel HYPERLINK function.
+
+ In Excel this function has special behaviour - it causes the displayed cell value to behave like
+ a hyperlink in the GUI. From an evaluation perspective however, it is very simple.
+
+ Syntax:
+ HYPERLINK(link_location, friendly_name)
+
+ link_location The URL of the hyperlink
+ friendly_name (optional) the value to display
+
+ Returns last argument. Leaves type unchanged (does not convert to {@link org.apache.poi.ss.formula.eval.StringEval}).
+
+ @author Wayne Clingingsmith
+
+
+ Interface specifying how an algorithm to be used by {@link DStarRunner} should look like.
+ Each implementing class should correspond to one of the D* functions.
+
+
+ Reset the state of this algorithm.
+ This is called before each run through a database.
+
+
+ Process a match that is found during a run through a database.
+ @param eval ValueEval of the cell in the matching row. References will already be Resolved.
+ @return Whether we should continue iterating through the database.
+
+
+ Return a result ValueEval that will be the result of the calculation.
+ This is always called at the end of a run through the database.
+ @return a ValueEval
+
+
+ Implementation for Excel IMAGINARY() function.
+
+ Syntax: IMAGINARY (Inumber)
+
+ Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
+
+ Inumber is a complex number for which you want the imaginary coefficient.
+
+ Remarks
+
+
Use COMPLEX to convert real and imaginary coefficients into a complex number.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel ImReal() function.
+
+ Syntax: ImReal (Inumber)
+
+ Returns the real coefficient of a complex number in x + yi or x + yj text format.
+
+ Inumber A complex number for which you want the real coefficient.
+
+ Remarks
+
+
If inumber is not in the form x + yi or x + yj, this function returns the #NUM! error value.
+
Use COMPLEX to convert real and imaginary coefficients into a complex number.
+
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation of Excel function INTERCEPT()
+
+ Calculates the INTERCEPT of the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
+ Syntax:
+ INTERCEPT(arrayX, arrayY)
+
+
+ @author Johan Karlsteen
+
+
+ Base class for linear regression functions.
+
+ Calculates the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
+ Syntax:
+ INTERCEPT(arrayX, arrayY)
+ or
+ SLOPE(arrayX, arrayY)
+
+
+ @author Johan Karlsteen
+
+
+ Calculates Modified internal rate of return. Syntax is MIRR(cash_flow_values, finance_rate, reinvest_rate)
+
+
Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both the cost
+ of the investment and the interest received on reinvestment of cash.
+
+ Values is an array or a reference to cells that contain numbers. These numbers represent a series of payments (negative values) and income (positive values) occurring at regular periods.
+
+
Values must contain at least one positive value and one negative value to calculate the modified internal rate of return. Otherwise, MIRR returns the #DIV/0! error value.
+
If an array or reference argument Contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
+
+
+ Finance_rate is the interest rate you pay on the money used in the cash flows.
+ Reinvest_rate is the interest rate you receive on the cash flows as you reinvest them.
+
+ @author Carlos Delgado (carlos dot del dot est at gmail dot com)
+ @author Cédric Walter (cedric dot walter at gmail dot com)
+
+ @see Wikipedia on MIRR
+ @see Excel MIRR
+ @see {@link Irr}
+
+
+
Implementation for Excel Oct2Dec() function.
+
+ Converts an octal number to decimal.
+
+
+ Syntax: Oct2Dec (number )
+
+
+ Number is the octal number you want to Convert. Number may not contain more than 10 octal characters (30 bits).
+ The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits.
+ Negative numbers are represented using two's-complement notation..
+
+ If number is not a valid octal number, OCT2DEC returns the #NUM! error value.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Compute the interest portion of a payment.
+
+ @author Mike Argyriou micharg@gmail.com
+
+
+
Implementation for Excel QUOTIENT () function.
+
+ Syntax: QUOTIENT(Numerator,Denominator)
+
+
+ Numerator is the dividend.
+ Denominator is the divisor.
+
+ Returns the integer portion of a division. Use this function when you want to discard the remainder of a division.
+
+
+ If either enumerator/denominator is non numeric, QUOTIENT returns the #VALUE! error value.
+ If denominator is Equals to zero, QUOTIENT returns the #DIV/0! error value.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ * Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list.
+
+ * Syntax:
+ * RANK(number,ref,order)
+ * Number is the number whose rank you want to find.
+ * Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored.
+ * Order is a number specifying how to rank number.
+
+ * If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order.
+ * If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order.
+ *
+ * @author Rubin Wang
+
+
+ Implements the Excel Rate function
+
+
+ Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases
+
+ @throws EvaluationException (#NUM!) if result is NaN or Infinity
+
+
+ Implementation for Excel REPT () function.
+
+ Syntax: REPT (text,number_times )
+
+ Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
+
+ text : text The text that you want to repeat.
+ number_times: A positive number specifying the number of times to repeat text.
+
+ If number_times is 0 (zero), REPT returns "" (empty text).
+ If this argument contains a decimal value, this function ignores the numbers to the right side of the decimal point.
+
+ The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation for Excel WeekNum() function.
+
+ Syntax: WeekNum (Serial_num,Return_type)
+
+ Returns a number that indicates where the week falls numerically within a year.
+
+
+ Serial_num is a date within the week. Dates should be entered by using the DATE function,
+ or as results of other formulas or functions. For example, use DATE(2008,5,23)
+ for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
+ Return_type is a number that determines on which day the week begins. The default is 1.
+ 1 Week begins on Sunday. Weekdays are numbered 1 through 7.
+ 2 Week begins on Monday. Weekdays are numbered 1 through 7.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Classic conversion.
+
+ @param number
+ @return
+
+
+ Use conversion rule to factor some parts and make them more concise
+
+ @param result
+ @param form
+ @return
+
+
+ Implementation of Excel function SLOPE()
+
+ Calculates the SLOPE of the linear regression line that is used to predict y values from x values
+ (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
+ Syntax:
+ SLOPE(arrayX, arrayY)
+
+
+ @author Johan Karlsteen
+
+
+ Implementation for the Excel function SUMIF
sum_range Required. One or more cells to sum, including numbers or names, ranges,
+ or cell references that contain numbers. Blank and text values are ignored.
+
criteria1_range Required. The first range in which
+ to evaluate the associated criteria.
+
criteria1 Required. The criteria in the form of a number, expression,
+ cell reference, or text that define which cells in the criteria_range1
+ argument will be added
+
criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria.
+ Up to 127 range/criteria pairs are allowed.
+
+
+
+ @author Yegor Kozlov
+
+
+ Verify that each criteriaRanges argument contains the same number of rows and columns
+ as the sumRange argument
+
+ @throws EvaluationException if
+
+
+
+ @param ranges criteria ranges, each range must be of the same dimensions as aeSum
+ @param predicates array of predicates, a predicate for each value in ranges
+ @param aeSum the range to sum
+
+ @return the computed value
+
+
+
+ Implementation of the PROPER function:
+ Normalizes all words (separated by non-word characters) by
+ making the first letter upper and the rest lower case.
+
+
+
+ Implementation for the Excel function WEEKDAY
+
+ @author Thies Wellpott
+
+
+ * Perform WEEKDAY(date, returnOption) function.
+ * Note: Parameter texts are from German EXCEL-2010 help.
+ * Parameters in args[]:
+ * args[0] serialDate
+ * EXCEL-date value
+ * Standardmaessig ist der 1. Januar 1900 die fortlaufende Zahl 1 und
+ * der 1. Januar 2008 die fortlaufende Zahl 39.448, da dieser Tag nach 39.448 Tagen
+ * auf den 01.01.1900 folgt.
+ * @return Option (optional)
+ * Bestimmt den Rueckgabewert:
+ 1 oder nicht angegeben Zahl 1 (Sonntag) bis 7 (Samstag). Verhaelt sich wie fruehere Microsoft Excel-Versionen.
+ 2 Zahl 1 (Montag) bis 7 (Sonntag).
+ 3 Zahl 0 (Montag) bis 6 (Sonntag).
+ 11 Die Zahlen 1 (Montag) bis 7 (Sonntag)
+ 12 Die Zahlen 1 (Dienstag) bis 7 (Montag)
+ 13 Die Zahlen 1 (Mittwoch) bis 7 (Dienstag)
+ 14 Die Zahlen 1 (Donnerstag) bis 7 (Mittwoch)
+ 15 Die Zahlen 1 (Freitag) bis 7 (Donnerstag)
+ 16 Die Zahlen 1 (Samstag) bis 7 (Freitag)
+ 17 Die Zahlen 1 (Sonntag) bis 7 (Samstag)
+
+
+ Implementation for Excel WeekNum() function.
+
+ Syntax: WeekNum (Serial_num,Return_type)
+
+ Returns a number that indicates where the week falls numerically within a year.
+
+
+ Serial_num is a date within the week. Dates should be entered by using the DATE function,
+ or as results of other formulas or functions. For example, use DATE(2008,5,23)
+ for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
+ Return_type is a number that determines on which day the week begins. The default is 1.
+ 1 Week begins on Sunday. Weekdays are numbered 1 through 7.
+ 2 Week begins on Monday. Weekdays are numbered 1 through 7.
+
+ @author cedric dot walter @ gmail dot com
+
+
+ Implementation of Excel 'Analysis ToolPak' function EDATE()
+
+ Adds a specified number of months to the specified date.
+
+ Syntax
+ EDATE(date, number)
+
+
+
+ @author Tomas Herceg
+
+
+ contribute by Pavel Egorov
+ https://github.com/xoposhiy/npoi/commit/27b34a2389030c7115a666ace65daafda40d61af
+ Implementation of Excel ISERR() function.
+
+ Syntax:
+ ISERR(value)
+
+ value The value to be tested
+
+ Returns the logical value TRUE if value refers to any error value except
+ '#N/A'; otherwise, it returns FALSE.
+
+
+ Creates a text reference as text, given specified row and column numbers.
+
+ @author Aniket Banerjee (banerjee@google.com)
+
+
+ ignore nested subtotals.
+
+
+ Returns the k-th percentile of values in a range. You can use this function to establish a threshold of
+ acceptance. For example, you can decide to examine candidates who score above the 90th percentile.
+
+ PERCENTILE(array,k)
+ Array is the array or range of data that defines relative standing.
+ K is the percentile value in the range 0..1, inclusive.
+
+ Remarks
+
+
if array is empty or Contains more than 8,191 data points, PERCENTILE returns the #NUM! error value.
+
If k is nonnumeric, PERCENTILE returns the #VALUE! error value.
+
If k is < 0 or if k > 1, PERCENTILE returns the #NUM! error value.
+
If k is not a multiple of 1/(n - 1), PERCENTILE interpolates to determine the value at the k-th percentile.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Here are the general rules concerning Boolean functions:
+
+
Blanks are ignored (not either true or false)
+
Strings are ignored if part of an area ref or cell ref, otherwise they must be 'true' or 'false'
+
Numbers: 0 is false. Any other number is TRUE
+
Areas: *all* cells in area are evaluated according to the above rules
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation of Excel functions Date parsing functions:
+ Date - DAY, MONTH and YEAR
+ Time - HOUR, MINUTE and SECOND
+
+ @author Others (not mentioned in code)
+ @author Thies Wellpott
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Josh Micich
+
+
+ Implementation for Excel COLUMNS function.
+
+ @author Josh Micich
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Counts the number of cells that contain numeric data within
+ the list of arguments.
+
+ Excel Syntax
+ COUNT(value1,value2,...)
+ Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted.
+
+ TODO: Check this properly Matches excel on edge cases
+ like formula cells, error cells etc
+
+
+ Create an instance of Count to use in {@link Subtotal}
+
+ If there are other subtotals within argument refs (or nested subtotals),
+ these nested subtotals are ignored to avoid double counting.
+
+
+ @see Subtotal
+
+
+ Counts the number of cells that contain data within the list of arguments.
+
+ Excel Syntax
+ COUNTA(value1,value2,...)
+ Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted.
+
+ @author Josh Micich
+
+
+ don't count cells that are subtotals
+
+
+ Implementation for the function COUNTBLANK
+
+ Syntax: COUNTBLANK ( range )
+
+
range
is the range of cells to count blanks
+
+
+
+ @author Mads Mohr Christensen
+
+
+ Implementation for the function COUNTIF
+
+ Syntax: COUNTIF ( range, criteria )
+
+
range
is the range of cells to be Counted based on the criteria
+
criteria
is used to determine which cells to Count
+
+
+
+ @author Josh Micich
+
+
+ @return number of characters used to represent this operator
+
+
+
+ Translates Excel countif wildcard strings into .NET regex strings
+
+ Excel wildcard expression
+ return null if the specified value contains no special wildcard characters.
+
+
+ @return the number of evaluated cells in the range that match the specified criteria
+
+
+
+ @return the de-referenced criteria arg (possibly {@link ErrorEval})
+
+
+ When the second argument is a string, many things are possible
+
+
+ Creates a criteria predicate object for the supplied criteria arg
+ @return null if the arg evaluates to blank.
+
+
+ bool literals ('TRUE', 'FALSE') treated similarly but NOT same as numbers.
+
+
+ Common interface for the matching criteria.
+
+
+ Common logic for COUNT, COUNTA and COUNTIF
+
+ @author Josh Micich
+
+
+ @return the number of evaluated cells in the range that match the specified criteria
+
+
+ @return the number of evaluated cells in the range that match the specified criteria
+
+
+ @author Pavel Krupets (pkrupets at palmtreebusiness dot com)
+
+
+ * Note - works with Java Calendar months, not Excel months
+ * Java Calendar month = Excel month + 1
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ Super class for all Evals for financial function evaluation.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+ This class Is a functon library for common fiscal functions.
+ Glossary of terms/abbreviations:
+
+
+
FV: Future Value
+
PV: Present Value
+
NPV: Net Present Value
+
PMT: (Periodic) Payment
+
+
+ For more info on the terms/abbreviations please use the references below
+ (hyperlinks are subject to Change):
+ Online References:
+
+
GNU Emacs Calc 2.02 Manual: http://theory.uwinnipeg.ca/gnu/calc/calc_203.html
MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx
+
+
Implementation Notes:
+ Symbols used in the formulae that follow:
+
+
p: present value
+
f: future value
+
n: number of periods
+
y: payment (in each period)
+
r: rate
+
^: the power operator (NOT the java bitwise XOR operator!)
+
+ [From MS Excel function reference] Following are some of the key formulas
+ that are used in this implementation:
+
+ p(1+r)^n + y(1+rt)((1+r)^n-1)/r + f=0 ...{when r!=0}
+ ny + p + f=0 ...{when r=0}
+
+
+
+ Future value of an amount given the number of payments, rate, amount
+ of individual payment, present value and bool value indicating whether
+ payments are due at the beginning of period
+ (false => payments are due at end of period)
+ @param r rate
+ @param n num of periods
+ @param y pmt per period
+ @param p future value
+ @param t type (true=pmt at end of period, false=pmt at begining of period)
+
+
+ Present value of an amount given the number of future payments, rate, amount
+ of individual payment, future value and bool value indicating whether
+ payments are due at the beginning of period
+ (false => payments are due at end of period)
+ @param r
+ @param n
+ @param y
+ @param f
+ @param t
+
+
+ calculates the Net Present Value of a principal amount
+ given the disCount rate and a sequence of cash flows
+ (supplied as an array). If the amounts are income the value should
+ be positive, else if they are payments and not income, the
+ value should be negative.
+ @param r
+ @param cfs cashflow amounts
+
+
+
+ @param r
+ @param n
+ @param p
+ @param f
+ @param t
+
+
+
+ @param r
+ @param y
+ @param p
+ @param f
+ @param t
+
+
+ Convenience base class for functions that only take zero arguments.
+
+ @author Josh Micich
+
+
+ Convenience base class for functions that must take exactly one argument.
+
+ @author Josh Micich
+
+
+ Convenience base class for functions that must take exactly two arguments.
+
+ @author Josh Micich
+
+
+ Convenience base class for functions that must take exactly three arguments.
+
+ @author Josh Micich
+
+
+ Convenience base class for functions that must take exactly four arguments.
+
+ @author Josh Micich
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ For most Excel functions, involving references ((cell, area), (2d, 3d)), the references are
+ passed in as arguments, and the exact location remains fixed. However, a select few Excel
+ functions have the ability to access cells that were not part of any reference passed as an
+ argument.
+ Two important functions with this feature are INDIRECT and OFFSet
+
+ In POI, the HSSFFormulaEvaluator Evaluates every cell in each reference argument before
+ calling the function. This means that functions using fixed references do not need access to
+ the rest of the workbook to execute. Hence the Evaluate() method on the common
+ interface Function does not take a workbook parameter.
+
+ This interface recognises the requirement of some functions to freely Create and Evaluate
+ references beyond those passed in as arguments.
+
+ @author Josh Micich
+
+
+ @param args the pre-Evaluated arguments for this function. args is never null,
+ nor are any of its elements.
+ @param ec primarily used to identify the source cell Containing the formula being Evaluated.
+ may also be used to dynamically create reference evals.
+ @return never null. Possibly an instance of ErrorEval in the case of
+ a specified Excel error (Exceptions are never thrown to represent Excel errors).
+
+
+
+ Function serves as a marker interface.
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Evaluates the specified args.
+
+ the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval
+ row index of the cell containing the formula under evaluation
+ column index of the cell containing the formula under evaluation
+
+
+
+ Implemented by all functions that can be called with zero arguments
+
+ @author Josh Micich
+
+
+ see {@link Function#Evaluate(ValueEval[], int, int)}
+
+
+ Implemented by all functions that can be called with one argument
+
+ @author Josh Micich
+
+
+ see {@link Function#Evaluate(ValueEval[], int, int)}
+
+
+ Implemented by all functions that can be called with two arguments
+
+ @author Josh Micich
+
+
+ see {@link Function#Evaluate(ValueEval[], int, int)}
+
+
+ Implemented by all functions that can be called with three arguments
+
+ @author Josh Micich
+
+
+ see {@link Function#Evaluate(ValueEval[], int, int)}
+
+
+ Implemented by all functions that can be called with four arguments
+
+ @author Josh Micich
+
+
+ see {@link Function#Evaluate(ValueEval[], int, int)}
+
+
+ Implementation of the HLOOKUP() function.
+
+ HLOOKUP Finds a column in a lookup table by the first row value and returns the value from another row.
+
+ Syntax:
+ HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)
+
+ lookup_value The value to be found in the first column of the table array.
+ table_array An area reference for the lookup data.
+ row_index_num a 1 based index specifying which row value of the lookup data will be returned.
+ range_lookup If TRUE (default), HLOOKUP Finds the largest value less than or equal to
+ the lookup_value. If FALSE, only exact Matches will be considered
+
+ @author Josh Micich
+
+
+ Returns one column from an AreaEval
+
+ @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation for the Excel function INDEX
+
+ Syntax :
+ INDEX ( reference, row_num[, column_num [, area_num]])
+ INDEX ( array, row_num[, column_num])
+
+
reference
typically an area reference, possibly a union of areas
+
array
a literal array value (currently not supported)
+
row_num
selects the row within the array or area reference
+
column_num
selects column within the array or area reference. default Is 1
+
area_num
used when reference Is a union of areas
+
+
+ @author Josh Micich
+
+
+ @param colArgWasPassed false if the INDEX argument lIst had just 2 items
+ (exactly 1 comma). If anything Is passed for the column_num argument
+ (including {@link BlankEval} or {@link MIssingArgEval}) this parameter will be
+ true. ThIs parameter is needed because error codes are slightly
+ different when only 2 args are passed.
+
+
+ @param arg a 1-based index.
+ @return the Resolved 1-based index. Zero if the arg was missing or blank
+ @throws EvaluationException if the arg Is an error value evaluates to a negative numeric value
+
+
+ Implementation for Excel function INDIRECT
+
+ INDIRECT() returns the cell or area reference denoted by the text argument.
+
+ Syntax:
+ INDIRECT(ref_text,isA1Style)
+
+ ref_text a string representation of the desired reference as it would normally be written
+ in a cell formula.
+ isA1Style (default TRUE) specifies whether the ref_text should be interpreted as A1-style
+ or R1C1-style.
+
+
+ @author Josh Micich
+
+
+ @return array of length 2: {workbookName, sheetName,}. Second element will always be
+ present. First element may be null if sheetName is unqualified.
+ Returns null if text cannot be parsed.
+
+
+ @return null if there is a syntax error in any escape sequence
+ (the typical syntax error is a single quote character not followed by another).
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Calculates the internal rate of return.
+
+ Syntax is IRR(values) or IRR(values,guess)
+
+ @author Marcel May
+ @author Yegor Kozlov
+
+ @see Wikipedia on IRR
+ @see Excel IRR
+
+
+ Computes the internal rate of return using an estimated irr of 10 percent.
+
+ @param income the income values.
+ @return the irr.
+
+
+ Calculates IRR using the Newton-Raphson Method.
+
+ Starting with the guess, the method cycles through the calculation until the result
+ is accurate within 0.00001 percent. If IRR can't find a result that works
+ after 20 tries, the Double.NaN is returned.
+
+
+ The implementation is inspired by the NewtonSolver from the Apache Commons-Math library,
+ @see http://commons.apache.org
+
+
+ @param values the income values.
+ @param guess the initial guess of irr.
+ @return the irr value. The method returns Double.NaN
+ if the maximum iteration count is exceeded
+
+ @see
+ http://en.wikipedia.org/wiki/Internal_rate_of_return#Numerical_solution
+ @see
+ http://en.wikipedia.org/wiki/Newton%27s_method
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @param arg any {@link ValueEval}, potentially {@link BlankEval} or {@link ErrorEval}.
+
+
+ Implementation of Excel function LOOKUP.
+
+ LOOKUP Finds an index row in a lookup table by the first column value and returns the value from another column.
+
+ Syntax:
+ VLOOKUP(lookup_value, lookup_vector, result_vector)
+
+ lookup_value The value to be found in the lookup vector.
+ lookup_vector An area reference for the lookup data.
+ result_vector Single row or single column area reference from which the result value Is chosen.
+
+ @author Josh Micich
+
+
+ Common functionality used by VLOOKUP, HLOOKUP, LOOKUP and MATCH
+
+ @author Josh Micich
+
+
+ @return null if the supplied area is neither a single row nor a single colum
+
+
+ Processes the third argument to VLOOKUP, or HLOOKUP (col_index_num
+ or row_index_num respectively).
+ Sample behaviour:
+
+
Input Return
Value
Thrown Error
+
5
4
+
2.9
2
+
"5"
4
+
"2.18e1"
21
+
"-$2"
-3
*
+
FALSE
-1
*
+
TRUE
0
+
"TRUE"
#REF!
+
"abc"
#REF!
+
""
#REF!
+
<blank>
#VALUE!
+
+
+ * Note - out of range errors (both too high and too low) are handled by the caller.
+ @return column or row index as a zero-based value
+
+
+
+ The second argument (table_array) should be an area ref, but can actually be a cell ref, in
+ which case it Is interpreted as a 1x1 area ref. Other scalar values cause #VALUE! error.
+
+
+ Resolves the last (optional) parameter (range_lookup) to the VLOOKUP and HLOOKUP functions.
+ @param rangeLookupArg
+ @param srcCellRow
+ @param srcCellCol
+ @return
+ @throws EvaluationException
+
+
+ Finds first (lowest index) exact occurrence of specified value.
+ @param lookupComparer the value to be found in column or row vector
+ @param vector the values to be searched. For VLOOKUP this Is the first column of the
+ tableArray. For HLOOKUP this Is the first row of the tableArray.
+ @return zero based index into the vector, -1 if value cannot be found
+
+
+ Excel has funny behaviour when the some elements in the search vector are the wrong type.
+
+
+
+ Excel seems to handle mismatched types initially by just stepping 'mid' ix forward to the
+ first compatible value.
+ @param midIx 'mid' index (value which has the wrong type)
+ @return usually -1, signifying that the BinarySearchIndex has been narrowed to the new mid
+ index. Zero or greater signifies that an exact match for the lookup value was found
+
+
+ Once the binary search has found a single match, (V/H)LOOKUP steps one by one over subsequent
+ values to choose the last matching item.
+
+
+ Enumeration to support 4 valued comparison results.
+ Excel lookup functions have complex behaviour in the case where the lookup array has mixed
+ types, and/or Is Unordered. Contrary to suggestions in some Excel documentation, there
+ does not appear to be a Universal ordering across types. The binary search algorithm used
+ Changes behaviour when the Evaluated 'mid' value has a different type to the lookup value.
+
+ A simple int might have done the same job, but there Is risk in confusion with the well
+ known Comparable.CompareTo() and Comparator.Compare() which both use
+ a ubiquitous 3 value result encoding.
+
+
+ Encapsulates some standard binary search functionality so the Unusual Excel behaviour can
+ be clearly distinguished.
+
+
+ @return -1 if the search range Is empty
+
+
+ Represents a single row or column within an AreaEval.
+
+
+ @return one of 4 instances or CompareResult: LESS_THAN, EQUAL,
+ GREATER_THAN or TYPE_MISMATCH
+
+
+ used only for debug purposes
+
+
+ Implementation for the MATCH() Excel function.
+
+ Syntax:
+ MATCH(lookup_value, lookup_array, match_type)
+
+ Returns a 1-based index specifying at what position in the lookup_array the specified
+ lookup_value Is found.
+
+ Specific matching behaviour can be modified with the optional match_type parameter.
+
+
+
Value
Matching Behaviour
+
1
(default) Find the largest value that Is less than or equal to lookup_value.
+ The lookup_array must be in ascending order*.
+
0
Find the first value that Is exactly equal to lookup_value.
+ The lookup_array can be in any order.
+
-1
Find the smallest value that Is greater than or equal to lookup_value.
+ The lookup_array must be in descending order*.
+
+
+ * Note regarding order - For the match_type cases that require the lookup_array to
+ be ordered, MATCH() can produce incorrect results if this requirement Is not met. Observed
+ behaviour in Excel Is to return the lowest index value for which every item after that index
+ breaks the match rule.
+ The (ascending) sort order expected by MATCH() Is:
+ numbers (low to high), strings (A to Z), bool (FALSE to TRUE)
+ MATCH() ignores all elements in the lookup_array with a different type to the lookup_value.
+ Type conversion of the lookup_array elements Is never performed.
+
+
+ @author Josh Micich
+
+
+ @return zero based index
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ This class Is an extension to the standard math library
+ provided by java.lang.Math class. It follows the Math class
+ in that it has a private constructor and all static methods.
+
+
+ Returns a value rounded to p digits after decimal.
+ If p Is negative, then the number Is rounded to
+ places to the left of the decimal point. eg.
+ 10.23 rounded to -1 will give: 10. If p Is zero,
+ the returned value Is rounded to the nearest integral
+ value.
+ If n Is negative, the resulting value Is obtained
+ as the round value of absolute value of n multiplied
+ by the sign value of n (@see MathX.sign(double d)).
+ Thus, -0.6666666 rounded to p=0 will give -1 not 0.
+ If n Is NaN, returned value Is NaN.
+ @param n
+ @param p
+
+
+ Returns a value rounded-up to p digits after decimal.
+ If p Is negative, then the number Is rounded to
+ places to the left of the decimal point. eg.
+ 10.23 rounded to -1 will give: 20. If p Is zero,
+ the returned value Is rounded to the nearest integral
+ value.
+ If n Is negative, the resulting value Is obtained
+ as the round-up value of absolute value of n multiplied
+ by the sign value of n (@see MathX.sign(double d)).
+ Thus, -0.2 rounded-up to p=0 will give -1 not 0.
+ If n Is NaN, returned value Is NaN.
+ @param n
+ @param p
+
+
+ Returns a value rounded to p digits after decimal.
+ If p Is negative, then the number Is rounded to
+ places to the left of the decimal point. eg.
+ 10.23 rounded to -1 will give: 10. If p Is zero,
+ the returned value Is rounded to the nearest integral
+ value.
+ If n Is negative, the resulting value Is obtained
+ as the round-up value of absolute value of n multiplied
+ by the sign value of n (@see MathX.sign(double d)).
+ Thus, -0.8 rounded-down to p=0 will give 0 not -1.
+ If n Is NaN, returned value Is NaN.
+ @param n
+ @param p
+
+
+ average of all values
+ @param values
+
+
+ sum of all values
+ @param values
+
+
+ sum of squares of all values
+ @param values
+
+
+ product of all values
+ @param values
+
+
+ min of all values. If supplied array Is zero Length,
+ double.POSITIVE_INFINITY Is returned.
+ @param values
+
+
+ min of all values. If supplied array Is zero Length,
+ double.NEGATIVE_INFINITY Is returned.
+ @param values
+
+
+ Note: this function Is different from java.lang.Math.floor(..).
+
+ When n and s are "valid" arguments, the returned value Is: Math.floor(n/s) * s;
+
+ n and s are invalid if any of following conditions are true:
+
+
s Is zero
+
n Is negative and s Is positive
+
n Is positive and s Is negative
+
+ In all such cases, double.NaN Is returned.
+ @param n
+ @param s
+
+
+ Note: this function Is different from java.lang.Math.ceil(..).
+
+ When n and s are "valid" arguments, the returned value Is: Math.ceiling(n/s) * s;
+
+ n and s are invalid if any of following conditions are true:
+
+
s Is zero
+
n Is negative and s Is positive
+
n Is positive and s Is negative
+
+ In all such cases, double.NaN Is returned.
+ @param n
+ @param s
+
+
+ for all n >= 1; factorial n = n * (n-1) * (n-2) * ... * 1
+ else if n == 0; factorial n = 1
+ else if n < 0; factorial n = double.NaN
+ Loss of precision can occur if n Is large enough.
+ If n Is large so that the resulting value would be greater
+ than double.MAX_VALUE; double.POSITIVE_INFINITY Is returned.
+ If n < 0, double.NaN Is returned.
+ @param n
+
+
+ returns the remainder resulting from operation:
+ n / d.
+ The result has the sign of the divisor.
+ Examples:
+
+
mod(3.4, 2) = 1.4
+
mod(-3.4, 2) = 0.6
+
mod(-3.4, -2) = -1.4
+
mod(3.4, -2) = -0.6
+
+ If d == 0, result Is NaN
+ @param n
+ @param d
+
+
+ inverse hyperbolic cosine
+ @param d
+
+
+ inverse hyperbolic sine
+ @param d
+
+
+ inverse hyperbolic tangent
+ @param d
+
+
+ hyperbolic cosine
+ @param d
+
+
+ hyperbolic sine
+ @param d
+
+
+ hyperbolic tangent
+ @param d
+
+
+ returns the sum of product of corresponding double value in each
+ subarray. It Is the responsibility of the caller to Ensure that
+ all the subarrays are of equal Length. If the subarrays are
+ not of equal Length, the return value can be Unpredictable.
+ @param arrays
+
+
+ returns the sum of difference of squares of corresponding double
+ value in each subarray: ie. sigma (xarr[i]^2-yarr[i]^2)
+
+ It Is the responsibility of the caller
+ to Ensure that the two subarrays are of equal Length. If the
+ subarrays are not of equal Length, the return value can be
+ Unpredictable.
+ @param xarr
+ @param yarr
+
+
+ returns the sum of sum of squares of corresponding double
+ value in each subarray: ie. sigma (xarr[i]^2 + yarr[i]^2)
+
+ It Is the responsibility of the caller
+ to Ensure that the two subarrays are of equal Length. If the
+ subarrays are not of equal Length, the return value can be
+ Unpredictable.
+ @param xarr
+ @param yarr
+
+
+ returns the sum of squares of difference of corresponding double
+ value in each subarray: ie. sigma ( (xarr[i]-yarr[i])^2 )
+
+ It Is the responsibility of the caller
+ to Ensure that the two subarrays are of equal Length. If the
+ subarrays are not of equal Length, the return value can be
+ Unpredictable.
+ @param xarr
+ @param yarr
+
+
+ returns the total number of combinations possible when
+ k items are chosen out of total of n items. If the number
+ Is too large, loss of precision may occur (since returned
+ value Is double). If the returned value Is larger than
+ double.MAX_VALUE, double.POSITIVE_INFINITY Is returned.
+ If either of the parameters Is negative, double.NaN Is returned.
+ @param n
+ @param k
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ if v is zero length or contains no duplicates, return value is
+ Double.NaN. Else returns the value that occurs most times and if there is
+ a tie, returns the first such value.
+
+ @param v
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ This Is the base class for all excel function evaluator
+ classes that take variable number of operands, and
+ where the order of operands does not matter
+
+
+ Maximum number of operands accepted by this function.
+ Subclasses may override to Change default value.
+
+
+ Whether to count nested subtotals.
+
+
+ Collects values from a single argument
+
+
+ Returns a double array that contains values for the numeric cells
+ from among the list of operands. Blanks and Blank equivalent cells
+ are ignored. Error operands or cells containing operands of type
+ that are considered invalid and would result in #VALUE! error in
+ excel cause this function to return null.
+
+ @return never null
+
+
+ Ensures that a two dimensional array has all sub-arrays present and the same Length
+ @return false if any sub-array Is missing, or Is of different Length
+
+
+ Implementation of Excel function NA()
+
+ @author Josh Micich
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ This Is the default implementation of a Function class.
+ The default behaviour Is to return a non-standard ErrorEval
+ "ErrorEval.FUNCTION_NOT_IMPLEMENTED". This error should alert
+ the user that the formula contained a function that Is not
+ yet implemented.
+
+
+ Implementation of Excel NOW() Function
+
+ @author Frank Taffelt
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ Support for hyperbolic trig functions was Added as a part of
+ Java distribution only in JDK1.5. This class uses custom
+ naive implementation based on formulas at:
+ http://www.math2.org/math/trig/hyperbolics.htm
+ These formulas seem to agree with excel's implementation.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ Support for hyperbolic trig functions was Added as a part of
+ Java distribution only in JDK1.5. This class uses custom
+ naive implementation based on formulas at:
+ http://www.math2.org/math/trig/hyperbolics.htm
+ These formulas seem to agree with excel's implementation.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ Support for hyperbolic trig functions was Added as a part of
+ Java distribution only in JDK1.5. This class uses custom
+ naive implementation based on formulas at:
+ http://www.math2.org/math/trig/hyperbolics.htm
+ These formulas seem to agree with excel's implementation.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ Log: LOG(number,[base])
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at yahoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ This checks is x = 0 and the mean = 0.
+ Excel currently returns the value 1 where as the
+ maths common implementation will error.
+ @param x The number.
+ @param mean The mean.
+ @return If a default value should be returned.
+
+
+ All long-representable factorials
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation for Excel function OFFSet()
+
+ OFFSet returns an area reference that Is a specified number of rows and columns from a
+ reference cell or area.
+
+ Syntax:
+ OFFSet(reference, rows, cols, height, width)
+ reference Is the base reference.
+ rows Is the number of rows up or down from the base reference.
+ cols Is the number of columns left or right from the base reference.
+ height (default same height as base reference) Is the row Count for the returned area reference.
+ width (default same width as base reference) Is the column Count for the returned area reference.
+
+ @author Josh Micich
+
+
+ Exceptions are used within this class to help simplify flow control when error conditions
+ are enCountered
+
+
+ A one dimensional base + offset. Represents either a row range or a column range.
+ Two instances of this class toGether specify an area range.
+
+
+ Moves the range by the specified translation amount.
+
+ This method also 'normalises' the range: Excel specifies that the width and height
+ parameters (Length field here) cannot be negative. However, OFFSet() does produce
+ sensible results in these cases. That behavior Is replicated here.
+
+ @param translationAmount may be zero negative or positive
+
+ @return the equivalent LinearOffsetRange with a positive Length, moved by the
+ specified translationAmount.
+
+
+ Encapsulates either an area or cell reference which may be 2d or 3d.
+
+
+ OFFSet's numeric arguments (2..5) have similar Processing rules
+
+
+ Fractional values are silently truncated by Excel.
+ Truncation Is toward negative infinity.
+
+
+ Implementation for the PMT() Excel function.
+
+ Syntax:
+ PMT(rate, nper, pv, fv, type)
+
+ Returns the constant repayment amount required for a loan assuming a constant interest rate.
+
+ rate the loan interest rate.
+ nper the number of loan repayments.
+ pv the present value of the future payments (or principle).
+ fv the future value (default zero) surplus cash at the end of the loan lifetime.
+ type whether payments are due at the beginning(1) or end(0 - default) of each payment period.
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation for Excel ROWS function.
+
+ @author Josh Micich
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+ Library for common statistics functions
+
+
+ returns the mean of deviations from mean.
+ @param v
+
+
+ if v Is zero Length or Contains no duplicates, return value
+ Is double.NaN. Else returns the value that occurs most times
+ and if there Is a tie, returns the first such value.
+ @param v
+
+
+ Implementation for the Excel function SUBTOTAL
(1-11) Selects the underlying aggregate function to be used (see table below)
+
ref1, ref2 ...
Arguments to be passed to the underlying aggregate function
+
+
+
+
+
functionCode
Aggregate Function
+
1
AVERAGE
+
2
COUNT
+
3
COUNTA
+
4
MAX
+
5
MIN
+
6
PRODUCT
+
7
STDEV
+
8
STDEVP *
+
9
SUM
+
10
VAR *
+
11
VARP *
+
101-111
*
+
+ * Not implemented in POI yet. Functions 101-111 are the same as functions 1-11 but with
+ the option 'ignore hidden values'.
+
+
+ @author Paul Tomlin < pault at bulk sms dot com >
+
+
+ Implementation for the Excel function SUMIF
The range over which criteria is applied. Also used for addend values when the third parameter is not present
+
criteria
The value or expression used to filter rows from range
+
sum_range
Locates the top-left corner of the corresponding range of addends - values to be added (after being selected by the criteria)
+
+
+ @author Josh Micich
+
+
+ @return a range of the same dimensions as aeRange using eval to define the top left corner.
+ @throws EvaluationException if eval is not a reference
+
+
+ Determines a double value for the specified ValueEval.
+ @param IsScalarProduct false for SUMPRODUCTs over area refs.
+ @throws EvalEx if ve represents an error value.
+
+ Note - string values and empty cells are interpreted differently depending on
+ isScalarProduct. For scalar products, if any term Is blank or a string, the
+ error (#VALUE!) Is raised. For area (sum)products, if any term Is blank or a string, the
+ result Is zero.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+
+ An implementation of the MID function
+ MID returns a specific number of
+ Chars from a text string, starting at the specified position.
+ @author Manda Wilson < wilson at c bio dot msk cc dot org;
+
+
+
+ An implementation of the Replace function:
+ Replaces part of a text string based on the number of Chars
+ you specify, with another text string.
+ @author Manda Wilson < wilson at c bio dot msk cc dot org >
+
+
+ Replaces part of a text string based on the number of Chars
+ you specify, with another text string.
+
+ @see org.apache.poi.hssf.record.formula.eval.Eval
+
+
+ An implementation of the SUBSTITUTE function:
+ Substitutes text in a text string with new text, some number of times.
+ @author Manda Wilson < wilson at c bio dot msk cc dot org >
+
+
+ Substitutes text in a text string with new text, some number of times.
+
+ @see org.apache.poi.hssf.record.formula.eval.Eval
+
+
+ An implementation of the TEXT function
+ TEXT returns a number value formatted with the given number formatting string.
+ This function is not a complete implementation of the Excel function, but
+ handles most of the common cases. All work is passed down to
+ {@link DataFormatter} to be done, as this works much the same as the
+ display focused work that that does.
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+ @author Manda Wilson < wilson at c bio dot msk cc dot org >
+
+ An implementation of the TRIM function:
+
+ Removes leading and trailing spaces from value if evaluated operand value is string.
+
+
+
+
+
+ An implementation of the MID function
+
+ MID returns a specific number of
+ characters from a text string, starting at the specified position.
+
+ Syntax: MID(text, start_num, num_chars)
+
+
+
+ @author Torstein Tauno Svendsen (torstei@officenet.no)
+
+ Implementation of the FIND() function.
+
+ Syntax: FIND(Find_text, within_text, start_num)
+
+ FIND returns the character position of the first (case sensitive) occurrence of
+ Find_text inside within_text. The third parameter,
+ start_num, is optional (default=1) and specifies where to start searching
+ from. Character positions are 1-based.
+
+
+
+
+ Implementation of the FIND() function. SEARCH is a case-insensitive version of FIND()
+
+ Syntax: SEARCH(Find_text, within_text, start_num)
+
+
+
+
+ An implementation of the TRIM function:
+ Removes leading and trailing spaces from value if Evaluated operand
+ value Is string.
+ @author Manda Wilson < wilson at c bio dot msk cc dot org >
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Implementation for the Excel function TIME
+
+ @author Steven Butler (sebutler @ gmail dot com)
+
+ Based on POI {@link DateFunc}
+
+
+ Converts the supplied hours, minutes and seconds to an Excel time value.
+
+
+ @param ds array of 3 doubles Containing hours, minutes and seconds.
+ Non-integer inputs are tRuncated to an integer before further calculation
+ of the time value.
+ @return An Excel representation of a time of day.
+ If the time value represents more than a day, the days are Removed from
+ the result, leaving only the time of day component.
+ @throws NPOI.SS.Formula.Eval.EvaluationException
+ If any of the arguments are greater than 32767 or the hours
+ minutes and seconds when combined form a time value less than 0, the function
+ Evaluates to an error.
+
+
+ "1,0000" is valid, "1,00" is not
+
+
+ TODO see if the same functionality is needed in {@link OperandResolver#parseDouble(String)}
+
+ @return null if there is any problem converting the text
+
+
+ Convenience base class for any function which must take two or three
+ arguments
+
+ @author Josh Micich
+
+
+ Convenience base class for any function which must take two or three
+ arguments
+
+ @author Josh Micich
+
+
+ Convenience base class for any function which must take three or four
+ arguments
+
+ @author Josh Micich
+
+
+ Implementation of the VLOOKUP() function.
+
+ VLOOKUP Finds a row in a lookup table by the first column value and returns the value from another column.
+
+ Syntax:
+ VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
+
+ lookup_value The value to be found in the first column of the table array.
+ table_array An area reference for the lookup data.
+ col_index_num a 1 based index specifying which column value of the lookup data will be returned.
+ range_lookup If TRUE (default), VLOOKUP Finds the largest value less than or equal to
+ the lookup_value. If FALSE, only exact Matches will be considered
+
+ @author Josh Micich
+
+
+ Returns one column from an AreaEval
+
+ @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high
+
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+
+ Constructs a new instance of the Accumulator used to calculated this function
+
+
+
Title: XSSF Area 3D Reference (Sheet + Area)
+
Description: Defined an area in an external or different sheet.
+
REFERENCE:
+
+
This is XSSF only, as it stores the sheet / book references
+ in String form. The HSSF equivalent using indexes is {@link Area3DPtg}
+
+
+ An XSSF only representation of a reference to a deleted area
+
+
+ A Name, be that a Named Range or a Function / User Defined
+ Function, Addressed in the HSSF External Sheet style.
+
+
This is XSSF only, as it stores the sheet / book references
+ in String form. The HSSF equivalent using indexes is {@link NameXPtg}
+
+
+ An XSSF only special kind of Ptg, which stores the sheet / book
+ reference in string form.
+
+
+ An XSSF only special kind of Ptg, which stores a range of
+ sheet / book references in string form.
+
+
+
Title: XSSF 3D Reference
+
Description: Defines a cell in an external or different sheet.
+
REFERENCE:
+
+
This is XSSF only, as it stores the sheet / book references
+ in String form. The HSSF equivalent using indexes is {@link Ref3DPtg}
+
+
+ Encapsulates logic to convert shared formulaa into non shared equivalent
+
+
+ Creates a non shared formula from the shared formula counterpart, i.e.
+ Converts the shared formula into the equivalent {@link org.apache.poi.ss.formula.ptg.Ptg} array that it would have,
+ were it not shared.
+
+ @param ptgs parsed tokens of the shared formula
+ @param formulaRow
+ @param formulaColumn
+
+
+ This class provides the base functionality for Excel sheet functions
+ There are two kinds of function Ptgs - tFunc and tFuncVar
+ Therefore, this class will have ONLY two subclasses
+ @author Avik Sengupta
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+ The name of the IF function (i.e. "IF"). Extracted as a constant for clarity.
+
+
+ All external functions have function index 255
+
+
+ external functions Get some special Processing
+ @return true if this is an external function
+
+
+ Used to detect whether a function name found in a formula is one of the standard excel functions
+
+ The name matching is case insensitive.
+ @return true if the name specifies a standard worksheet function,
+ false if the name should be assumed to be an external function.
+
+
+ Resolves internal function names into function indexes.
+
+ The name matching is case insensitive.
+ @return the standard worksheet function index if found, otherwise FUNCTION_INDEX_EXTERNAL
+
+
+ Addition operator PTG the "+" binomial operator. If you need more
+ explanation than that then well...We really can't help you here.
+ @author Andrew C. Oliver (acoliver@apache.org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ implementation of method from OperationsPtg
+
+
+ Common superclass of 2-D area refs
+
+
+
Title: Area 3D Ptg - 3D reference (Sheet + Area)
+
Description: Defined an area in Extern Sheet.
+
REFERENCE:
+
+ This is HSSF only, as it matches the HSSF file format way of
+ referring to the sheet by an extern index. The XSSF equivalent
+ is {@link Area3DPxg}
+
+
+ @return text representation of this area reference that can be used in text
+ formulas. The sheet name will get properly delimited if required.
+
+
+ AreaErr - handles deleted cell area references.
+
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ Common interface for AreaPtg and Area3DPtg, and their
+ child classes.
+
+
+ @return the first row in the area
+
+
+ @return last row in the range (x2 in x1,y1-x2,y2)
+
+
+ @return the first column number in the area.
+
+
+ @return lastcolumn in the area
+
+
+ Specifies a rectangular area of cells A1:A4 for instance.
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Specifies a rectangular area of cells A1:A4 for instance.
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Specifies a rectangular area of cells A1:A4 for instance.
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ TODO - (May-2008) fix subclasses of AreaPtg 'AreaN~' which are used in shared formulas.
+ see similar comment in ReferencePtg
+
+
+ zero based, Unsigned 16 bit
+
+
+ zero based, Unsigned 16 bit
+
+
+ zero based, Unsigned 8 bit
+
+
+ zero based, Unsigned 8 bit
+
+
+ @return the first row in the area
+
+
+ @return last row in the range (x2 in x1,y1-x2,y2)
+
+
+ @return the first column number in the area.
+
+
+ @return whether or not the first row is a relative reference or not.
+
+
+ @return Isrelative first column to relative or not
+
+
+ @return lastcolumn in the area
+
+
+ @return last column and bitmask (the raw field)
+
+
+ @return last row relative or not
+
+
+ @return lastcol relative or not
+
+
+ Set the last column irrespective of the bitmasks
+
+
+ ArrayPtg - handles arrays
+
+ The ArrayPtg is a little weird, the size of the Ptg when parsing initially only
+ includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows.
+ It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually
+ held after this. So Ptg.CreateParsedExpression keeps track of the number of
+ ArrayPtg elements and need to Parse the data upto the FORMULA record size.
+
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ The size of the plain tArray token written within the standard formula tokens
+ (not including the data which comes after all formula tokens)
+
+
+ @param values2d array values arranged in rows
+
+
+ Note - (2D) array elements are stored column by column
+ @return the index into the internal 1D array for the specified column and row
+
+
+ This size includes the size of the array Ptg plus the Array Ptg Token value size
+
+
+ Represents the initial plain tArray token (without the constant data that trails the whole
+ formula). Objects of this class are only temporary and cannot be used as {@link Ptg}s.
+ These temporary objects get converted to {@link ArrayPtg} by the
+ {@link #finishReading(LittleEndianInput)} method.
+
+
+ Read in the actual token (array) values. This occurs
+ AFTER the last Ptg in the expression.
+ See page 304-305 of Excel97-2007BinaryFileFormat(xls)Specification.pdf
+
+
+ "Special Attributes"
+ This seems to be a Misc Stuff and Junk record. One function it serves Is
+ in SUM functions (i.e. SUM(A1:A3) causes an area PTG then an ATTR with the SUM option Set)
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ only used for tAttrChoose: table of offsets to starts of args
+
+
+ only used for tAttrChoose: offset to the tFuncVar for CHOOSE()
+
+
+ 00H = Spaces before the next token (not allowed before tParen token)
+
+
+ 01H = Carriage returns before the next token (not allowed before tParen token)
+
+
+ 02H = Spaces before opening parenthesis (only allowed before tParen token)
+
+
+ 03H = Carriage returns before opening parenthesis (only allowed before tParen token)
+
+
+ 04H = Spaces before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens)
+
+
+ 05H = Carriage returns before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens)
+
+
+ 06H = Spaces following the equality sign (only in macro sheets)
+
+
+
+ Creates the space.
+
+ a constant from SpaceType
+ The count.
+
+
+
+ Creates if.
+
+ distance (in bytes) to start of either
+ tFuncVar(IF) token (when false parameter is not present).
+
+
+
+ Creates the skip.
+
+ distance (in bytes) to position behind tFuncVar(IF) token (minus 1).
+
+
+ bool (bool)
+ Stores a (java) bool value in a formula.
+ @author Paul Krause (pkrause at soundbite dot com)
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Common baseclass for
+ tExp
+ tTbl
+ tParen
+ tNlr
+ tAttr
+ tSheet
+ tEndSheet
+
+
+ Title: Deleted Area 3D Ptg - 3D referecnce (Sheet + Area)
+ Description: Defined a area in Extern Sheet.
+ REFERENCE:
+ @author Patrick Luby
+ @version 1.0-pre
+
+
+ Title: Deleted Reference 3D Ptg
+ Description: Defined a cell in extern sheet.
+ REFERENCE:
+ @author Patrick Luby
+ @version 1.0-pre
+
+
+ Creates new DeletedRef3DPtg
+
+
+ This PTG implements the standard binomial divide "/"
+ @author Andrew C. Oliver acoliver at apache dot org
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+
+ @author andy
+
+
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ #NULL! - Intersection of two cell ranges is empty
+
+
+ #DIV/0! - Division by zero
+
+
+ #VALUE! - Wrong type of operand
+
+
+ #REF! - Illegal or deleted cell reference
+
+
+ #NAME? - Wrong function or range name
+
+
+ #NUM! - Value range overflow
+
+
+ #N/A - Argument or function not available
+
+
+ Creates new ErrPtg
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author dmui (save existing implementation)
+
+
+ @author aviks
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author Danny Mui (dmui at apache dot org) (Leftover handling)
+
+
+
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Single instance of this token for 'sum() taking a single argument'
+
+
+ Creates new function pointer from a byte array
+ usually called while reading an excel file.
+
+
+ Create a function ptg from a string tokenised by the parser
+
+
+ PTG class to implement greater or equal to
+
+ @author fred at stsci dot edu
+
+
+ Greater than operator PTG ">"
+ @author Cameron Riley (criley at ekmail.com)
+
+
+ Get the number of operands for the Less than operator
+ @return int the number of operands
+
+
+ Implementation of method from OperationsPtg
+ @param operands a String array of operands
+ @return String the Formula as a String
+
+
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ Implementation of method from Ptg
+
+
+ implementation of method from OperationsPtg
+
+
+ Integer (unsigned short integer)
+ Stores an Unsigned short value (java int) in a formula
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Excel represents integers 0..65535 with the tInt token.
+ @return true if the specified value is within the range of values
+ IntPtg can represent.
+
+
+ Ptg class to implement less than or equal
+
+ @author fred at stsci dot edu
+
+
+ Less than operator PTG "<". The SID is taken from the
+ Openoffice.orgs Documentation of the Excel File Format,
+ Table 3.5.7
+ @author Cameron Riley (criley at ekmail.com)
+
+
+ the sid for the less than operator as hex
+
+
+ identifier for LESS THAN char
+
+
+ Get the number of operands for the Less than operator
+ @return int the number of operands
+
+
+ Implementation of method from OperationsPtg
+ @param operands a String array of operands
+ @return String the Formula as a String
+
+
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ Creates new MemAreaPtg
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ Creates new MemErrPtg
+
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ Creates new function pointer from a byte array
+ usually called while Reading an excel file.
+
+
+ Missing Function Arguments
+
+ Avik Sengupta <avik at apache.org>
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Implements the standard mathmatical multiplication - *
+ @author Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ one-based index to defined name record
+
+
+ @param nameIndex zero-based index to name within workbook
+
+
+ Creates new NamePtg
+
+
+ @return zero based index to a defined name record in the LinkTable
+
+
+ A Name, be that a Named Range or a Function / User Defined
+ Function, addressed in the HSSF External Sheet style.
+
+ This is HSSF only, as it matches the HSSF file format way of
+ referring to the sheet by an extern index. The XSSF equivalent
+ is {@link NameXPxg}
+
+
+ index to REF entry in externsheet record
+
+
+ index to defined name or externname table(1 based)
+
+
+ reserved must be 0
+
+
+ @param sheetRefIndex index to REF entry in externsheet record
+ @param nameIndex index to defined name or externname table
+
+
+ Ptg class to implement not equal
+
+ @author fred at stsci dot edu
+
+
+ Number
+ Stores a floating point value in a formula
+ value stored in a 8 byte field using IEEE notation
+ @author Avik Sengupta
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Create a NumberPtg from a byte array Read from disk
+
+
+ Create a NumberPtg from a string representation of the number
+ Number format is not checked, it is expected to be validated in the parser
+ that calls this method.
+ @param value : String representation of a floating point number
+
+
+ @author Josh Micich
+
+
+ All Operand Ptgs are classifed ('relative', 'value', 'array')
+
+
+ defines a Ptg that is an operation instead of an operand
+ @author andy
+
+
+ returns a string representation of the operations
+ the Length of the input array should equal the number returned by
+ @see #GetNumberOfOperands
+
+
+
+ The number of operands expected by the operations
+
+
+ While formula tokens are stored in RPN order and thus do not need parenthesis for
+ precedence reasons, Parenthesis tokens ARE written to Ensure that user entered
+ parenthesis are Displayed as-is on Reading back
+
+ Avik Sengupta <lists@aviksengupta.com>
+ Andrew C. Oliver (acoliver at apache dot org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Percent PTG.
+
+ @author Daniel Noll (daniel at nuix.com.au)
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Ptg represents a syntactic token in a formula. 'PTG' is an acronym for
+ 'parse thing'. Originally, the name referred to the single
+ byte identifier at the start of the token, but in POI, Ptg encapsulates
+ the whole formula token (initial byte + value data).
+
+
+ Ptgs are logically arranged in a tree representing the structure of the
+ Parsed formula. However, in BIFF files Ptgs are written/Read in
+ Reverse-Polish Notation order. The RPN ordering also simplifies formula
+ evaluation logic, so POI mostly accesses Ptgs in the same way.
+
+ @author andy
+ @author avik
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Reads size bytes of the input stream, to Create an array of Ptgs.
+ Extra data (beyond size) may be Read if and ArrayPtgs are present.
+
+
+ @return a distinct copy of this Ptg if the class is mutable, or the same instance
+ if the class is immutable.
+
+
+ This method will return the same result as {@link #getEncodedSizeWithoutArrayData(Ptg[])}
+ if there are no array tokens present.
+ @return the full size taken to encode the specified Ptgs
+
+
+ Used to calculate value that should be encoded at the start of the encoded Ptg token array;
+ @return the size of the encoded Ptg tokens not including any trailing array data.
+
+
+ Writes the ptgs to the data buffer, starting at the specified offset.
+
+
+ The 2 byte encode Length field is not written by this method.
+ @return number of bytes written
+
+
+ @return the encoded Length of this Ptg, including the initial Ptg type identifier byte.
+
+
+ @return false if this token is classified as 'reference', 'value', or 'array'
+
+
+ Write this Ptg to a byte array
+
+
+ return a string representation of this token alone
+
+
+ Overridden toString method to Ensure object hash is not printed.
+ This helps Get rid of gratuitous diffs when comparing two dumps
+ Subclasses may output more relevant information by overriding this method
+
+
+
+ @return the 'operand class' (REF/VALUE/ARRAY) for this Ptg
+
+
+ Debug / diagnostic method to get this token's 'operand class' type.
+ @return 'R' for 'reference', 'V' for 'value', 'A' for 'array' and '.' for base tokens
+
+
+ @author Daniel Noll (daniel at nuix dot com dot au)
+
+
+ implementation of method from OperationsPtg
+
+
+ @author Josh Micich
+
+
+ Takes in a String representation of a cell reference and fills out the
+ numeric fields.
+
+
+ Title: Reference 3D Ptg
+ Description: Defined a cell in extern sheet.
+ REFERENCE:
+ @author Libin Roman (Vista Portal LDT. Developer)
+ @author Jason Height (jheight at chariot dot net dot au)
+ @version 1.0-pre
+
+
+ Field 2
+ - lower 8 bits is the zero based Unsigned byte column index
+ - bit 16 - IsRowRelative
+ - bit 15 - IsColumnRelative
+
+
+ Creates new AreaPtg
+
+
+ @return text representation of this cell reference that can be used in text
+ formulas. The sheet name will Get properly delimited if required.
+
+
+ RefError - handles deleted cell reference
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ RefNPtg
+ @author Jason Height (jheight at apache dot com)
+
+
+ Creates new ValueReferencePtg
+
+
+ ReferencePtg - handles references (such as A1, A2, IA4)
+ @author Andrew C. Oliver (acoliver@apache.org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Takes in a String representation of a cell reference and Fills out the
+ numeric fields.
+
+
+ ReferencePtgBase - handles references (such as A1, A2, IA4)
+ @author Andrew C. Oliver (acoliver@apache.org)
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ The row index - zero based Unsigned 16 bit value
+
+
+ Field 2
+ - lower 8 bits is the zero based Unsigned byte column index
+ - bit 16 - IsRowRelative
+ - bit 15 - IsColumnRelative
+
+
+ Takes in a String representation of a cell reference and Fills out the
+ numeric fields.
+
+
+ Returns the row number as a short, which will be
+ wrapped (negative) for values between 32769 and 65535
+
+
+ Returns the row number as an int, between 0 and 65535
+
+
+ @author Josh Micich
+
+
+ String Stores a String value in a formula value stored in the format
+ <Length 2 bytes>char[]
+
+ @author Werner Froidevaux
+ @author Jason Height (jheight at chariot dot net dot au)
+ @author Bernard Chesnoy
+
+
+ the Char (")used in formulas to delimit string literals
+
+
+ NOTE: OO doc says 16bit Length, but BiffViewer says 8 Book says something
+ totally different, so don't look there!
+
+
+ Create a StringPtg from a stream
+
+
+ Create a StringPtg from a string representation of the number Number
+ format Is not Checked, it Is expected to be Validated in the Parser that
+ calls this method.
+
+ @param value :
+ String representation of a floating point number
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ This ptg indicates a data table.
+ It only occurs in a FORMULA record, never in an
+ ARRAY or NAME record. When ptgTbl occurs in a
+ formula, it is the only token in the formula.
+
+ This indicates that the cell containing the
+ formula is an interior cell in a data table;
+ the table description is found in a TABLE
+ record. Rows and columns which contain input
+ values to be substituted in the table do
+ not contain ptgTbl.
+ See page 811 of the june 08 binary docs.
+
+
+ The row number of the upper left corner
+
+
+ The column number of the upper left corner
+
+
+ Unary Plus operator
+ does not have any effect on the operand
+ @author Avik Sengupta
+
+
+ implementation of method from OperationsPtg
+
+
+ Unary Plus operator
+ does not have any effect on the operand
+ @author Avik Sengupta
+
+
+ implementation of method from OperationsPtg
+
+
+ @author Glen Stampoultzis (glens at apache.org)
+
+
+ implementation of method from OperationsPtg
+
+
+
+ @author andy
+ @author Jason Height (jheight at chariot dot net dot au)
+
+
+ Creates new UnknownPtg
+
+
+ Common baseclass of all value operators.
+ Subclasses include all Unary and binary operators except for the reference operators (IntersectionPtg, RangePtg, UnionPtg)
+
+ @author Josh Micich
+
+
+ All Operator Ptgs are base tokens (i.e. are not RVA classified)
+
+
+ Evaluator for returning cells or sheets for a range of sheets
+
+
+ Optional Extension to the likes of {@link AreaEval} and
+ {@link NPOI.SS.Formula.Eval.AreaEvalBase},
+ which allows for looking up 3D (sheet+row+column) Evaluations
+
+
+ @param sheetIndex sheet index (zero based)
+ @param rowIndex relative row index (zero based)
+ @param columnIndex relative column index (zero based)
+ @return element at the specified row and column position
+
+
+ Common interface of {@link AreaEval} and {@link org.apache.poi.ss.formula.eval.AreaEvalBase},
+ for 2D (row+column) evaluations
+
+
+ @param rowIndex relative row index (zero based)
+ @param columnIndex relative column index (zero based)
+ @return element at the specified row and column position
+
+
+ @return true if the area has just a single row, this also includes
+ the trivial case when the area has just a single cell.
+
+
+ @return true if the area has just a single column, this also includes
+ the trivial case when the area has just a single cell.
+
+
+ @param rowIndex relative row index (zero based)
+ @return a single row {@link TwoDEval}
+
+
+ @param columnIndex relative column index (zero based)
+ @return a single column {@link TwoDEval}
+
+
+ @return true if the cell at row and col is a subtotal
+
+
+ A UDFFinder that can retrieve functions both by name and by fake index.
+
+ @author Yegor Kozlov
+
+
+ Collects Add-in libraries and VB macro functions toGether into one UDF Finder
+
+ @author PUdalau
+
+
+
+ Returns executor by specified name.
+
+ Name of function.
+ Function executor. null if not found
+
+
+
+ Add a new toolpack
+
+
+
+
+ Default UDF Finder - for Adding your own user defined functions.
+
+ @author PUdalau
+
+
+ Common interface for "Add-in" libraries and user defined function libraries.
+
+ @author PUdalau
+
+
+ Returns executor by specified name. Returns null if the function name is unknown.
+
+ @param name Name of function.
+ @return Function executor.
+
+
+ Provides access to a {@link WorkbookEvaluator}, eg for use with
+ {@link CollaboratingWorkbooksEnvironment}
+
+ For POI internal use only
+
+
+ Provide the underlying WorkbookEvaluator
+
+
+ To support Constant Values (2.5.7) as required by the CRN record.
+ This class is also used for two dimensional arrays which are encoded by
+ EXTERNALNAME (5.39) records and Array tokens.
+
+ @author Josh Micich
+
+
+ @return encoded size without the 'type' code byte
+
+
+
+ Represents a constant error code value as encoded in a constant values array.
+ This class is a type-safe wrapper for a 16-bit int value performing a similar job to
+ ErrorEval
+
+ @author Josh Micich
+
+
+
+ Initializes a new instance of the class.
+
+ The error code.
+
+
+
+ Gets the error code.
+
+ The error code.
+
+
+
+ Gets the text.
+
+ The text.
+
+
+
+ Values the of.
+
+ The error code.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+ Stores the parameters that identify the evaluation of one cell.
+
+
+ Calls formulaCell.SetFormulaResult(null, null) recursively all the way up the tree of
+ dependencies. Calls usedCell.ClearConsumingCell(fc) for each child of a cell that Is
+ Cleared along the way.
+ @param formulaCells
+
+
+ Identical To {@link #RecurseClearCachedFormulaResults()} except for the listener call-backs
+
+
+ Stores details about the current evaluation of a cell.
+
+
+ @param inputCell a cell directly used by the formula of this evaluation frame
+
+
+ @return never null, (possibly empty) array of all cells directly used while
+ evaluating the formula of this frame.
+
+
+ Manages a collection of {@link WorkbookEvaluator}s, in order To support evaluation of formulas
+ across spreadsheets.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+
+
+
+ Performance optimisation for {@link HSSFFormulaEvaluator}. This class stores previously
+ calculated values of already visited cells, To avoid unnecessary re-calculation when the
+ same cells are referenced multiple times
+
+
+ @author Josh Micich
+
+
+ only used for testing. null otherwise
+
+
+ Should be called whenever there are Changes To input cells in the evaluated workbook.
+
+
+ Abstracts a cell for the purpose of formula evaluation. This interface represents both formula
+ and non-formula cells.
+
+ Implementors of this class must implement {@link #HashCode()} and {@link #Equals(Object)}
+ To provide an identity relationship based on the underlying HSSF or XSSF cell
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Abstracts a name record for formula evaluation.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Abstracts a sheet for the purpose of formula evaluation.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ @return null if there is no cell at the specified coordinates
+
+
+
+ Instances of this class keep track of multiple dependent cell evaluations due
+ To recursive calls To
+ The main purpose of this class is To detect an attempt To evaluate a cell
+ that is already being evaluated. In other words, it detects circular
+ references in spreadsheet formulas.
+
+
+ @author Josh Micich
+
+
+
+ Notifies this evaluation tracker that evaluation of the specified cell Is
+ about To start.
+
+ In the case of a true return code, the caller should
+ continue evaluation of the specified cell, and also be sure To call
+ endEvaluate() when complete.
+
+ In the case of a null return code, the caller should
+ return an evaluation result of
+ ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate().
+
+ @return false if the specified cell is already being evaluated
+
+
+ Notifies this evaluation tracker that the evaluation of the specified cell is complete.
+
+ Every successful call To startEvaluate must be followed by a call To endEvaluate (recommended in a finally block) To enable
+ proper tracking of which cells are being evaluated at any point in time.
+
+ Assuming a well behaved client, parameters To this method would not be
+ required. However, they have been included To assert correct behaviour,
+ and form more meaningful error messages.
+
+
+ Abstracts a workbook for the purpose of formula evaluation.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ @return -1 if the specified sheet is from a different book
+
+
+ HSSF Only - fetch the external-style sheet details
+
Return will have no workbook set if it's actually in our own workbook
+
+
+ XSSF Only - fetch the external-style sheet details
+
Return will have no workbook set if it's actually in our own workbook
+
+
+ HSSF Only - convert an external sheet index to an internal sheet index,
+ for an external-style reference to one of this workbook's own sheets
+
+
+ HSSF Only - fetch the external-style name details
+
+
+ XSSF Only - fetch the external-style name details
+
+
+ Should be implemented by any {@link Ptg} subclass that needs Has an extern sheet index
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Encapsulates an encoded formula token array.
+
+ @author Josh Micich
+
+
+ immutable
+
+
+ Convenience method for {@link #read(int, LittleEndianInput, int)}
+
+
+ When there are no array constants present, encodedTokenLen==totalEncodedLen
+ @param encodedTokenLen number of bytes in the stream taken by the plain formula tokens
+ @param totalEncodedLen the total number of bytes in the formula (includes trailing encoding
+ for array constants, but does not include 2 bytes for initial ushort encodedTokenLen field.
+ @return A new formula object as read from the stream. Possibly empty, never null.
+
+
+ Writes The formula encoding is includes:
+
+
ushort tokenDataLen
+
tokenData
+
arrayConstantData (if present)
+
+
+
+ @return total formula encoding length. The formula encoding includes:
+
+
ushort tokenDataLen
+
tokenData
+
arrayConstantData (optional)
+
+ Note - this value is different to tokenDataLength
+
+
+ This method is often used when the formula length does not appear immediately before
+ the encoded token data.
+
+ @return the encoded length of the plain formula tokens. This does not include
+ the leading ushort field, nor any trailing array constant data.
+
+
+ Creates a {@link Formula} object from a supplied {@link Ptg} array.
+ Handles nulls OK.
+ @param ptgs may be null
+ @return Never null (Possibly empty if the supplied ptgs is null)
+
+
+ Gets the {@link Ptg} array from the supplied {@link Formula}.
+ Handles nulls OK.
+
+ @param formula may be null
+ @return possibly null (if the supplied formula is null)
+
+
+ Gets the locator for the corresponding {@link SharedFormulaRecord}, {@link ArrayRecord} or
+ {@link TableRecord} if this formula belongs to such a grouping. The {@link CellReference}
+ returned by this method will match the top left corner of the range of that grouping.
+ The return value is usually not the same as the location of the cell containing this formula.
+
+ @return the firstRow & firstColumn of an array formula or shared formula that this formula
+ belongs to. null if this formula is not part of an array or shared formula.
+
+
+
+ @author Josh Micich
+
+
+ @return null if not found
+
+
+ Stores the cached result of a formula evaluation, along with the Set of sensititive input cells
+
+ @author Josh Micich
+
+
+ Cells 'used' in the current evaluation of the formula corresponding To this cache entry
+
+ If any of the following cells Change, this cache entry needs To be Cleared
+
+
+ A custom implementation of {@link java.util.HashSet} in order To reduce memory consumption.
+
+ Profiling tests (Oct 2008) have shown that each element {@link FormulaCellCacheEntry} takes
+ around 32 bytes To store in a HashSet, but around 6 bytes To store here. For Spreadsheets with
+ thousands of formula cells with multiple interdependencies, the savings can be very significant.
+
+ @author Josh Micich
+
+
+
+ Specific exception thrown when a supplied formula does not Parse properly.
+ Primarily used by test cases when testing for specific parsing exceptions.
+
+
+
+
+ This class was given package scope until it would become Clear that it is useful to general client code.
+
+
+
+
+ Lookahead Character.
+ Gets value '\0' when the input string is exhausted
+
+
+ Create the formula Parser, with the string that is To be
+ Parsed against the supplied workbook.
+ A later call the Parse() method To return ptg list in
+ rpn order, then call the GetRPNPtg() To retrive the
+ Parse results.
+ This class is recommended only for single threaded use.
+
+ If you only have a usermodel.HSSFWorkbook, and not a
+ model.Workbook, then use the convenience method on
+ usermodel.HSSFFormulaEvaluator
+
+
+ Parse a formula into a array of tokens
+
+ @param formula the formula to parse
+ @param workbook the parent workbook
+ @param formulaType the type of the formula, see {@link FormulaType}
+ @param sheetIndex the 0-based index of the sheet this formula belongs to.
+ The sheet index is required to resolve sheet-level names. -1 means that
+ the scope of the name will be ignored and the parser will match names only by name
+
+ @return array of parsed tokens
+ @throws FormulaParseException if the formula is unparsable
+
+
+ Read New Character From Input Stream
+
+
+ Report What Was Expected
+
+
+ Recognize an Alpha Character
+
+
+ Recognize a Decimal Digit
+
+
+ Recognize an Alphanumeric
+
+
+ Recognize White Space
+
+
+ Skip Over Leading White Space
+
+
+ Consumes the next input character if it is equal To the one specified otherwise throws an
+ unchecked exception. This method does not consume whitespace (before or after the
+ matched character).
+
+
+ Get a Number
+
+
+ From OOO doc: "Whenever one operand of the reference subexpression is a function,
+ a defined name, a 3D reference, or an external reference (and no error occurs),
+ a tMemFunc token is used"
+
+
+
+
+ @return true if the specified character may be used in a defined name
+
+
+ @param currentParsePosition used to format a potential error message
+
+
+ @return false if sub-expression represented the specified ParseNode definitely
+ cannot appear on either side of the range (':') operator
+
+
+ Parses area refs (things which could be the operand of ':') and simple factors
+ Examples
+
+
+
+
+ @param sheetIden may be null
+ @param part1
+ @param part2 may be null
+
+
+ Parses out a potential LHS or RHS of a ':' intended to produce a plain AreaRef. Normally these are
+ proper cell references but they could also be row or column refs like "$AC" or "10"
+ @return null (and leaves {@link #_pointer} unchanged if a proper range part does not parse out
+
+
+
+ "A1", "B3" -> "A1:B3"
+ "sheet1!A1", "B3" -> "sheet1!A1:B3"
+
+ @return null if the range expression cannot / shouldn't be reduced.
+
+
+ A1, $A1, A$1, $A$1, A, 1
+
+
+ @return true if the two range parts can be combined in an
+ {@link AreaPtg} ( Note - the explicit range operator (:) may still be valid
+ when this method returns false )
+
+
+ Note - caller should reset {@link #_pointer} upon null result
+ @return The sheet name as an identifier null if '!' is not found in the right place
+
+
+ If we have something that looks like [book]Sheet1: or
+ Sheet1, see if it's actually a range eg Sheet1:Sheet2!
+
+
+ very similar to {@link SheetNameFormatter#isSpecialChar(char)}
+
+
+ @return true if the specified name is a valid cell reference
+
+
+ Note - Excel Function names are 'case aware but not case sensitive'. This method may end
+ up creating a defined name record in the workbook if the specified name is not an internal
+ Excel Function, and Has not been encountered before.
+
+ @param name case preserved Function name (as it was entered/appeared in the formula).
+
+
+ * Generates the variable Function ptg for the formula.
+ *
+ * For IF Formulas, Additional PTGs are Added To the Tokens
+ * @param name a {@link NamePtg} or {@link NameXPtg} or null
+ * @return Ptg a null is returned if we're in an IF formula, it needs extreme manipulation and is handled in this Function
+
+
+ Get arguments To a Function
+
+
+ Parse and Translate a Math Factor
+
+
+ factors (without ^ or % )
+
+
+ Get a PTG for an integer from its string representation.
+ return Int or Number Ptg based on size of input
+
+
+ Parse and Translate a Math Term
+
+
+ Parse and Translate an Expression
+
+
+ API call To execute the parsing of the formula
+
+
+
+ Abstracts a workbook for the purpose of formula parsing.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+
+ named range name matching is case insensitive
+
+ The name.
+ Index of the sheet.
+
+
+
+
+ Gets the name XPTG.
+
+ The name.
+
+
+
+
+
+ Produce the appropriate Ptg for a 3d cell reference
+
+
+
+
+
+
+
+ Produce the appropriate Ptg for a 3d area reference
+
+
+
+
+
+
+
+ Gets the externSheet index for a sheet from this workbook
+
+ Name of the sheet.
+
+
+
+
+ Gets the externSheet index for a sheet from an external workbook
+
+ Name of the workbook, e.g. "BudGet.xls"
+ a name of a sheet in that workbook
+
+
+
+
+ Returns an enum holding spReadhseet properties specific to an Excel version (
+ max column and row numbers, max arguments to a function, etc.)
+
+
+
+
+ Common logic for rendering formulas.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Static method To convert an array of {@link Ptg}s in RPN order
+ To a human readable string format in infix mode.
+ @param book used for defined names and 3D references
+ @param ptgs must not be null
+ @return a human readable String
+
+
+ Abstracts a workbook for the purpose of converting formula To text.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ @return null if externSheetIndex refers To a sheet inside the current workbook
+
+
+ @return the name of the (first) sheet referred to by the given external sheet index
+
+
+ @return the name of the (last) sheet referred to by the given external sheet index
+
+
+ Enumeration of various formula types.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Optimisation - compacts many blank cell references used by a single formula.
+
+ @author Josh Micich
+
+
+ Temporarily collects FunctionMetadata instances for creation of a
+ FunctionMetadataRegistry.
+
+ @author Josh Micich
+
+
+ stores indexes of all functions with footnotes (i.e. whose definitions might Change)
+
+
+ Holds information about Excel built-in functions.
+
+ @author Josh Micich
+
+
+ Converts the text meta-data file into a FunctionMetadataRegistry
+
+ @author Josh Micich
+
+
+ plain ASCII text metadata file uses three dots for ellipsis
+
+
+ Makes sure that footnote digits from the original OOO document have not been accidentally
+ left behind
+
+
+ Allows clients to Get FunctionMetadata instances for any built-in function of Excel.
+
+ @author Josh Micich
+
+
+ The name of the IF function (i.e. "IF"). Extracted as a constant for clarity.
+
+
+ Resolves a built-in function index.
+ @param name uppercase function name
+ @return a negative value if the function name is not found.
+ This typically occurs for external functions.
+
+
+ A (mostly) opaque interface To allow test clients To trace cache values
+ Each spreadsheet cell Gets one unique cache entry instance. These objects
+ are safe To use as keys in {@link java.util.HashMap}s
+
+
+ Tests can implement this class To track the internal working of the {@link WorkbookEvaluator}.
+
+ For POI internal testing use only
+
+ @author Josh Micich
+
+
+ Internally, formula {@link ICacheEntry}s are stored in Sets which may Change ordering due
+ To seemingly trivial Changes. This method is provided To make the order of call-backs To
+ {@link #onClearDependentCachedValue(ICacheEntry, int)} more deterministic.
+
+
+ Used to help optimise cell evaluation result caching by allowing applications to specify which
+ parts of a workbook are final.
+ The term final is introduced here to denote immutability or 'having constant definition'.
+ This classification refers to potential actions (on the evaluated workbook) by the evaluating
+ application. It does not refer to operations performed by the evaluator ({@link
+ WorkbookEvaluator}).
+
+ General guidelines:
+
+
a plain value cell can be marked as 'final' if it will not be changed after the first call
+ to {@link WorkbookEvaluator#evaluate(EvaluationCell)}.
+
+
a formula cell can be marked as 'final' if its formula will not be changed after the first
+ call to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. This remains true even if changes
+ in dependent values may cause the evaluated value to change.
+
plain value cells should be marked as 'not final' if their plain value value may change.
+
+
formula cells should be marked as 'not final' if their formula definition may change.
+
cells which may switch between plain value and formula should also be marked as 'not final'.
+
+
+ Notes:
+
+
If none of the spreadsheet cells is expected to have its definition changed after evaluation
+ begins, every cell can be marked as 'final'. This is the most efficient / least resource
+ intensive option.
+
To retain freedom to change any cell definition at any time, an application may classify all
+ cells as 'not final'. This freedom comes at the expense of greater memory consumption.
+
For the purpose of these classifications, setting the cached formula result of a cell (for
+ example in {@link HSSFFormulaEvaluator#evaluateFormulaCell(org.apache.poi.ss.usermodel.Cell)})
+ does not constitute changing the definition of the cell.
+
Updating cells which have been classified as 'final' will cause the evaluator to behave
+ unpredictably (typically ignoring the update).
+
+
+ @author Josh Micich
+
+
+ Convenience implementation for situations where all cell definitions remain fixed after
+ evaluation begins.
+
+
+ Checks if a cell's value(/formula) is fixed - in other words - not expected to be modified
+ between calls to the evaluator. (Note - this is an independent concept from whether a
+ formula cell's evaluated value may change during successive calls to the evaluator).
+
+ @param sheetIndex zero based index into workbook sheet list
+ @param rowIndex zero based row index of cell
+ @param columnIndex zero based column index of cell
+ @return false if the evaluating application may need to modify the specified
+ cell between calls to the evaluator.
+
+
+ Provides Lazy Evaluation to 3D Ranges
+
+
+ @return whether cell at rowIndex and columnIndex is a subtotal
+
+
+ Provides Lazy Evaluation to a 3D Reference
+
+ TODO Provide access to multiple sheets where present
+
+
+ This class performs 'operand class' transformation. Non-base Tokens are classified into three
+ operand classes:
+
+
reference
+
value
+
array
+
+
+
+ The operand class chosen for each Token depends on the formula type and the Token's place
+ in the formula. If POI Gets the operand class wrong, Excel may interpret the formula
+ incorrectly. This condition is typically manifested as a formula cell that displays as '#VALUE!',
+ but resolves correctly when the user presses F2, enter.
+
+ The logic implemented here was partially inspired by the description in
+ "OpenOffice.org's Documentation of the Microsoft Excel File Format". The model presented there
+ seems To be inconsistent with observed Excel behaviour (These differences have not been fully
+ investigated). The implementation in this class Has been heavily modified in order To satisfy
+ concrete examples of how Excel performs the same logic (see TestRVA).
+
+ Hopefully, as Additional important test cases are identified and Added To the test suite,
+ patterns might become more obvious in this code and allow for simplification.
+
+ @author Josh Micich
+
+
+ Traverses the supplied formula parse tree, calling Ptg.SetClass() for each non-base
+ Token To Set its operand class.
+
+
+ @param callerForceArrayFlag true if one of the current node's parents is a
+ function Ptg which Has been Changed from default 'V' To 'A' type (due To requirements on
+ the function return value).
+
+
+ Contains all the contextual information required to Evaluate an operation
+ within a formula
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ @return null if either workbook or sheet is not found
+
+
+ Resolves a cell or area reference dynamically.
+ @param workbookName the name of the workbook Containing the reference. If null
+ the current workbook is assumed. Note - to Evaluate formulas which use multiple workbooks,
+ a {@link CollaboratingWorkbooksEnvironment} must be set up.
+ @param sheetName the name of the sheet Containing the reference. May be null
+ (when workbookName is also null) in which case the current workbook and sheet is
+ assumed.
+ @param refStrPart1 the single cell reference or first part of the area reference. Must not
+ be null.
+ @param refStrPart2 the second part of the area reference. For single cell references this
+ parameter must be null
+ @param isA1Style specifies the format for refStrPart1 and refStrPart2.
+ Pass true for 'A1' style and false for 'R1C1' style.
+ TODO - currently POI only supports 'A1' reference style
+ @return a {@link RefEval} or {@link AreaEval}
+
+
+ This class Creates OperationEval instances To help evaluate OperationPtg
+ formula Tokens.
+
+ @author Josh Micich
+
+
+ returns the OperationEval concrete impl instance corresponding
+ to the supplied operationPtg
+
+
+ Represents a syntactic element from a formula by encapsulating the corresponding Ptg
+ Token. Each ParseNode may have child ParseNodes in the case when the wrapped
+ Ptg is non-atomic.
+
+ @author Josh Micich
+
+
+ Collects the array of Ptg Tokens for the specified tree.
+
+
+ The IF() function Gets marked up with two or three tAttr Tokens.
+ Similar logic will be required for CHOOSE() when it is supported
+
+ See excelfileformat.pdf sec 3.10.5 "tAttr (19H)
+
+
+
+ @author Josh Micich
+
+
+ Used for non-formula cells, primarily To keep track of the referencing (formula) cells.
+
+ @author Josh Micich
+
+
+ @author Josh Micich
+
+
+ Extern sheet index of sheet where moving is occurring
+
+
+ Sheet name of the sheet where moving is occurring,
+ used for updating XSSF style 3D references on row shifts.
+
+
+ Create an instance for Shifting row.
+
+ For example, this will be called on {@link NPOI.HSSF.UserModel.HSSFSheet#ShiftRows(int, int, int)} }
+
+
+ Create an instance for shifting sheets.
+
+ For example, this will be called on {@link org.apache.poi.hssf.usermodel.HSSFWorkbook#setSheetOrder(String, int)}
+
+
+ @param ptgs - if necessary, will get modified by this method
+ @param currentExternSheetIx - the extern sheet index of the sheet that contains the formula being adjusted
+ @return true if a change was made to the formula tokens
+
+
+ @return true if this Ptg needed to be changed
+
+
+ Formats sheet names for use in formula expressions.
+
+ @author Josh Micich
+
+
+ Used to format sheet names as they would appear in cell formula expressions.
+ @return the sheet name UnChanged if there is no need for delimiting. Otherwise the sheet
+ name is enclosed in single quotes ('). Any single quotes which were already present in the
+ sheet name will be converted to double single quotes ('').
+
+
+ Convenience method for when a StringBuilder is already available
+
+ @param out - sheet name will be Appended here possibly with delimiting quotes
+
+
+ @return true if the presence of the specified Char in a sheet name would
+ require the sheet name to be delimited in formulas. This includes every non-alphanumeric
+ Char besides Underscore '_'.
+
+
+ Used to decide whether sheet names like 'AB123' need delimiting due to the fact that they
+ look like cell references.
+
+ This code is currently being used for translating formulas represented with Ptg
+ tokens into human readable text form. In formula expressions, a sheet name always has a
+ trailing '!' so there is little chance for ambiguity. It doesn't matter too much what this
+ method returns but it is worth noting the likely consumers of these formula text strings:
+
+
POI's own formula parser
+
Visual reading by human
+
VBA automation entry into Excel cell contents e.g. ActiveCell.Formula = "=c64!A1"
+
Manual entry into Excel cell contents
+
Some third party formula parser
+
+
+ At the time of writing, POI's formula parser tolerates cell-like sheet names in formulas
+ with or without delimiters. The same goes for Excel(2007), both manual and automated entry.
+
+ For better or worse this implementation attempts to replicate Excel's formula renderer.
+ Excel uses range checking on the apparent 'row' and 'column' components. Note however that
+ the maximum sheet size varies across versions.
+ @see org.apache.poi.hssf.util.CellReference
+
+
+ Note - this method assumes the specified rawSheetName has only letters and digits. It
+ cannot be used to match absolute or range references (using the dollar or colon char).
+
+ Some notable cases:
+
+
Input
Result
Comments
+
"A1"
true
+
"a111"
true
+
"AA"
false
+
"aa1"
true
+
"A1A"
false
+
"A1A1"
false
+
"A$1:$C$20"
false
Not a plain cell reference
+
"SALES20080101"
true
+
Still needs delimiting even though well out of range
+
+
+ @return true if there is any possible ambiguity that the specified rawSheetName
+ could be interpreted as a valid cell name.
+
+
+
+
+ @author Josh Micich
+
+
+ @return whether cell at rowIndex and columnIndex is a subtotal
+ @see org.apache.poi.ss.formula.functions.Subtotal
+
+
+ Should be implemented by any {@link Ptg} subclass that needs a workbook To render its formula.
+
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Evaluates formula cells.
+
+ For performance reasons, this class keeps a cache of all previously calculated intermediate
+ cell values. Be sure To call {@link #ClearCache()} if any workbook cells are Changed between
+ calls To evaluate~ methods on this class.
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ also for debug use. Used in ToString methods
+
+
+ Should be called whenever there are Changes To input cells in the evaluated workbook.
+ Failure To call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ Should be called To tell the cell value cache that the specified (value or formula) cell
+ Has Changed.
+
+
+ Should be called To tell the cell value cache that the specified cell Has just been
+ deleted.
+
+
+ Case-insensitive.
+ @return -1 if sheet with specified name does not exist
+
+
+ @return never null, never {@link BlankEval}
+
+
+ Adds the current cell reference to the exception for easier debugging.
+ Would be nice to get the formula text as well, but that seems to require
+ too much digging around and casting to get the FormulaRenderingWorkbook.
+
+
+ Gets the value from a non-formula cell.
+ @param cell may be null
+ @return {@link BlankEval} if cell is null or blank, never null
+
+
+ whether print detailed messages about the next formula evaluation
+
+
+ Calculates the number of tokens that the evaluator should skip upon reaching a tAttrSkip.
+
+ @return the number of tokens (starting from startIndex+1) that need to be skipped
+ to achieve the specified distInBytes skip distance.
+
+
+ Dereferences a single value from any AreaEval or RefEval evaluation result.
+ If the supplied evaluationResult is just a plain value, it is returned as-is.
+ @return a NumberEval, StringEval, BoolEval,
+ BlankEval or ErrorEval. Never null.
+
+
+ returns an appropriate Eval impl instance for the Ptg. The Ptg must be
+ one of: Area3DPtg, AreaPtg, ReferencePtg, Ref3DPtg, IntPtg, NumberPtg,
+ StringPtg, BoolPtg special Note: OperationPtg subtypes cannot be
+ passed here!
+
+
+ Used by the lazy ref evals whenever they need To Get the value of a contained cell.
+
+
+ Whether to ignore missing references to external workbooks and
+ use cached formula results in the main workbook instead.
+
+ In some cases exetrnal workbooks referenced by formulas in the main workbook are not avaiable.
+ With this method you can control how POI handles such missing references:
+
+
by default ignoreMissingWorkbooks=false and POI throws {@link WorkbookNotFoundException}
+ if an external reference cannot be resolved
+
if ignoreMissingWorkbooks=true then POI uses cached formula result
+ that already exists in the main workbook
+
+
+ @param ignore whether to ignore missing references to external workbooks
+ @see Bug 52575 for details
+
+
+ Return a collection of functions that POI can evaluate
+
+ @return names of functions supported by POI
+
+
+ Return a collection of functions that POI does not support
+
+ @return names of functions NOT supported by POI
+
+
+ Register a ATP function in runtime.
+
+ @param name the function name
+ @param func the functoin to register
+ @throws IllegalArgumentException if the function is unknown or already registered.
+ @since 3.8 beta6
+
+
+ Register a function in runtime.
+
+ @param name the function name
+ @param func the functoin to register
+ @throws IllegalArgumentException if the function is unknown or already registered.
+ @since 3.8 beta6
+
+
+ Common interface for Excel text extractors, covering
+ HSSF and XSSF
+
+
+ Retreives the text contents of the file
+
+
+ Formats a date value.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Creates a new date formatter with the given specification.
+
+ @param format The format.
+
+
+ {@inheritDoc}
+
+
+ {@inheritDoc}
+
+ For a date, this is "mm/d/y".
+
+
+ This class : printing out an elapsed time format.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Creates a elapsed time formatter.
+
+ @param pattern The pattern to Parse.
+
+
+ {@inheritDoc}
+
+
+ {@inheritDoc}
+
+ For a date, this is "mm/d/y".
+
+
+ Format a value according to the standard Excel behavior. This "standard" is
+ not explicitly documented by Microsoft, so the behavior is determined by
+ experimentation; see the tests.
+
+ An Excel format has up to four parts, Separated by semicolons. Each part
+ specifies what to do with particular kinds of values, depending on the number
+ of parts given:
+
+ - One part (example: [Green]#.##)
+ If the value is a number, display according to this one part (example: green text,
+ with up to two decimal points). If the value is text, display it as is.
+
+ - Two parts (example: [Green]#.##;[Red]#.##)
+ If the value is a positive number or zero, display according to the first part (example: green
+ text, with up to two decimal points); if it is a negative number, display
+ according to the second part (example: red text, with up to two decimal
+ points). If the value is text, display it as is.
+
+ - Three parts (example: [Green]#.##;[Black]#.##;[Red]#.##)
+ If the value is a positive number, display according to the first part (example: green text, with up to
+ two decimal points); if it is zero, display according to the second part
+ (example: black text, with up to two decimal points); if it is a negative
+ number, display according to the third part (example: red text, with up to
+ two decimal points). If the value is text, display it as is.
+
+ - Four parts (example: [Green]#.##;[Black]#.##;[Red]#.##;[@])
+ If the value is a positive number, display according to the first part (example: green text,
+ with up to two decimal points); if it is zero, display according to the
+ second part (example: black text, with up to two decimal points); if it is a
+ negative number, display according to the third part (example: red text, with
+ up to two decimal points). If the value is text, display according to the
+ fourth part (example: text in the cell's usual color, with the text value
+ surround by brackets).
+
+ In Addition to these, there is a general format that is used when no format
+ is specified. This formatting is presented by the {@link #GENERAL_FORMAT}
+ object.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Format a value as it would be were no format specified. This is also
+ used when the format specified is General.
+
+
+ Maps a format string to its Parsed version for efficiencies sake.
+
+
+ Returns a {@link CellFormat} that applies the given format. Two calls
+ with the same format may or may not return the same object.
+
+ @param format The format.
+
+ @return A {@link CellFormat} that applies the given format.
+
+
+ Creates a new object.
+
+ @param format The format.
+
+
+ Returns the result of Applying the format to the given value. If the
+ value is a number (a type of {@link Number} object), the correct number
+ format type is chosen; otherwise it is considered a text object.
+
+ @param value The value
+
+ @return The result, in a {@link CellFormatResult}.
+
+
+ Returns the result of applying the format to the given date.
+
+ @param date The date.
+ @param numericValue The numeric value for the date.
+
+ @return The result, in a {@link CellFormatResult}.
+
+
+ Fetches the appropriate value from the cell, and returns the result of
+ Applying it to the appropriate format. For formula cells, the computed
+ value is what is used.
+
+ @param c The cell.
+
+ @return The result, in a {@link CellFormatResult}.
+
+
+ Returns the {@link CellFormatPart} that applies to the value. Result
+ depends on how many parts the cell format has, the cell value and any
+ conditions. The value must be a {@link Number}.
+
+ @param value The value.
+ @return The {@link CellFormatPart} that applies to the value.
+
+
+ Returns the ultimate cell type, following the results of formulas. If
+ the cell is a {@link Cell#CELL_TYPE_FORMULA}, this returns the result of
+ {@link Cell#getCachedFormulaResultType()}. Otherwise this returns the
+ result of {@link Cell#getCellType()}.
+
+ @param cell The cell.
+
+ @return The ultimate type of this cell.
+
+
+ Returns true if the other object is a {@link CellFormat} object
+ with the same format.
+
+ @param obj The other object.
+
+ @return true if the two objects are Equal.
+
+
+ Returns a hash code for the format.
+
+ @return A hash code for the format.
+
+
+ This object represents a condition in a cell format.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Returns an instance of a condition object.
+
+ @param opString The operator as a string. One of "<",
+ "<=", ">", ">=",
+ "=", "==", "!=", or
+ "<>".
+ @param constStr The constant (such as "12").
+
+ @return A condition object for the given condition.
+
+
+ Returns true if the given value passes the constraint's test.
+
+ @param value The value to compare against.
+
+ @return true if the given value passes the constraint's test.
+
+
+ Objects of this class represent a single part of a cell format expression.
+ Each cell can have up to four of these for positive, zero, negative, and text
+ values.
+
+ Each format part can contain a color, a condition, and will always contain a
+ format specification. For example "[Red][>=10]#" has a color
+ ([Red]), a condition (>=10) and a format specification
+ (#).
+
+ This class also Contains patterns for matching the subparts of format
+ specification. These are used internally, but are made public in case other
+ code has use for them.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Pattern for the color part of a cell format part.
+
+
+ Pattern for the condition part of a cell format part.
+
+
+ Pattern for the format specification part of a cell format part.
+
+
+ Pattern for an entire cell single part.
+
+
+ Within {@link #FORMAT_PAT}, the group number for the matched color.
+
+
+ Within {@link #FORMAT_PAT}, the group number for the operator in the
+ condition.
+
+
+ Within {@link #FORMAT_PAT}, the group number for the value in the
+ condition.
+
+
+ Within {@link #FORMAT_PAT}, the group number for the format
+ specification.
+
+
+ Create an object to represent a format part.
+
+ @param desc The string to Parse.
+
+
+ Returns true if this format part applies to the given value. If
+ the value is a number and this is part has a condition, returns
+ true only if the number passes the condition. Otherwise, this
+ allways return true.
+
+ @param valueObject The value to Evaluate.
+
+ @return true if this format part applies to the given value.
+
+
+ Returns the number of the first group that is the same as the marker
+ string. The search starts with group 1.
+
+ @param pat The pattern to use.
+ @param str The string to match against the pattern.
+ @param marker The marker value to find the group of.
+
+ @return The matching group number.
+
+ @throws ArgumentException No group matches the marker.
+
+
+ Returns the color specification from the matcher, or null if
+ there is none.
+
+ @param m The matcher for the format part.
+
+ @return The color specification or null.
+
+
+ Returns the condition specification from the matcher, or null if
+ there is none.
+
+ @param m The matcher for the format part.
+
+ @return The condition specification or null.
+
+
+ Returns the CellFormatType object implied by the format specification for
+ the format part.
+
+ @param matcher The matcher for the format part.
+
+ @return The CellFormatType.
+
+
+ Returns the formatter object implied by the format specification for the
+ format part.
+
+ @param matcher The matcher for the format part.
+
+ @return The formatter.
+
+
+ Returns the type of format.
+
+ @param fdesc The format specification
+
+ @return The type of format.
+
+
+ Returns a version of the original string that has any special characters
+ quoted (or escaped) as appropriate for the cell format type. The format
+ type object is queried to see what is special.
+
+ @param repl The original string.
+ @param type The format type representation object.
+
+ @return A version of the string with any special characters Replaced.
+
+ @see CellFormatType#isSpecial(char)
+
+
+ Apply this format part to the given value. This returns a {@link
+ CellFormatResult} object with the results.
+
+ @param value The value to apply this format part to.
+
+ @return A {@link CellFormatResult} object Containing the results of
+ Applying the format to the value.
+
+
+ Returns the CellFormatType object implied by the format specification for
+ the format part.
+
+ @return The CellFormatType.
+
+
+ Returns true if this format part has a condition.
+
+ @return true if this format part has a condition.
+
+
+ Expands a character. This is only partly done, because we don't have the
+ correct info. In Excel, this would be expanded to fill the rest of the
+ cell, but we don't know, in general, what the "rest of the cell" is1.
+
+ @param part The character to be repeated is the second character in this
+ string.
+
+ @return The character repeated three times.
+
+
+ Returns the string from the group, or "" if the group is
+ null.
+
+ @param m The matcher.
+ @param g The group number.
+
+ @return The group or "".
+
+
+ This object Contains the result of Applying a cell format or cell format part
+ to a value.
+
+ @author Ken Arnold, Industrious Media LLC
+ @see CellFormatPart#Apply(Object)
+ @see CellFormat#Apply(Object)
+
+
+ This is true if no condition was given that applied to the
+ value, or if the condition is satisfied. If a condition is relevant, and
+ when applied the value fails the test, this is false.
+
+
+ The resulting text. This will never be null.
+
+
+ The color the format Sets, or null if the format Sets no color.
+ This will always be null if {@link #applies} is false.
+
+
+ Creates a new format result object.
+
+ @param applies The value for {@link #applies}.
+ @param text The value for {@link #text}.
+ @param textColor The value for {@link #textColor}.
+
+
+ This is the abstract supertype for the various cell formatters.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ The original specified format.
+
+
+ This is the locale used to Get a consistent format result from which to
+ work.
+
+
+ Creates a new formatter object, storing the format in {@link #format}.
+
+ @param format The format.
+
+
+ Format a value according the format string.
+
+ @param toAppendTo The buffer to append to.
+ @param value The value to format.
+
+
+ Format a value according to the type, in the most basic way.
+
+ @param toAppendTo The buffer to append to.
+ @param value The value to format.
+
+
+ Formats the value, returning the resulting string.
+
+ @param value The value to format.
+
+ @return The value, formatted.
+
+
+ Formats the value in the most basic way, returning the resulting string.
+
+ @param value The value to format.
+
+ @return The value, formatted.
+
+
+ Returns the input string, surrounded by quotes.
+
+ @param str The string to quote.
+
+ @return The input string, surrounded by quotes.
+
+
+ The different kinds of formats that the formatter understands.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ The general (default) format; also used for "General".
+
+
+ A numeric format.
+
+
+ A date format.
+
+
+ An elapsed time format.
+
+
+ A text format.
+
+
+ Returns true if the format is special and needs to be quoted.
+
+ @param ch The character to test.
+
+ @return true if the format is special and needs to be quoted.
+
+
+ Returns a new formatter of the appropriate type, for the given pattern.
+ The pattern must be appropriate for the type.
+
+ @param pattern The pattern to use.
+
+ @return A new formatter of the appropriate type, for the given pattern.
+
+
+ A formatter for the default "General" cell format.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ Creates a new general formatter.
+
+
+ The general style is not quite the same as any other, or any combination
+ of others.
+
+ @param toAppendTo The buffer to append to.
+ @param value The value to format.
+
+
+ Equivalent to {@link #formatValue(StringBuilder,Object)}. {@inheritDoc}.
+
+
+ This class : printing out a value using a number format.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+
+ The CellNumberFormatter.simpleValue() method uses the SIMPLE_NUMBER
+ CellFormatter defined here. The CellFormat.GENERAL_FORMAT CellFormat
+ no longer uses the SIMPLE_NUMBER CellFormatter.
+ Note that the simpleValue()/SIMPLE_NUMBER CellFormatter format
+ ("#" for integer values, and "#.#" for floating-point values) is
+ different from the 'General' format for numbers ("#" for integer
+ values and "#.#########" for floating-point values).
+
+
+
+ This class is used to mark where the special characters in the format
+ are, as opposed to the other characters that are simply printed.
+
+
+ This class represents a single modification to a result string. The way
+ this works is complicated, but so is numeric formatting. In general, for
+ most formats, we use a DecimalFormat object that will Put the string out
+ in a known format, usually with all possible leading and trailing zeros.
+ We then walk through the result and the orginal format, and note any
+ modifications that need to be made. Finally, we go through and apply
+ them all, dealing with overlapping modifications.
+
+
+ Creates a new cell number formatter.
+
+ @param format The format to Parse.
+
+
+ {@inheritDoc}
+
+
+ {@inheritDoc}
+
+ For a number, this is "#" for integer values, and "#.#"
+ for floating-point values.
+
+
+ This class : printing out text.
+
+ @author Ken Arnold, Industrious Media LLC
+
+
+ {@inheritDoc}
+
+
+ {@inheritDoc}
+
+ For text, this is just printing the text.
+
+
+ The denominator.
+
+
+ The numerator.
+
+
+ Create a fraction given a double value and a denominator.
+
+ @param val double value of fraction
+ @param exactDenom the exact denominator
+ @return a SimpleFraction with the given values set.
+
+
+ Create a fraction given the double value and either the maximum error
+ allowed or the maximum number of denominator digits.
+
+ @param value the double value to convert to a fraction.
+ @param maxDenominator maximum denominator value allowed.
+
+ @throws RuntimeException if the continued fraction failed to
+ converge.
+ @throws IllegalArgumentException if value > Integer.MAX_VALUE
+
+
+ Create a fraction given the double value and either the maximum error
+ allowed or the maximum number of denominator digits.
+
+
+
+ Based on org.apache.commons.math.fraction.Fraction from Apache Commons-Math.
+ YK: The only reason of having this class is to avoid dependency on the Commons-Math jar.
+
+ @param value the double value to convert to a fraction.
+ @param epsilon maximum error allowed. The resulting fraction is within
+ epsilon of value, in absolute terms.
+ @param maxDenominator maximum denominator value allowed.
+ @param maxIterations maximum number of convergents
+ @throws RuntimeException if the continued fraction failed to
+ converge.
+ @throws IllegalArgumentException if value > Integer.MAX_VALUE
+
+
+ Create a fraction given a numerator and denominator.
+ @param numerator
+ @param denominator maxDenominator The maximum allowed value for denominator
+
+
+ Access the denominator.
+ @return the denominator.
+
+
+ Access the numerator.
+ @return the numerator.
+
+
+
+ No diagional border
+
+
+
+
+ Backward diagional border, from left-top to right-bottom
+
+
+
+
+ Forward diagional border, from right-top to left-bottom
+
+
+
+
+ Both forward and backward diagional border
+
+
+
+
+ Data for a Bar Chart
+
+
+
+
+
+ @return list of all series.
+
+
+ @return data source used for category axis data.
+
+
+ @return data source used for value axis.
+
+
+ Return number of points contained by data source.
+
+ @return number of points contained by data source
+
+
+ Returns point value at specified index.
+
+ @param index index to value from
+ @return point value at specified index.
+ @throws {@code IndexOutOfBoundsException} if index
+ parameter not in range {@code 0 <= index <= pointCount}
+
+
+ Returns {@code true} if charts data source is valid cell range.
+
+ @return {@code true} if charts data source is valid cell range
+
+
+ Returns {@code true} if data source points should be treated as numbers.
+
+ @return {@code true} if data source points should be treated as numbers
+
+
+ Returns formula representation of the data source. It is only applicable
+ for data source that is valid cell range.
+
+ @return formula representation of the data source
+ @throws {@code UnsupportedOperationException} if the data source is not a
+ reference.
+
+
+ Sets the title of the series as a string literal.
+
+ @param title
+
+
+ Sets the title of the series as a cell reference.
+
+ @param titleReference
+
+
+ @return title as string literal.
+
+
+ @return title as cell reference.
+
+
+ @return title type.
+
+
+
+ Data for a Line Chart
+
+
+
+
+
+ @return list of all series.
+
+
+ @return data source used for category axis data.
+
+
+ @return data source used for value axis.
+
+
+ Specifies the possible crossing states of an axis.
+
+ @author Roman Kashitsyn
+
+
+ Specifies the value axis shall cross the category axis
+ between data markers.
+
+
+ Specifies the value axis shall cross the category axis at
+ the midpoint of a category.
+
+
+ Specifies the possible crossing points for an axis.
+
+ @author Roman Kashitsyn
+
+
+ The category axis crosses at the zero point of the value axis (if
+ possible), or the minimum value (if the minimum is greater than zero) or
+ the maximum (if the maximum is less than zero).
+
+
+ The axis crosses at the maximum value.
+
+
+ Axis crosses at the minimum value of the chart.
+
+
+ Specifies the possible ways to place a picture on a data point, series, wall, or floor.
+
+ @author Roman Kashitsyn
+
+
+ Specifies that the values on the axis shall be reversed
+ so they go from maximum to minimum.
+
+
+ Specifies that the axis values shall be in the usual
+ order, minimum to maximum.
+
+
+ Enumeration of all possible axis positions.
+
+ @author Roman Kashitsyn
+
+
+ High level representation of chart axis.
+
+ @author Roman Kashitsyn
+
+
+ @return axis id
+
+
+ get or set axis position
+
+
+ get or set axis number format
+
+
+ @return true if log base is defined, false otherwise
+
+
+ @param logBase a number between 2 and 1000 (inclusive)
+ @return axis log base or 0.0 if not Set
+ @throws ArgumentException if log base not within allowed range
+
+
+ @return true if minimum value is defined, false otherwise
+
+
+ get or set axis minimum
+ 0.0 if not Set
+
+
+ @return true if maximum value is defined, false otherwise
+
+
+ get or set axis maximum
+ 0.0 if not Set
+
+
+ get or set axis orientation
+
+
+ get or set axis cross type
+
+
+ Declare this axis cross another axis.
+ @param axis that this axis should cross
+
+
+ @return visibility of the axis.
+
+
+ @return major tick mark.
+
+
+ @return minor tick mark.
+
+
+
+ A factory for different chart axis.
+
+ @author Roman Kashitsyn
+
+
+
+ returns new value axis
+
+
+
+
+
+
+ A base for all chart data types.
+
+
+ @author Roman Kashitsyn
+
+
+
+
+ Fills a chart with data specified by implementation.
+
+ a chart to fill in
+ chart axis to use
+
+
+
+ A factory for different chart data types.
+
+
+ @author Roman Kashitsyn
+
+
+
+
+ returns an appropriate ScatterChartData instance
+
+
+
+
+
+ High level representation of chart legend.
+
+ @author Roman Kashitsyn
+
+
+
+ legend position
+
+
+
+
+
+ If true the legend is positioned over the chart area otherwise
+ the legend is displayed next to it.
+ Default is no overlay.
+
+
+
+
+ Specifies the possible ways to store a chart element's position.
+
+
+ @author Roman Kashitsyn
+
+
+
+
+ Specifies that the Width or Height shall be interpreted as the Right or Bottom of the chart element.
+
+
+
+
+ Specifies that the Width or Height shall be interpreted as the width or Height of the chart element.
+
+
+
+
+ Specifies whether to layout the plot area by its inside (not including axis
+ and axis labels) or outside (including axis and axis labels).
+
+
+ @author Roman Kashitsyn
+
+
+
+
+ Specifies that the plot area size shall determine the size of the plot area, not including the tick marks and axis labels.
+
+
+
+
+ Specifies that the plot area size shall determine the
+ size of the plot area, the tick marks, and the axis
+ labels.
+
+
+
+
+ Enumeration of all possible chart legend positions.
+
+
+ @author Roman Kashitsyn
+
+
+
+ High level representation of chart element manual layout.
+
+ @author Roman Kashitsyn
+
+
+ Sets the layout target.
+ @param target new layout target.
+
+
+ Returns current layout target.
+ @return current layout target
+
+
+ Sets the x-coordinate layout mode.
+ @param mode new x-coordinate layout mode.
+
+
+ Returns current x-coordinnate layout mode.
+ @return current x-coordinate layout mode.
+
+
+ Sets the y-coordinate layout mode.
+ @param mode new y-coordinate layout mode.
+
+
+ Returns current y-coordinate layout mode.
+ @return current y-coordinate layout mode.
+
+
+ Returns the x location of the chart element.
+ @return the x location (left) of the chart element or 0.0 if
+ not Set.
+
+
+ Specifies the x location (left) of the chart element as a
+ fraction of the width of the chart. If Left Mode is Factor,
+ then the position is relative to the default position for the
+ chart element.
+
+
+ Returns current y location of the chart element.
+ @return the y location (top) of the chart element or 0.0 if not
+ Set.
+
+
+ Specifies the y location (top) of the chart element as a
+ fraction of the height of the chart. If Top Mode is Factor,
+ then the position is relative to the default position for the
+ chart element.
+
+
+ Specifies how to interpret the Width element for this manual
+ layout.
+ @param mode new width layout mode of this manual layout.
+
+
+ Returns current width mode of this manual layout.
+ @return width mode of this manual layout.
+
+
+ Specifies how to interpret the Height element for this manual
+ layout.
+ @param mode new height mode of this manual layout.
+
+
+ Returns current height mode of this
+ @return height mode of this manual layout.
+
+
+ Specifies the width (if Width Mode is Factor) or right (if
+ Width Mode is Edge) of the chart element as a fraction of the
+ width of the chart.
+ @param ratio a fraction of the width of the chart.
+
+
+ Returns current fraction of the width of the chart.
+ @return fraction of the width of the chart or 0.0 if not Set.
+
+
+ Specifies the height (if Height Mode is Factor) or bottom (if
+ Height Mode is edge) of the chart element as a fraction of the
+ height of the chart.
+ @param ratio a fraction of the height of the chart.
+
+
+ Returns current fraction of the height of the chart.
+ @return fraction of the height of the chart or 0.0 if not Set.
+
+
+ Abstraction of chart element that can be positioned with manual
+ layout.
+
+ @author Roman Kashitsyn
+
+
+ Returns manual layout for the chart element.
+ @return manual layout for the chart element.
+
+
+ Data for a Scatter Chart
+
+
+ @param xs data source to be used for X axis values
+ @param ys data source to be used for Y axis values
+ @return a new scatter charts series
+
+
+ @return list of all series
+
+
+ Represents scatter charts serie.
+ @author Roman Kashitsyn
+
+
+ @return data source used for X axis values
+
+
+ @return data source used for Y axis values
+
+
+ @author Roman Kashitsyn
+
+
+ @return cross between type
+
+
+ @param crossBetween cross between type
+
+
+ Enum mapping the values of STDataConsolidateFunction
+
+
+ the different types of possible underline formatting
+
+ @author Gisella Bronzetti
+
+
+ Single-line underlining under each character in the cell.
+ The underline is drawn through the descenders of
+ characters such as g and p..
+
+
+ Double-line underlining under each character in the
+ cell. underlines are drawn through the descenders of
+ characters such as g and p.
+
+
+ Single-line accounting underlining under each
+ character in the cell. The underline is drawn under the
+ descenders of characters such as g and p.
+
+
+ Double-line accounting underlining under each
+ character in the cell. The underlines are drawn under
+ the descenders of characters such as g and p.
+
+
+ No underline.
+
+
+
Format class that handles Excel style fractions, such as "# #/#" and "#/###"
+
+
As of this writing, this is still not 100% accurate, but it does a reasonable job
+ of trying to mimic Excel's fraction calculations. It does not currently
+ maintain Excel's spacing.
+
+
This class relies on a method lifted nearly verbatim from org.apache.math.fraction.
+ If further uses for Commons Math are found, we will consider Adding it as a dependency.
+ For now, we have in-lined the one method to keep things simple.
+
+
+ Single parameter ctor
+ @param denomFormatString The format string for the denominator
+
+
+ Represents autofiltering for the specified worksheet.
+
+
+ Filtering data is a quick and easy way to find and work with a subset of data in a range of cells or table.
+ For example, you can filter to see only the values that you specify, filter to see the top or bottom values,
+ or filter to quickly see duplicate values.
+
+
+ TODO YK: For now (Aug 2010) POI only supports Setting a basic autofilter on a range of cells.
+ In future, when we support more auto-filter functions like custom criteria, sort, etc. we will add
+ corresponding methods to this interface.
+
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+
+
+
+ The enumeration value indicating the line style of a border in a cell
+
+
+
+
+ No border
+
+
+
+
+ Thin border
+
+
+
+
+ Medium border
+
+
+
+
+ dash border
+
+
+
+
+ dot border
+
+
+
+
+ Thick border
+
+
+
+
+ double-line border
+
+
+
+
+ hair-line border
+
+
+
+
+ Medium dashed border
+
+
+
+
+ dash-dot border
+
+
+
+
+ medium dash-dot border
+
+
+
+
+ dash-dot-dot border
+
+
+
+
+ medium dash-dot-dot border
+
+
+
+
+ slanted dash-dot border
+
+
+
+ Utility to identify built-in formats. The following is a list of the formats as
+ returned by this class.
+
+ 0, "General"
+ 1, "0"
+ 2, "0.00"
+ 3, "#,##0"
+ 4, "#,##0.00"
+ 5, "$#,##0_);($#,##0)"
+ 6, "$#,##0_);[Red]($#,##0)"
+ 7, "$#,##0.00);($#,##0.00)"
+ 8, "$#,##0.00_);[Red]($#,##0.00)"
+ 9, "0%"
+ 0xa, "0.00%"
+ 0xb, "0.00E+00"
+ 0xc, "# ?/?"
+ 0xd, "# ??/??"
+ 0xe, "m/d/yy"
+ 0xf, "d-mmm-yy"
+ 0x10, "d-mmm"
+ 0x11, "mmm-yy"
+ 0x12, "h:mm AM/PM"
+ 0x13, "h:mm:ss AM/PM"
+ 0x14, "h:mm"
+ 0x15, "h:mm:ss"
+ 0x16, "m/d/yy h:mm"
+
+ // 0x17 - 0x24 reserved for international and undocumented
+ 0x25, "#,##0_);(#,##0)"
+ 0x26, "#,##0_);[Red](#,##0)"
+ 0x27, "#,##0.00_);(#,##0.00)"
+ 0x28, "#,##0.00_);[Red](#,##0.00)"
+ 0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
+ 0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
+ 0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
+ 0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
+ 0x2d, "mm:ss"
+ 0x2e, "[h]:mm:ss"
+ 0x2f, "mm:ss.0"
+ 0x30, "##0.0E+0"
+ 0x31, "@" - This is text format.
+ 0x31 "text" - Alias for "@"
+
+
+ @author Yegor Kozlov
+
+ Modified 6/17/09 by Stanislav Shor - positive formats don't need starting '('
+
+
+
+ The first user-defined format starts at 164.
+
+
+ @deprecated (May 2009) use {@link #getAll()}
+
+
+ @return array of built-in data formats
+
+
+ Get the format string that matches the given format index
+
+ @param index of a built in format
+ @return string represented at index of format or null if there is not a built-in format at that index
+
+
+ Get the format index that matches the given format string.
+
+
+ Automatically converts "text" to excel's format string to represent text.
+
+ @param pFmt string matching a built-in format
+ @return index of format or -1 if undefined.
+
+
+ High level representation of a cell in a row of a spreadsheet.
+
+ Cells can be numeric, formula-based or string-based (text). The cell type
+ specifies this. String cells cannot conatin numbers and numeric cells cannot
+ contain strings (at least according to our model). Client apps should do the
+ conversions themselves. Formula cells have the formula string, as well as
+ the formula result, which can be numeric or string.
+
+
+ Cells should have their number (0 based) before being Added to a row.
+
+
+
+
+ zero-based column index of a column in a sheet.
+
+
+
+
+ zero-based row index of a row in the sheet that contains this cell
+
+
+
+
+ the sheet this cell belongs to
+
+
+
+
+ the row this cell belongs to
+
+
+
+
+ Set the cells type (numeric, formula or string)
+
+
If the cell currently contains a value, the value will
+ be converted to match the new type, if possible. Formatting
+ is generally lost in the process however.
+
If what you want to do is get a String value for your
+ numeric cell, stop!. This is not the way to do it.
+ Instead, for fetching the string value of a numeric or boolean
+ or date cell, use {@link DataFormatter} instead.
+
+
+
+ Set the cells type (numeric, formula or string)
+
+
+
+
+
+ Only valid for formula cells
+
+
+
+
+ Set a numeric value for the cell
+
+ the numeric value to set this cell to. For formulas we'll set the
+ precalculated value, for numerics we'll set its value. For other types we will change
+ the cell to a numeric cell and set its value.
+
+
+
+
+ Set a error value for the cell
+
+ the error value to set this cell to. For formulas we'll set the
+ precalculated value , for errors we'll set its value. For other types we will change
+ the cell to an error cell and set its value.
+
+
+
+
+ Converts the supplied date to its equivalent Excel numeric value and Sets that into the cell.
+
+ the numeric value to set this cell to. For formulas we'll set the
+ precalculated value, for numerics we'll set its value. For other types we will change
+ the cell to a numerics cell and set its value.
+
+
+
+
+ Set a rich string value for the cell.
+
+ value to set the cell to. For formulas we'll set the formula
+ string, for String cells we'll set its value. For other types we will
+ change the cell to a string cell and set its value.
+ If value is null then we will change the cell to a Blank cell.
+
+
+
+
+ Set a string value for the cell.
+
+ value to set the cell to. For formulas we'll set the formula
+ string, for String cells we'll set its value. For other types we will
+ change the cell to a string cell and set its value.
+ If value is null then we will change the cell to a blank cell.
+
+
+
+
+ Copy the cell to the target index. If the target cell exists, a new cell will be inserted before the existing cell.
+
+ target index
+ the new copied cell object
+
+
+
+ Return a formula for the cell
+
+ if the cell type returned by GetCellType() is not CELL_TYPE_FORMULA
+
+
+
+ Sets formula for this cell.
+
+ the formula to Set, e.g. "SUM(C4:E4)".
+
+
+
+ Get the value of the cell as a number.
+
+ if the cell type returned by GetCellType() is CELL_TYPE_STRING
+ if the cell value isn't a parsable double
+
+
+
+ Get the value of the cell as a date.
+
+ if the cell type returned by GetCellType() is CELL_TYPE_STRING
+ if the cell value isn't a parsable double
+
+
+
+ Get the value of the cell RichTextString
+
+
+
+
+ Get the value of the cell as an error code.
+
+
+
+
+ Get the value of the cell as a string
+
+
+
+
+ Set a bool value for the cell
+
+
+
+
+
+ Get the value of the cell as a bool.
+
+
+
+
+ Return the cell's style.
+
+
+
+
+ Sets this cell as the active cell for the worksheet
+
+
+
+
+ comment associated with this cell
+
+
+
+
+ Removes the comment for this cell, if there is one.
+
+
+
+
+ hyperlink associated with this cell
+
+
+
+
+ Removes the hyperlink for this cell, if there is one.
+
+
+
+
+ Only valid for array formula cells
+
+ range of the array formula group that the cell belongs to.
+
+
+
+ if this cell is part of group of cells having a common array formula.
+
+
+
+ Gets the number of cells in this range.
+ @return height * width
+
+
+ @return the text format of this range. Single cell ranges are formatted
+ like single cell references (e.g. 'A1' instead of 'A1:A1').
+
+
+ @return the cell at relative coordinates (0,0). Never null.
+
+
+ @param relativeRowIndex must be between 0 and height-1
+ @param relativeColumnIndex must be between 0 and width-1
+ @return the cell at the specified coordinates. Never null.
+
+
+ @return a flattened array of all the cells in this {@link CellRange}
+
+
+ @return a 2-D array of all the cells in this {@link CellRange}. The first
+ array dimension is the row index (values 0...height-1)
+ and the second dimension is the column index (values 0...width-1)
+
+
+
+ the Cell should be auto-sized to shrink to fit if the text is too long
+
+
+
+ get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
+ @return unique index number of the underlying record this style represents (probably you don't care
+ unless you're comparing which one is which)
+
+
+ get the index of the format
+ @see DataFormat
+
+
+ Get the format string
+
+
+ set the font for this style
+ @param font a font object Created or retreived from the Workbook object
+ @see Workbook#CreateFont()
+ @see Workbook#GetFontAt(short)
+
+
+ Gets the index of the font for this style
+ @see Workbook#GetFontAt(short)
+
+
+ get whether the cell's using this style are to be hidden
+ @return hidden - whether the cell using this style should be hidden
+
+
+ get whether the cell's using this style are to be locked
+ @return hidden - whether the cell using this style should be locked
+
+
+ get the type of horizontal alignment for the cell
+ @return align - the type of alignment
+ @see #ALIGN_GENERAL
+ @see #ALIGN_LEFT
+ @see #ALIGN_CENTER
+ @see #ALIGN_RIGHT
+ @see #ALIGN_FILL
+ @see #ALIGN_JUSTIFY
+ @see #ALIGN_CENTER_SELECTION
+
+
+ get whether the text should be wrapped
+ @return wrap text or not
+
+
+ get the type of vertical alignment for the cell
+ @return align the type of alignment
+ @see #VERTICAL_TOP
+ @see #VERTICAL_CENTER
+ @see #VERTICAL_BOTTOM
+ @see #VERTICAL_JUSTIFY
+
+
+ get the degree of rotation for the text in the cell
+ @return rotation degrees (between -90 and 90 degrees)
+
+
+ get the number of spaces to indent the text in the cell
+ @return indent - number of spaces
+
+
+ get the type of border to use for the left border of the cell
+ @return border type
+ @see #BORDER_NONE
+ @see #BORDER_THIN
+ @see #BORDER_MEDIUM
+ @see #BORDER_DASHED
+ @see #BORDER_DOTTED
+ @see #BORDER_THICK
+ @see #BORDER_DOUBLE
+ @see #BORDER_HAIR
+ @see #BORDER_MEDIUM_DASHED
+ @see #BORDER_DASH_DOT
+ @see #BORDER_MEDIUM_DASH_DOT
+ @see #BORDER_DASH_DOT_DOT
+ @see #BORDER_MEDIUM_DASH_DOT_DOT
+ @see #BORDER_SLANTED_DASH_DOT
+
+
+ get the type of border to use for the right border of the cell
+ @return border type
+ @see #BORDER_NONE
+ @see #BORDER_THIN
+ @see #BORDER_MEDIUM
+ @see #BORDER_DASHED
+ @see #BORDER_DOTTED
+ @see #BORDER_THICK
+ @see #BORDER_DOUBLE
+ @see #BORDER_HAIR
+ @see #BORDER_MEDIUM_DASHED
+ @see #BORDER_DASH_DOT
+ @see #BORDER_MEDIUM_DASH_DOT
+ @see #BORDER_DASH_DOT_DOT
+ @see #BORDER_MEDIUM_DASH_DOT_DOT
+ @see #BORDER_SLANTED_DASH_DOT
+
+
+ get the type of border to use for the top border of the cell
+ @return border type
+ @see #BORDER_NONE
+ @see #BORDER_THIN
+ @see #BORDER_MEDIUM
+ @see #BORDER_DASHED
+ @see #BORDER_DOTTED
+ @see #BORDER_THICK
+ @see #BORDER_DOUBLE
+ @see #BORDER_HAIR
+ @see #BORDER_MEDIUM_DASHED
+ @see #BORDER_DASH_DOT
+ @see #BORDER_MEDIUM_DASH_DOT
+ @see #BORDER_DASH_DOT_DOT
+ @see #BORDER_MEDIUM_DASH_DOT_DOT
+ @see #BORDER_SLANTED_DASH_DOT
+
+
+ get the type of border to use for the bottom border of the cell
+ @return border type
+ @see #BORDER_NONE
+ @see #BORDER_THIN
+ @see #BORDER_MEDIUM
+ @see #BORDER_DASHED
+ @see #BORDER_DOTTED
+ @see #BORDER_THICK
+ @see #BORDER_DOUBLE
+ @see #BORDER_HAIR
+ @see #BORDER_MEDIUM_DASHED
+ @see #BORDER_DASH_DOT
+ @see #BORDER_MEDIUM_DASH_DOT
+ @see #BORDER_DASH_DOT_DOT
+ @see #BORDER_MEDIUM_DASH_DOT_DOT
+ @see #BORDER_SLANTED_DASH_DOT
+
+
+ get the color to use for the left border
+
+
+ get the color to use for the left border
+ @return the index of the color defInition
+
+
+ get the color to use for the top border
+ @return hhe index of the color defInition
+
+
+ get the color to use for the left border
+ @return the index of the color defInition
+
+
+ get the fill pattern (??) - set to 1 to fill with foreground color
+ @return fill pattern
+
+
+ get the background fill color
+ @return fill color
+
+
+ get the foreground fill color
+ @return fill color
+
+
+ Clones all the style information from another
+ CellStyle, onto this one. This
+ CellStyle will then have all the same
+ properties as the source, but the two may
+ be edited independently.
+ Any stylings on this CellStyle will be lost!
+
+ The source CellStyle could be from another
+ Workbook if you like. This allows you to
+ copy styles from one Workbook to another.
+
+ However, both of the CellStyles will need
+ to be of the same type (HSSFCellStyle or
+ XSSFCellStyle)
+
+
+
+ Gets or sets the color to use for the diagional border
+
+ The index of the color definition.
+
+
+
+ Gets or sets the line type to use for the diagional border
+
+ The line type.
+
+
+
+ Gets or sets the type of diagional border
+ .
+ The border diagional type.
+
+
+ Gets the color object representing the current
+ background fill, resolving indexes using
+ the supplied workbook.
+ This will work for both indexed and rgb
+ defined colors.
+
+
+ Gets the color object representing the current
+ foreground fill, resolving indexes using
+ the supplied workbook.
+ This will work for both indexed and rgb
+ defined colors.
+
+
+ Mimics the 'data view' of a cell. This allows formula Evaluator
+ to return a CellValue instead of precasting the value to String
+ or Number or bool type.
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+
+
+ @return Returns the boolValue.
+
+
+ @return Returns the numberValue.
+
+
+ @return Returns the stringValue.
+
+
+ @return Returns the cellType.
+
+
+ @return Returns the errorValue.
+
+
+ High level representation of a chart.
+
+ @author Roman Kashitsyn
+
+
+ @return an appropriate ChartDataFactory implementation
+
+
+ @return an appropriate ChartAxisFactory implementation
+
+
+ @return chart legend instance
+
+
+ Delete current chart legend.
+
+
+ @return list of all chart axis
+
+
+ Plots specified data on the chart.
+
+ @param data a data to plot
+
+
+ Move and Resize With Anchor Cells
+
+ Specifies that the current drawing shall move and
+ resize to maintain its row and column anchors (i.e. the
+ object is anchored to the actual from and to row and column)
+
+
+
+ Move With Cells but Do Not Resize
+
+ Specifies that the current drawing shall move with its
+ row and column (i.e. the object is anchored to the
+ actual from row and column), but that the size shall remain absolute.
+
+
+ If Additional rows/columns are Added between the from and to locations of the drawing,
+ the drawing shall move its to anchors as needed to maintain this same absolute size.
+
+
+
+ Do Not Move or Resize With Underlying Rows/Columns
+
+ Specifies that the current start and end positions shall
+ be maintained with respect to the distances from the
+ absolute start point of the worksheet.
+
+
+ If Additional rows/columns are Added before the
+ drawing, the drawing shall move its anchors as needed
+ to maintain this same absolute position.
+
+
+
+ A client anchor is attached to an excel worksheet. It anchors against a
+ top-left and bottom-right cell.
+
+ @author Yegor Kozlov
+
+
+ Returns the column (0 based) of the first cell.
+
+ @return 0-based column of the first cell.
+
+
+ Returns the column (0 based) of the second cell.
+
+ @return 0-based column of the second cell.
+
+
+ Returns the row (0 based) of the first cell.
+
+ @return 0-based row of the first cell.
+
+
+ Returns the row (0 based) of the second cell.
+
+ @return 0-based row of the second cell.
+
+
+ Returns the x coordinate within the first cell
+
+ @return the x coordinate within the first cell
+
+
+ Returns the y coordinate within the first cell
+
+ @return the y coordinate within the first cell
+
+
+ Sets the y coordinate within the second cell
+
+ @return the y coordinate within the second cell
+
+
+ Returns the x coordinate within the second cell
+
+ @return the x coordinate within the second cell
+
+
+ s the anchor type
+
+ 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.
+
+ @return the anchor type
+ @see #MOVE_AND_RESIZE
+ @see #MOVE_DONT_RESIZE
+ @see #DONT_MOVE_AND_RESIZE
+
+
+ Sets whether this comment is visible.
+
+ @return true if the comment is visible, false otherwise
+
+
+ Return the row of the cell that Contains the comment
+
+ @return the 0-based row of the cell that Contains the comment
+
+
+ Return the column of the cell that Contains the comment
+
+ @return the 0-based column of the cell that Contains the comment
+
+
+ Name of the original comment author
+
+ @return the name of the original author of the comment
+
+
+ Fetches the rich text string of the comment
+
+
+ Return defines position of this anchor in the sheet.
+
+ @return defines position of this anchor in the sheet
+
+
+ The conditional format operators used for "Highlight Cells That Contain..." rules.
+
+ For example, "highlight cells that begin with "M2" and contain "Mountain Gear".
+
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+
+
+ 'Between' operator
+
+
+ 'Not between' operator
+
+
+ 'Equal to' operator
+
+
+ 'Not equal to' operator
+
+
+ 'Greater than' operator
+
+
+ 'Less than' operator
+
+
+ 'Greater than or equal to' operator
+
+
+ 'Less than or equal to' operator
+
+
+ The ConditionalFormatting class encapsulates all Settings of Conditional Formatting.
+
+ The class can be used
+
+
+
+ to make a copy ConditionalFormatting Settings.
+
+ or to modify existing Conditional Formatting Settings (formatting regions and/or rules).
+
+
+
+ Use {@link NPOI.HSSF.UserModel.Sheet#getSheetConditionalFormatting()} to Get access to an instance of this class.
+
+ To create a new Conditional Formatting Set use the following approach:
+
+
+
+ // Define a Conditional Formatting rule, which triggers formatting
+ // when cell's value is greater or equal than 100.0 and
+ // applies patternFormatting defined below.
+ ConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule(
+ ComparisonOperator.GE,
+ "100.0", // 1st formula
+ null // 2nd formula is not used for comparison operator GE
+ );
+
+ // Create pattern with red background
+ PatternFormatting patternFmt = rule.CretePatternFormatting();
+ patternFormatting.FillBackgroundColor(IndexedColor.RED.Index);
+
+ // Define a region Containing first column
+ Region [] regions =
+ {
+ new Region(1,(short)1,-1,(short)1)
+ };
+
+ // Apply Conditional Formatting rule defined above to the regions
+ sheet.AddConditionalFormatting(regions, rule);
+
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+
+
+ @return array of CellRangeAddresss. Never null
+
+
+ Replaces an existing Conditional Formatting rule at position idx.
+ Excel allows to create up to 3 Conditional Formatting rules.
+ This method can be useful to modify existing Conditional Formatting rules.
+
+ @param idx position of the rule. Should be between 0 and 2.
+ @param cfRule - Conditional Formatting rule
+
+
+ Add a Conditional Formatting rule.
+ Excel allows to create up to 3 Conditional Formatting rules.
+
+ @param cfRule - Conditional Formatting rule
+
+
+ @return the Conditional Formatting rule at position idx.
+
+
+ @return number of Conditional Formatting rules.
+
+
+
+ Allow accessing the Initial value.
+
+
+
+ This conditional formatting rule Compares a cell value
+ to a formula calculated result, using an operator
+
+
+ This conditional formatting rule Contains a formula to Evaluate.
+ When the formula result is true, the cell is highlighted.
+
+
+ Represents a description of a conditional formatting rule
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+
+
+ Create a new border formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - border formatting object, never returns null.
+
+
+ @return - border formatting object if defined, null otherwise
+
+
+ Create a new font formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - font formatting object, never returns null.
+
+
+ @return - font formatting object if defined, null otherwise
+
+
+ Create a new pattern formatting structure if it does not exist,
+ otherwise just return existing object.
+
+ @return - pattern formatting object, never returns null.
+
+
+ @return - pattern formatting object if defined, null otherwise
+
+
+ Type of conditional formatting rule.
+
+ MUST be either {@link #CONDITION_TYPE_CELL_VALUE_IS} or {@link #CONDITION_TYPE_FORMULA}
+
+
+ @return the type of condition
+
+
+ The comparison function used when the type of conditional formatting is Set to
+ {@link #CONDITION_TYPE_CELL_VALUE_IS}
+
+ MUST be a constant from {@link ComparisonOperator}
+
+
+ @return the conditional format operator
+
+
+ The formula used to Evaluate the first operand for the conditional formatting rule.
+
+ If the condition type is {@link #CONDITION_TYPE_CELL_VALUE_IS},
+ this field is the first operand of the comparison.
+ If type is {@link #CONDITION_TYPE_FORMULA}, this formula is used
+ to determine if the conditional formatting is applied.
+
+
+ If comparison type is {@link #CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function
+
+
+ @return the first formula
+
+
+ The formula used to Evaluate the second operand of the comparison when
+ comparison type is {@link #CONDITION_TYPE_CELL_VALUE_IS} and operator
+ is either {@link ComparisonOperator#BETWEEN} or {@link ComparisonOperator#NOT_BETWEEN}
+
+ @return the second formula
+
+
+ An object that handles instantiating concrete
+ classes of the various instances one needs for
+ HSSF and XSSF.
+ Works around a major shortcoming in Java, where we
+ can't have static methods on interfaces or abstract
+ classes.
+ This allows you to get the appropriate class for
+ a given interface, without you having to worry
+ about if you're dealing with HSSF or XSSF, despite
+ Java being quite rubbish.
+
+
+ Creates a new RichTextString instance
+ @param text The text to Initialise the RichTextString with
+
+
+ Creates a new DataFormat instance
+
+
+ Creates a new Hyperlink, of the given type
+
+
+ Creates FormulaEvaluator - an object that Evaluates formula cells.
+
+ @return a FormulaEvaluator instance
+
+
+ get the format index that matches the given format string.
+ Creates a new format if one is not found. Aliases text to the proper format.
+ @param format string matching a built in format
+ @return index of format.
+
+
+ get the format string that matches the given format index
+ @param index of a format
+ @return string represented at index of format or null if there is not a format at that index
+
+
+ HSSFDataFormatter contains methods for Formatting the value stored in an
+ Cell. This can be useful for reports and GUI presentations when you
+ need to display data exactly as it appears in Excel. Supported Formats
+ include currency, SSN, percentages, decimals, dates, phone numbers, zip
+ codes, etc.
+
+ Internally, Formats will be implemented using subclasses of
+ such as and . Therefore the
+ Formats used by this class must obey the same pattern rules as these FormatBase
+ subclasses. This means that only legal number pattern characters ("0", "#",
+ ".", "," etc.) may appear in number formats. Other characters can be
+ inserted before or after the number pattern to form a
+ prefix or suffix.
+
+
+ For example the Excel pattern "$#,##0.00 "USD"_);($#,##0.00 "USD")"
+ will be correctly Formatted as "$1,000.00 USD" or "($1,000.00 USD)".
+ However the pattern "00-00-00" is incorrectly Formatted by
+ DecimalFormat as "000000--". For Excel Formats that are not compatible with
+ DecimalFormat, you can provide your own custom {@link FormatBase} implementation
+ via HSSFDataFormatter.AddFormat(String,FormatBase). The following
+ custom Formats are already provided by this class:
+
+
+
SSN "000-00-0000"
+
Phone Number "(###) ###-####"
+
Zip plus 4 "00000-0000"
+
+
+
+ If the Excel FormatBase pattern cannot be Parsed successfully, then a default
+ FormatBase will be used. The default number FormatBase will mimic the Excel General
+ FormatBase: "#" for whole numbers and "#.##########" for decimal numbers. You
+ can override the default FormatBase pattern with
+ HSSFDataFormatter.setDefaultNumberFormat(FormatBase). Note: the
+ default FormatBase will only be used when a FormatBase cannot be Created from the
+ cell's data FormatBase string.
+
+ @author James May (james dot may at fmr dot com)
+
+
+
+ Pattern to find a number FormatBase: "0" or "#"
+
+
+ Pattern to find "AM/PM" marker
+
+
+ A regex to find patterns like [$$-1009] and [$�-452].
+ Note that we don't currently process these into locales
+
+
+ A regex to identify a fraction pattern.
+ This requires that replaceAll("\\?", "#") has already been called
+
+
+ A regex to strip junk out of fraction formats
+
+
+ * Cells formatted with a date or time format and which contain invalid date or time values
+ * show 255 pound signs ("#").
+
+
+ General FormatBase for whole numbers.
+
+
+ General FormatBase for decimal numbers.
+
+
+ A default FormatBase to use when a number pattern cannot be Parsed.
+
+
+ Creates a formatter using the {@link Locale#getDefault() default locale}.
+
+
+ Constructor
+
+
+ Creates a formatter using the given locale.
+
+ @param emulateCsv whether to emulate CSV output.
+
+
+ Return a FormatBase for the given cell if one exists, otherwise try to
+ Create one. This method will return null if the any of the
+ following is true:
+
+
the cell's style is null
+
the style's data FormatBase string is null or empty
+
the FormatBase string cannot be recognized as either a number or date
+
+
+ @param cell The cell to retrieve a FormatBase for
+ @return A FormatBase for the FormatBase String
+
+
+ Create and return a FormatBase based on the FormatBase string from a cell's
+ style. If the pattern cannot be Parsed, return a default pattern.
+
+ @param cell The Excel cell
+ @return A FormatBase representing the excel FormatBase. May return null.
+
+
+ Return true if the double value represents a whole number
+ @param d the double value to check
+ @return true if d is a whole number
+
+
+ Returns a default FormatBase for a cell.
+ @param cell The cell
+ @return a default FormatBase
+
+
+ Returns the Formatted value of an Excel date as a String based
+ on the cell's DataFormat. i.e. "Thursday, January 02, 2003"
+ , "01/02/2003" , "02-Jan" , etc.
+
+ @param cell The cell
+ @return a Formatted date string
+
+
+ Returns the Formatted value of an Excel number as a String
+ based on the cell's DataFormat. Supported Formats include
+ currency, percents, decimals, phone number, SSN, etc.:
+ "61.54%", "$100.00", "(800) 555-1234".
+
+ @param cell The cell
+ @return a Formatted number string
+
+
+ Formats the given raw cell value, based on the supplied
+ FormatBase index and string, according to excel style rules.
+ @see #FormatCellValue(Cell)
+
+
+ Performs Excel-style date formatting, using the
+ supplied Date and format
+
+
+ Formats the given raw cell value, based on the supplied
+ format index and string, according to excel style rules.
+ @see #formatCellValue(Cell)
+
+
+
+ Returns the Formatted value of a cell as a String regardless
+ of the cell type. If the Excel FormatBase pattern cannot be Parsed then the
+ cell value will be Formatted using a default FormatBase.
+
+ When passed a null or blank cell, this method will return an empty
+ String (""). Formulas in formula type cells will not be evaluated.
+
+
+ @param cell The cell
+ @return the Formatted cell value as a String
+
+
+
+ Returns the Formatted value of a cell as a String regardless
+ of the cell type. If the Excel FormatBase pattern cannot be Parsed then the
+ cell value will be Formatted using a default FormatBase.
+
+ When passed a null or blank cell, this method will return an empty
+ String (""). Formula cells will be evaluated using the given
+ {@link HSSFFormulaEvaluator} if the evaluator is non-null. If the
+ evaluator is null, then the formula String will be returned. The caller
+ is responsible for setting the currentRow on the evaluator
+
+
+ @param cell The cell (can be null)
+ @param evaluator The HSSFFormulaEvaluator (can be null)
+ @return a string value of the cell
+
+
+
+ Sets a default number FormatBase to be used when the Excel FormatBase cannot be
+ Parsed successfully. Note: This is a fall back for when an error
+ occurs while parsing an Excel number FormatBase pattern. This will not
+ affect cells with the General FormatBase.
+
+
+ The value that will be passed to the FormatBase's FormatBase method (specified
+ by java.text.FormatBase#FormatBase) will be a double value from a
+ numeric cell. Therefore the code in the FormatBase method should expect a
+ Number value.
+
+
+ @param FormatBase A FormatBase instance to be used as a default
+ @see java.text.FormatBase#FormatBase
+
+
+ Adds a new FormatBase to the available formats.
+
+ The value that will be passed to the FormatBase's FormatBase method (specified
+ by java.text.FormatBase#FormatBase) will be a double value from a
+ numeric cell. Therefore the code in the FormatBase method should expect a
+ Number value.
+
+ @param excelformatStr The data FormatBase string
+ @param FormatBase A FormatBase instance
+
+
+ Error style constants for error box
+
+
+ STOP style
+
+
+ WARNING style
+
+
+ INFO style
+
+
+
+ get or set the error style for error box
+
+
+
+
+ Setting this allows an empty object as a valid value. Retrieve the settings for empty cells allowed.
+ @return True if this object should treats empty as valid value , false otherwise
+
+ true if this object should treats empty as valid value, false otherwise
+
+
+
+ Useful for list validation objects .
+ Useful only list validation objects . This method always returns false if the object isn't a list validation object
+
+
+
+ Sets the behaviour when a cell which belongs to this object is selected
+
+ true if an prompt box should be displayed , false otherwise
+
+
+ Sets the behaviour when an invalid value is entered
+
+ true if an error box should be displayed , false otherwise
+
+
+ Sets the title and text for the prompt box . Prompt box is displayed when
+ the user selects a cell which belongs to this validation object . In
+ order for a prompt box to be displayed you should also use method
+ SetShowPromptBox( bool show )
+
+ @param title The prompt box's title
+ @param text The prompt box's text
+
+
+ @return Prompt box's title or null
+
+
+ @return Prompt box's text or null
+
+
+ Sets the title and text for the error box . Error box is displayed when
+ the user enters an invalid value int o a cell which belongs to this
+ validation object . In order for an error box to be displayed you should
+ also use method SetShowErrorBox( bool show )
+
+ @param title The error box's title
+ @param text The error box's text
+
+
+ @return Error box's title or null
+
+
+ @return Error box's text or null
+
+
+ @return data validation type of this constraint
+ @see ValidationType
+
+
+ @return the operator used for this constraint
+ @see OperatorType
+
+ get or set then comparison operator for this constraint
+
+
+
+
+ get or set the formula for expression 1. May be null
+
+
+
+
+ get or set the formula for expression 2. May be null
+
+
+
+ ValidationType enum
+
+
+ 'Any value' type - value not restricted
+
+
+ int ('Whole number') type
+
+
+ Decimal type
+
+
+ List type ( combo box type )
+
+
+ Date type
+
+
+ Time type
+
+
+ String length type
+
+
+ Formula ( 'Custom' ) type
+
+
+ Condition operator enum
+
+
+ default value to supply when the operator type is not used
+
+
+ @author Radhakrishnan J
+
+
+
+
+ Contains methods for dealing with Excel dates.
+ @author Michael Harhen
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Dan Sherman (dsherman at Isisph.com)
+ @author Hack Kampbjorn (hak at 2mba.dk)
+ @author Alex Jacoby (ajacoby at gmail.com)
+ @author Pavel Krupets (pkrupets at palmtreebusiness dot com)
+ @author Thies Wellpott
+
+
+
+ The following patterns are used in {@link #isADateFormat(int, String)}
+
+
+
+ Given a Calendar, return the number of days since 1899/12/31.
+
+ the date
+ if set to true [use1904windowing].
+ number of days since 1899/12/31
+
+
+
+ Given a Date, Converts it into a double representing its internal Excel representation,
+ which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds.
+
+ Excel representation of Date (-1 if error - test for error by Checking for less than 0.1)
+ the Date
+
+
+
+ Gets the excel date.
+
+ The year.
+ The month.
+ The day.
+ The hour.
+ The minute.
+ The second.
+ Should 1900 or 1904 date windowing be used?
+
+
+
+
+ Given a Date, Converts it into a double representing its internal Excel representation,
+ which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds.
+
+ The date.
+ Should 1900 or 1904 date windowing be used?
+ Excel representation of Date (-1 if error - test for error by Checking for less than 0.1)
+
+
+
+ Given an Excel date with using 1900 date windowing, and converts it to a java.util.Date.
+ Excel Dates and Times are stored without any timezone
+ information. If you know (through other means) that your file
+ uses a different TimeZone to the system default, you can use
+ this version of the getJavaDate() method to handle it.
+
+ The Excel date.
+ null if date is not a valid Excel date
+
+
+ Given an Excel date with either 1900 or 1904 date windowing,
+ Converts it to a Date.
+
+ NOTE: If the default TimeZone in Java uses Daylight
+ Saving Time then the conversion back to an Excel date may not give
+ the same value, that Is the comparison
+ excelDate == GetExcelDate(GetJavaDate(excelDate,false))
+ Is not always true. For example if default timezone Is
+ Europe/Copenhagen, on 2004-03-28 the minute after
+ 01:59 CET Is 03:00 CEST, if the excel date represents a time between
+ 02:00 and 03:00 then it Is Converted to past 03:00 summer time
+
+ @param date The Excel date.
+ @param use1904windowing true if date uses 1904 windowing,
+ or false if using 1900 date windowing.
+ @return Java representation of the date, or null if date Is not a valid Excel date
+ @see TimeZone
+
+
+ Given an Excel date with either 1900 or 1904 date windowing,
+ converts it to a java.util.Date.
+
+ Excel Dates and Times are stored without any timezone
+ information. If you know (through other means) that your file
+ uses a different TimeZone to the system default, you can use
+ this version of the getJavaDate() method to handle it.
+
+ @param date The Excel date.
+ @param tz The TimeZone to evaluate the date in
+ @param use1904windowing true if date uses 1904 windowing,
+ or false if using 1900 date windowing.
+ @return Java representation of the date, or null if date is not a valid Excel date
+
+
+ Given an Excel date with either 1900 or 1904 date windowing,
+ converts it to a java.util.Date.
+
+ Excel Dates and Times are stored without any timezone
+ information. If you know (through other means) that your file
+ uses a different TimeZone to the system default, you can use
+ this version of the getJavaDate() method to handle it.
+
+ @param date The Excel date.
+ @param tz The TimeZone to evaluate the date in
+ @param use1904windowing true if date uses 1904 windowing,
+ or false if using 1900 date windowing.
+ @param roundSeconds round to closest second
+ @return Java representation of the date, or null if date is not a valid Excel date
+
+
+ Get EXCEL date as Java Calendar with given time zone.
+ @param date The Excel date.
+ @param use1904windowing true if date uses 1904 windowing,
+ or false if using 1900 date windowing.
+ @param timeZone The TimeZone to evaluate the date in
+ @return Java representation of the date, or null if date is not a valid Excel date
+
+
+
+ Get EXCEL date as Java Calendar (with default time zone). This is like GetJavaDate(double, boolean) but returns a Calendar object.
+
+ The Excel date.
+ true if date uses 1904 windowing, or false if using 1900 date windowing.
+
+ null if date is not a valid Excel date
+
+
+
+ Converts a string of format "HH:MM" or "HH:MM:SS" to its (Excel) numeric equivalent
+
+ The time STR.
+ a double between 0 and 1 representing the fraction of the day
+
+
+
+ Converts the time internal.
+
+ The time STR.
+
+
+
+
+ Given a format ID and its format String, will Check to see if the
+ format represents a date format or not.
+ Firstly, it will Check to see if the format ID corresponds to an
+ internal excel date format (eg most US date formats)
+ If not, it will Check to see if the format string only Contains
+ date formatting Chars (ymd-/), which covers most
+ non US date formats.
+
+ The index of the format, eg from ExtendedFormatRecord.GetFormatIndex
+ The format string, eg from FormatRecord.GetFormatString
+
+ true if [is A date format] [the specified format index]; otherwise, false.
+
+
+
+
+ Converts a string of format "YYYY/MM/DD" to its (Excel) numeric equivalent
+
+ The date STR.
+ a double representing the (integer) number of days since the start of the Excel epoch
+
+
+
+ Parses the YYYYMMDD date internal.
+
+ The time string.
+
+
+
+
+ Parses the int.
+
+ The string value.
+ Name of the field.
+ The range max.
+
+
+
+
+ Parses the int.
+
+ The STR val.
+ Name of the field.
+ The lower limit.
+ The upper limit.
+
+
+
+
+ Given a format ID this will Check whether the format represents an internal excel date format or not.
+
+ The format.
+
+
+
+ Check if a cell Contains a date
+ Since dates are stored internally in Excel as double values
+ we infer it Is a date if it Is formatted as such.
+
+ The cell.
+
+
+
+ Check if a cell contains a date, Checking only for internal excel date formats.
+ As Excel stores a great many of its dates in "non-internal" date formats, you will not normally want to use this method.
+
+ The cell.
+
+
+
+ Given a double, Checks if it Is a valid Excel date.
+
+ the double value.
+
+ true if [is valid excel date] [the specified value]; otherwise, false.
+
+
+
+ @author Yegor Kozlov
+
+
+ Creates a picture.
+ @param anchor the client anchor describes how this picture is
+ attached to the sheet.
+ @param pictureIndex the index of the picture in the workbook collection
+ of pictures.
+
+ @return the newly created picture.
+
+
+ Creates a comment.
+ @param anchor the client anchor describes how this comment is attached
+ to the sheet.
+ @return the newly created comment.
+
+
+ Creates a chart.
+ @param anchor the client anchor describes how this chart is attached to
+ the sheet.
+ @return the newly created chart
+
+
+ Creates a new client anchor and sets the top-left and bottom-right
+ coordinates of the anchor.
+
+ @param dx1 the x coordinate in EMU within the first cell.
+ @param dy1 the y coordinate in EMU within the first cell.
+ @param dx2 the x coordinate in EMU within the second cell.
+ @param dy2 the y coordinate in EMU within the second cell.
+ @param col1 the column (0 based) of the first cell.
+ @param row1 the row (0 based) of the first cell.
+ @param col2 the column (0 based) of the second cell.
+ @param row2 the row (0 based) of the second cell.
+ @return the newly created client anchor
+
+
+ Contains raw Excel error codes (as defined in OOO's excelfileformat.pdf (2.5.6)
+
+ @author Michael Harhen
+
+
+ #NULL! - Intersection of two cell ranges is empty
+
+
+ #DIV/0! - Division by zero
+
+
+ #VALUE! - Wrong type of operand
+
+
+ #REF! - Illegal or deleted cell reference
+
+
+ #NAME? - Wrong function or range name
+
+
+ #NUM! - Value range overflow
+
+
+ #N/A - Argument or function not available
+
+
+ @return Standard Excel error literal for the specified error code.
+ @throws ArgumentException if the specified error code is not one of the 7
+ standard error codes
+
+
+ @return true if the specified error code is a standard Excel error code.
+
+
+ A wrapper around a {@link SimpleDateFormat} instance,
+ which handles a few Excel-style extensions that
+ are not supported by {@link SimpleDateFormat}.
+ Currently, the extensions are around the handling
+ of elapsed time, eg rendering 1 day 2 hours
+ as 26 hours.
+
+
+ Takes a format String, and Replaces Excel specific bits
+ with our detection sequences
+
+
+ Used to let us know what the date being
+ formatted is, in Excel terms, which we
+ may wish to use when handling elapsed
+ times.
+
+
+ not underlined
+
+
+ single (normal) underline
+
+
+ double underlined
+
+
+ accounting style single underline
+
+
+ accounting style double underline
+
+
+ no type Offsetting (not super or subscript)
+
+
+ superscript
+
+
+ subscript
+
+
+
+ Allow accessing the Initial value.
+
+
+
+ normal type of black color.
+
+
+ Dark Red color
+
+
+
+ Allow accessing the Initial value.
+
+
+
+ Normal boldness (not bold)
+
+
+ Bold boldness (bold)
+
+
+
+ get the name for the font (i.e. Arial)
+
+
+
+
+ Get the font height in unit's of 1/20th of a point.
+
+
+ Maybe you might want to use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
+
+
+
+
+
+ Get the font height in points.
+
+
+ This will return the same font height that is shown in Excel, such as 10 or 14 or 28.
+
+
+
+
+
+ get whether to use italics or not
+
+
+
+
+ get whether to use a strikeout horizontal line through the text or not
+
+
+
+ get the color for the font
+ @return color to use
+ @see #COLOR_NORMAL
+ @see #COLOR_RED
+ @see NPOI.HSSF.usermodel.HSSFPalette#GetColor(short)
+
+
+
+ get type of text underlining to use
+
+
+
+
+ get type of text underlining to use
+
+
+
+ get character-set to use.
+ @return character-set
+ @see #ANSI_CHARSET
+ @see #DEFAULT_CHARSET
+ @see #SYMBOL_CHARSET
+
+
+ get the index within the XSSFWorkbook (sequence within the collection of Font objects)
+
+ @return unique index number of the underlying record this Font represents (probably you don't care
+ unless you're comparing which one is which)
+
+
+
+ Copies the style from another font into this one
+
+
+
+ Charset represents the basic set of characters associated with a font (that it can display), and
+ corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language.
+
+ @author Gisella Bronzetti
+
+
+ Returns value of this charset
+
+ @return value of this charset
+
+
+ The font family this font belongs to. A font family is a set of fonts having common stroke width and serif
+ characteristics. The font name overrides when there are conflicting values.
+
+ @author Gisella Bronzetti
+
+
+ Returns index of this font family
+
+ @return index of this font family
+
+
+ High level representation for Font Formatting component
+ of Conditional Formatting Settings
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+
+
+
+ get or set the type of super or subscript for the font
+
+
+
+
+ get or set font color index
+
+
+
+
+ get or set the height of the font in 1/20th point units
+
+
+
+
+ get or set the type of underlining for the font
+
+
+
+ Get whether the font weight is Set to bold or not
+
+ @return bold - whether the font is bold or not
+
+
+ @return true if font style was Set to italic
+
+
+ Set font style options.
+
+ @param italic - if true, Set posture style to italic, otherwise to normal
+ @param bold if true, Set font weight to bold, otherwise to normal
+
+
+ Set font style options to default values (non-italic, non-bold)
+
+
+ Defines the font scheme to which this font belongs.
+ When a font defInition is part of a theme defInition, then the font is categorized as either a major or minor font scheme component.
+ When a new theme is chosen, every font that is part of a theme defInition is updated to use the new major or minor font defInition for that
+ theme.
+ Usually major fonts are used for styles like headings, and minor fonts are used for body and paragraph text.
+
+ @author Gisella Bronzetti
+
+
+
+ Common defInition of a HSSF or XSSF page footer.
+ For a list of all the different fields that can be
+ placed into a footer, such as page number,
+ bold, underline etc, see
+
+
+
+ Enumerates error values in SpreadsheetML formula calculations.
+
+ See also OOO's excelfileformat.pdf (2.5.6)
+
+
+ Intended to indicate when two areas are required to intersect, but do not.
+
Example:
+ In the case of SUM(B1 C1), the space between B1 and C1 is treated as the binary
+ intersection operator, when a comma was intended. end example]
+
+
+
+ Intended to indicate when any number, including zero, is divided by zero.
+ Note: However, any error code divided by zero results in that error code.
+
+
+ Intended to indicate when an incompatible type argument is passed to a function, or
+ an incompatible type operand is used with an operator.
+
Example:
+ In the case of a function argument, text was expected, but a number was provided
+
+
+
+ Intended to indicate when a cell reference is invalid.
+
Example:
+ If a formula Contains a reference to a cell, and then the row or column Containing that cell is deleted,
+ a #REF! error results. If a worksheet does not support 20,001 columns,
+ OFFSET(A1,0,20000) will result in a #REF! error.
+
+
+
+ Intended to indicate when an argument to a function has a compatible type, but has a
+ value that is outside the domain over which that function is defined. (This is known as
+ a domain error.)
+
Example:
+ Certain calls to ASIN, ATANH, FACT, and SQRT might result in domain errors.
+
+ Intended to indicate that the result of a function cannot be represented in a value of
+ the specified type, typically due to extreme magnitude. (This is known as a range
+ error.)
+
Example: FACT(1000) might result in a range error.
+
+
+ Intended to indicate when a designated value is not available.
+
Example:
+ Some functions, such as SUMX2MY2, perform a series of operations on corresponding
+ elements in two arrays. If those arrays do not have the same number of elements, then
+ for some elements in the longer array, there are no corresponding elements in the
+ shorter one; that is, one or more values in the shorter array are not available.
+
+ This error value can be produced by calling the function NA
+
+
+ POI specific code to indicate that there is a circular reference
+ in the formula
+
+
+ POI specific code to indicate that the funcition required is
+ not implemented in POI
+
+
+ @return numeric code of the error
+
+
+ @return long (internal) numeric code of the error
+
+
+ @return string representation of the error
+
+
+ Evaluates formula cells.
+
+ For performance reasons, this class keeps a cache of all previously calculated intermediate
+ cell values. Be sure to call {@link #ClearAllCachedResultValues()} if any workbook cells are Changed between
+ calls to Evaluate~ methods on this class.
+
+ @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ @author Josh Micich
+
+
+ Should be called whenever there are Changes to input cells in the Evaluated workbook.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the Evaluate~ methods of this class
+
+
+ Should be called to tell the cell value cache that the specified (value or formula) cell
+ has Changed.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the Evaluate~ methods of this class
+
+
+ Should be called to tell the cell value cache that the specified cell has just become a
+ formula cell, or the formula text has Changed
+
+
+ Should be called to tell the cell value cache that the specified (value or formula) cell
+ has changed.
+ Failure to call this method after changing cell values will cause incorrect behaviour
+ of the evaluate~ methods of this class
+
+
+ If cell Contains a formula, the formula is Evaluated and returned,
+ else the CellValue simply copies the appropriate cell value from
+ the cell and also its cell type. This method should be preferred over
+ EvaluateInCell() when the call should not modify the contents of the
+ original cell.
+ @param cell
+
+
+ Loops over all cells in all sheets of the associated workbook.
+ For cells that contain formulas, their formulas are evaluated,
+ and the results are saved. These cells remain as formula cells.
+ For cells that do not contain formulas, no changes are made.
+ This is a helpful wrapper around looping over all cells, and
+ calling evaluateFormulaCell on each one.
+
+
+ If cell Contains formula, it Evaluates the formula,
+ and saves the result of the formula. The cell
+ remains as a formula cell.
+ Else if cell does not contain formula, this method leaves
+ the cell unChanged.
+ Note that the type of the formula result is returned,
+ so you know what kind of value is also stored with
+ the formula.
+
+ int EvaluatedCellType = Evaluator.evaluateFormulaCell(cell);
+
+ Be aware that your cell will hold both the formula,
+ and the result. If you want the cell Replaced with
+ the result of the formula, use {@link #EvaluateInCell(Cell)}
+ @param cell The cell to Evaluate
+ @return The type of the formula result, i.e. -1 if the cell is not a formula,
+ or one of Cell.CELL_TYPE_NUMERIC, Cell.CELL_TYPE_STRING, Cell.CELL_TYPE_BOOLEAN, Cell.CELL_TYPE_ERROR
+ Note: the cell's type remains as Cell.CELL_TYPE_FORMULA however.
+
+
+ If cell Contains formula, it Evaluates the formula, and
+ Puts the formula result back into the cell, in place
+ of the old formula.
+ Else if cell does not contain formula, this method leaves
+ the cell unChanged.
+ Note that the same instance of Cell is returned to
+ allow chained calls like:
+
+ int EvaluatedCellType = Evaluator.evaluateInCell(cell).getCellType();
+
+ Be aware that your cell value will be Changed to hold the
+ result of the formula. If you simply want the formula
+ value comPuted for you, use {@link #EvaluateFormulaCell(Cell)}
+ @param cell
+
+
+ Sets up the Formula Evaluator to be able to reference and resolve
+ links to other workbooks, eg [Test.xls]Sheet1!A1.
+ For a workbook referenced as [Test.xls]Sheet1!A1, you should
+ supply a map containing the key Test.xls (no square brackets),
+ and an open FormulaEvaluator onto that Workbook.
+ @param otherWorkbooks Map of workbook names (no square brackets) to an evaluator on that workbook
+
+
+ Whether to ignore missing references to external workbooks and
+ use cached formula results in the main workbook instead.
+
+ In some cases external workbooks referenced by formulas in the main workbook are not available.
+ With this method you can control how POI handles such missing references:
+
+
by default ignoreMissingWorkbooks=false and POI throws
+ {@link org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException}
+ if an external reference cannot be resolved
+
if ignoreMissingWorkbooks=true then POI uses cached formula result
+ that already exists in the main workbook
+
+
+ @param ignore whether to ignore missing references to external workbooks
+
+
+ * Perform detailed output of formula evaluation for next evaluation only?
+ * Is for developer use only (also developers using POI for their XLS files).
+ * Log-Level WARN is for basic info, INFO for detailed information. These quite
+ * high levels are used because you have to explicitly enable this specific logging.
+
+ * @param value whether to perform detailed output
+
+
+
+ Common defInition of a HSSF or XSSF page header.
+ For a list of all the different fields that can be
+ placed into a header, such as page number,
+ bold, underline etc, see
+
+
+
+
+ Common interface for NPOI.SS.UserModel.Header and NPOI.SS.UserModel.Footer
+
+
+
+
+ Gets or sets the left side of the header or footer.
+
+ The string representing the left side.
+
+
+
+ Gets or sets the center of the header or footer.
+
+ The string representing the center.
+
+
+
+ Gets or sets the right side of the header or footer.
+
+ The string representing the right side.
+
+
+ The enumeration value indicating horizontal alignment of a cell,
+ i.e., whether it is aligned general, left, right, horizontally centered, Filled (replicated),
+ justified, centered across multiple cells, or distributed.
+
+
+ The horizontal alignment is general-aligned. Text data is left-aligned.
+ Numbers, dates, and times are rightaligned. Boolean types are centered.
+ Changing the alignment does not change the type of data.
+
+
+ The horizontal alignment is left-aligned, even in Rightto-Left mode.
+ Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of
+ the cell is indented from the left by the specified number of character spaces. The character spaces are
+ based on the default font and font size for the workbook.
+
+
+ The horizontal alignment is centered, meaning the text is centered across the cell.
+
+
+ The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell,
+ even in Right-to-Left mode.
+
+
+ The horizontal alignment is justified (flush left and right).
+ For each line of text, aligns each line of the wrapped text in a cell to the right and left
+ (except the last line). If no single line of text wraps in the cell, then the text is not justified.
+
+
+ Indicates that the value of the cell should be Filled
+ across the entire width of the cell. If blank cells to the right also have the fill alignment,
+ they are also Filled with the value, using a convention similar to centerContinuous.
+
+ Additional rules:
+
+
Only whole values can be Appended, not partial values.
+
The column will not be widened to 'best fit' the Filled value
+
If Appending an Additional occurrence of the value exceeds the boundary of the cell
+ left/right edge, don't append the Additional occurrence of the value.
+
The display value of the cell is Filled, not the underlying raw number.
+
+
+
+
+ The horizontal alignment is centered across multiple cells.
+ The information about how many cells to span is expressed in the Sheet Part,
+ in the row of the cell in question. For each cell that is spanned in the alignment,
+ a cell element needs to be written out, with the same style Id which references the centerContinuous alignment.
+
+
+ Indicates that each 'word' in each line of text inside the cell is evenly distributed
+ across the width of the cell, with flush right and left margins.
+
+ When there is also an indent value to apply, both the left and right side of the cell
+ are pAdded by the indent value.
+
+
A 'word' is a set of characters with no space character in them.
+
Two lines inside a cell are Separated by a carriage return.
+
+
+
+ Link to an existing file or web page
+
+
+
+
+ Link to a place in this document
+
+
+
+
+ Link to an E-mail Address
+
+
+
+
+ Link to a file
+
+
+
+
+ Represents an Excel hyperlink.
+
+
+
+
+ Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+
+
+
+
+ text label for this hyperlink
+
+
+
+
+ the type of this hyperlink
+
+
+
+
+ the row of the first cell that Contains the hyperlink
+
+
+
+
+ the row of the last cell that Contains the hyperlink
+
+
+
+
+ the column of the first cell that Contains the hyperlink
+
+
+
+
+ the column of the last cell that Contains the hyperlink
+
+
+
+ Represents a defined name for a range of cells.
+ A name is a meaningful shorthand that makes it easier to understand the purpose of a
+ cell reference, constant or a formula.
+
+
+ Get the sheets name which this named range is referenced to
+
+ @return sheet name, which this named range refered to
+
+
+ Gets the name of the named range
+
+ @return named range name
+
+
+ Returns the formula that the name is defined to refer to.
+
+ @return the reference for this name, null if it has not been set yet. Never empty string
+ @see #SetRefersToFormula(String)
+
+
+ Checks if this name is a function name
+
+ @return true if this name is a function name
+
+
+ Checks if this name points to a cell that no longer exists
+
+ @return true if the name refers to a deleted cell, false otherwise
+
+
+ Returns the sheet index this name applies to.
+
+ @return the sheet index this name applies to, -1 if this name applies to the entire workbook
+
+
+ Returns the comment the user provided when the name was Created.
+
+ @return the user comment for this named range
+
+
+ Indicates that the defined name refers to a user-defined function.
+ This attribute is used when there is an add-in or other code project associated with the file.
+
+ @param value true indicates the name refers to a function.
+
+
+ Specifies printed page order.
+
+ @author Gisella Bronzetti
+
+
+ Order pages vertically first, then move horizontally.
+
+
+ Order pages horizontally first, then move vertically
+
+
+ The enumeration value indicating the possible paper size for a sheet
+
+ @author Daniele Montagni
+
+
+
+ Allow accessing the Initial value.
+
+
+
+
+ A4 Transverse - 210x297 mm
+
+
+
+
+ A4 Plus - 210x330 mm
+
+
+
+
+ US Letter Rotated 11 x 8 1/2 in
+
+
+
+
+ A4 Rotated - 297x210 mm */
+
+
+
+ @author Yegor Kozlov
+
+
+
+ Allow accessing the Initial value.
+
+
+
+
+ Extended windows meta file
+
+
+ Windows Meta File
+
+
+ Mac PICT format
+
+
+ JPEG format
+
+
+ PNG format
+
+
+ Device independent bitmap
+
+
+ GIF image format
+
+
+ Tag Image File (.tiff)
+
+
+ Encapsulated Postscript (.eps)
+
+
+ Windows Bitmap (.bmp)
+
+
+ WordPerfect graphics (.wpg)
+
+
+ Repersents a picture in a SpreadsheetML document
+
+ @author Yegor Kozlov
+
+
+ Reset the image to the dimension of the embedded image
+
+ @see #resize(double, double)
+
+
+ Resize the image proportionally.
+
+
+
+ Resize the image.
+
+ Please note, that this method works correctly only for workbooks
+ with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx).
+ If the default font is changed the resized image can be streched vertically or horizontally.
+
+
+ resize(1.0,1.0) keeps the original size,
+ resize(0.5,0.5) resize to 50% of the original,
+ resize(2.0,2.0) resizes to 200% of the original.
+ resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image.
+
+
+ @param scaleX the amount by which the image width is multiplied relative to the original width.
+ @param scaleY the amount by which the image height is multiplied relative to the original height.
+
+
+ Calculate the preferred size for this picture.
+
+ @return XSSFClientAnchor with the preferred size for this image
+
+
+ Calculate the preferred size for this picture.
+
+ @param scaleX the amount by which image width is multiplied relative to the original width.
+ @param scaleY the amount by which image height is multiplied relative to the original height.
+ @return ClientAnchor with the preferred size for this image
+
+
+ Return the dimension of the embedded image in pixel
+
+ @return image dimension in pixels
+
+
+ Return picture data for this picture
+
+ @return picture data for this picture
+
+
+ @return the anchor that is used by this picture
+
+
+ Gets the picture data.
+
+ @return the picture data.
+
+
+ Suggests a file extension for this image.
+
+ @return the file extension.
+
+
+ Returns the mime type for the image
+
+
+ @return the POI internal image type, 0 if unknown image type
+
+ @see Workbook#PICTURE_TYPE_DIB
+ @see Workbook#PICTURE_TYPE_EMF
+ @see Workbook#PICTURE_TYPE_JPEG
+ @see Workbook#PICTURE_TYPE_PICT
+ @see Workbook#PICTURE_TYPE_PNG
+ @see Workbook#PICTURE_TYPE_WMF
+
+
+ These enumerations specify how cell comments shall be displayed for paper printing purposes.
+
+ @author Gisella Bronzetti
+
+
+ Do not print cell comments.
+
+
+ Print cell comments as displayed.
+
+
+ Print cell comments at end of document.
+
+
+ The enumeration value indicating the print orientation for a sheet.
+
+ @author Gisella Bronzetti
+
+
+ orientation not specified
+
+
+ portrait orientation
+
+
+ landscape orientations
+
+
+
+ Used by HSSFPrintSetup.CellError property
+
+
+
+ Returns the paper size.
+ @return paper size
+
+
+ Returns the scale.
+ @return scale
+
+
+ Returns the page start.
+ @return page start
+
+
+ Returns the number of pages wide to fit sheet in.
+ @return number of pages wide to fit sheet in
+
+
+ Returns the number of pages high to fit the sheet in.
+ @return number of pages high to fit the sheet in
+
+
+ Returns the left to right print order.
+ @return left to right print order
+
+
+ Returns the landscape mode.
+ @return landscape mode
+
+
+ Returns the valid Settings.
+ @return valid Settings
+
+
+ Returns the black and white Setting.
+ @return black and white Setting
+
+
+ Returns the draft mode.
+ @return draft mode
+
+
+ Returns the print notes.
+ @return print notes
+
+
+ Returns the no orientation.
+ @return no orientation
+
+
+ Returns the use page numbers.
+ @return use page numbers
+
+
+ Returns the horizontal resolution.
+ @return horizontal resolution
+
+
+ Returns the vertical resolution.
+ @return vertical resolution
+
+
+ Returns the header margin.
+ @return header margin
+
+
+ Returns the footer margin.
+ @return footer margin
+
+
+ Returns the number of copies.
+ @return number of copies
+
+
+ Rich text unicode string. These strings can have fonts
+ applied to arbitary parts of the string.
+
+ @author Glen Stampoultzis (glens at apache.org)
+ @author Jason Height (jheight at apache.org)
+
+
+ Applies a font to the specified characters of a string.
+
+ @param startIndex The start index to apply the font to (inclusive)
+ @param endIndex The end index to apply the font to (exclusive)
+ @param fontIndex The font to use.
+
+
+ Applies a font to the specified characters of a string.
+
+ @param startIndex The start index to apply the font to (inclusive)
+ @param endIndex The end index to apply to font to (exclusive)
+ @param font The index of the font to use.
+
+
+ Sets the font of the entire string.
+ @param font The font to use.
+
+
+ Removes any formatting that may have been applied to the string.
+
+
+ Returns the plain string representation.
+
+
+ @return the number of characters in the font.
+
+
+ @return The number of formatting Runs used.
+
+
+
+ The index within the string to which the specified formatting run applies.
+ @param index the index of the formatting run
+ @return the index within the string.
+
+
+ Applies the specified font to the entire string.
+
+ @param fontIndex the font to apply.
+
+
+
+ Used to specify the different possible policies
+ if for the case of null and blank cells
+
+
+
+ Missing cells are returned as null, Blank cells are returned as normal
+
+
+ Missing cells are returned as null, as are blank cells
+
+
+ A new, blank cell is Created for missing cells. Blank cells are returned as normal
+
+
+
+ High level representation of a row of a spreadsheet.
+
+
+
+
+ Use this to create new cells within the row and return it.
+
+ The cell that is returned is a /.
+ The type can be changed either through calling SetCellValue or SetCellType.
+
+ the column number this cell represents
+ Cell a high level representation of the created cell.
+
+ ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns
+ (255 for *.xls, 1048576 for *.xlsx)
+
+
+
+
+ Use this to create new cells within the row and return it.
+
+ The cell that is returned is a /. The type can be changed
+ either through calling SetCellValue or SetCellType.
+
+ the column number this cell represents
+
+ Cell a high level representation of the created cell.
+ ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns
+ (255 for *.xls, 1048576 for *.xlsx)
+
+
+
+
+ Remove the Cell from this row.
+
+ the cell to remove
+
+
+
+ Get row number this row represents
+
+ the row number (0 based)
+
+
+
+ Get the cell representing a given column (logical cell) 0-based. If you
+ ask for a cell that is not defined....you get a null.
+
+ 0 based column number
+ Cell representing that column or null if undefined.
+
+
+
+
+ Returns the cell at the given (0 based) index, with the specified {@link NPOI.SS.usermodel.Row.MissingCellPolicy}
+
+ the cell at the given (0 based) index
+ ArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid
+
+
+
+
+
+
+ Get the number of the first cell Contained in this row.
+
+
+ short representing the first logical cell in the row,
+ or -1 if the row does not contain any cells.
+
+
+
+
+ Gets the index of the last cell Contained in this row PLUS ONE. The result also
+ happens to be the 1-based column number of the last cell. This value can be used as a
+ standard upper bound when iterating over cells:
+
+ short minColIx = row.GetFirstCellNum();
+ short maxColIx = row.GetLastCellNum();
+ for(short colIx=minColIx; colIx<maxColIx; colIx++) {
+ Cell cell = row.GetCell(colIx);
+ if(cell == null) {
+ continue;
+ }
+ //... do something with cell
+ }
+
+
+
+ short representing the last logical cell in the row PLUS ONE,
+ or -1 if the row does not contain any cells.
+
+
+
+
+ Gets the number of defined cells (NOT number of cells in the actual row!).
+ That is to say if only columns 0,4,5 have values then there would be 3.
+
+ int representing the number of defined cells in the row.
+
+
+
+ Get whether or not to display this row with 0 height
+
+ zHeight height is zero or not.
+
+
+
+ Get the row's height measured in twips (1/20th of a point).
+ If the height is not set, the default worksheet value is returned,
+
+
+ row height measured in twips (1/20th of a point)
+
+
+
+ Returns row height measured in point size.
+ If the height is not set, the default worksheet value is returned,
+
+
+ row height measured in point size
+
+
+
+
+
+ Is this row formatted? Most aren't, but some rows
+ do have whole-row styles. For those that do, you
+ can get the formatting from
+
+
+
+
+ Returns the Sheet this row belongs to
+
+ the Sheet that owns this row
+
+
+
+ Returns the whole-row cell styles. Most rows won't
+ have one of these, so will return null. Call IsFormmated to check first
+
+ The row style.
+
+
+
+ Moves the supplied cell to a new column, which
+ must not already have a cell there!
+
+ The cell to move
+ The new column number (0 based)
+
+
+
+ Copy the current row to the target row
+
+ row index of the target row
+ the new copied row object
+
+
+
+ Copy the source cell to the target cell. If the target cell exists, the new copied cell will be inserted before the existing one
+
+ index of the source cell
+ index of the target cell
+ the new copied cell object
+
+
+
+ Get cells in the row
+
+
+
+
+ Returns the rows outline level. Increased as you
+ put it into more groups (outlines), reduced as
+ you take it out of them.
+
+
+
+ All known types of automatic shapes in DrawingML
+
+ @author Yegor Kozlov
+
+
+
+ Allow accessing the Initial value.
+
+
+
+
+ Indicate the position of the margin. One of left, right, top and bottom.
+
+
+
+
+ referes to the left margin
+
+
+
+
+ referes to the right margin
+
+
+
+
+ referes to the top margin
+
+
+
+
+ referes to the bottom margin
+
+
+
+
+ Define the position of the pane. One of lower/right, upper/right, lower/left and upper/left.
+
+
+
+
+ referes to the lower/right corner
+
+
+
+
+ referes to the upper/right corner
+
+
+
+
+ referes to the lower/left corner
+
+
+
+
+ referes to the upper/left corner
+
+
+
+
+ High level representation of a Excel worksheet.
+
+
+ Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work.
+ The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can
+ contain text, numbers, dates, and formulas. Cells can also be formatted.
+
+
+
+
+ Create a new row within the sheet and return the high level representation
+
+ The row number.
+ high level Row object representing a row in the sheet
+ RemoveRow(Row)
+
+
+
+ Remove a row from this sheet. All cells Contained in the row are Removed as well
+
+ a row to Remove.
+
+
+
+ Returns the logical row (not physical) 0-based. If you ask for a row that is not
+ defined you get a null. This is to say row 4 represents the fifth row on a sheet.
+
+ row to get (0-based).
+ the rownumber or null if its not defined on the sheet
+
+
+
+ Returns the number of physically defined rows (NOT the number of rows in the sheet)
+
+ the number of physically defined rows in this sheet.
+
+
+
+ Gets the first row on the sheet
+
+ the number of the first logical row on the sheet (0-based).
+
+
+
+ Gets the last row on the sheet
+
+ last row contained n this sheet (0-based)
+
+
+
+ whether force formula recalculation.
+
+
+
+
+ Get the visibility state for a given column
+
+ the column to get (0-based)
+ the visiblity state of the column
+
+
+
+ Get the hidden state for a given column
+
+ the column to set (0-based)
+ hidden - false if the column is visible
+
+
+
+ Copy the source row to the target row. If the target row exists, the new copied row will be inserted before the existing one
+
+ source index
+ target index
+ the new copied row object
+
+
+
+ Set the width (in units of 1/256th of a character width)
+
+ the column to set (0-based)
+ the width in units of 1/256th of a character width
+
+ The maximum column width for an individual cell is 255 characters.
+ This value represents the number of characters that can be displayed
+ in a cell that is formatted with the standard font.
+
+
+
+
+ get the width (in units of 1/256th of a character width )
+
+ the column to get (0-based)
+ the width in units of 1/256th of a character width
+
+
+
+ get the width in pixel
+
+
+
+
+ Please note, that this method works correctly only for workbooks
+ with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx).
+ If the default font is changed the column width can be streched
+
+
+
+
+ Get the default column width for the sheet (if the columns do not define their own width)
+ in characters
+
+ default column width measured in characters.
+
+
+
+ Get the default row height for the sheet (if the rows do not define their own height) in
+ twips (1/20 of a point)
+
+ default row height measured in twips (1/20 of a point)
+
+
+
+ Get the default row height for the sheet (if the rows do not define their own height) in
+ points.
+
+ The default row height in points.
+
+
+
+ Returns the CellStyle that applies to the given
+ (0 based) column, or null if no style has been
+ set for that column
+
+ The column.
+
+
+
+ Adds a merged region of cells (hence those cells form one)
+
+ (rowfrom/colfrom-rowto/colto) to merge.
+ index of this region
+
+
+
+ Determine whether printed output for this sheet will be horizontally centered.
+
+
+
+
+ Determine whether printed output for this sheet will be vertically centered.
+
+
+
+
+ Removes a merged region of cells (hence letting them free)
+
+ index of the region to unmerge
+
+
+
+ Returns the number of merged regions
+
+
+
+
+ Returns the merged region at the specified index
+
+ The index.
+
+
+
+ Gets the row enumerator.
+
+
+ an iterator of the PHYSICAL rows. Meaning the 3rd element may not
+ be the third row if say for instance the second row is undefined.
+ Call on each row
+ if you care which one it is.
+
+
+
+
+ Get the row enumerator
+
+
+
+
+
+ Gets the flag indicating whether the window should show 0 (zero) in cells Containing zero value.
+ When false, cells with zero value appear blank instead of showing the number zero.
+
+ whether all zero values on the worksheet are displayed.
+
+
+
+ Gets or sets a value indicating whether the sheet displays Automatic Page Breaks.
+
+
+
+
+ Get whether to display the guts or not,
+
+ default value is true
+
+
+
+ Flag indicating whether the Fit to Page print option is enabled.
+
+
+
+
+ Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
+
+
+ When true a summary row is inserted below the detailed data being summarized and a
+ new outline level is established on that row.
+
+
+ When false a summary row is inserted above the detailed data being summarized and a new outline level
+ is established on that row.
+
+
+ true if row summaries appear below detail in the outline
+
+
+
+ Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline.
+
+
+ When true a summary column is inserted to the right of the detailed data being summarized
+ and a new outline level is established on that column.
+
+
+ When false a summary column is inserted to the left of the detailed data being
+ summarized and a new outline level is established on that column.
+
+
+ true if col summaries appear right of the detail in the outline
+
+
+
+ Gets the flag indicating whether this sheet displays the lines
+ between rows and columns to make editing and reading easier.
+
+ true if this sheet displays gridlines.
+
+
+
+ Gets the print Setup object.
+
+ The user model for the print Setup object.
+
+
+
+ Gets the user model for the default document header.
+
+ Note that XSSF offers more kinds of document headers than HSSF does
+
+
+ the document header. Never null
+
+
+
+ Gets the user model for the default document footer.
+
+ Note that XSSF offers more kinds of document footers than HSSF does.
+
+ the document footer. Never null
+
+
+
+ Gets the size of the margin in inches.
+
+ which margin to get
+ the size of the margin
+
+
+
+ Sets the size of the margin in inches.
+
+ which margin to get
+ the size of the margin
+
+
+
+ Answer whether protection is enabled or disabled
+
+ true => protection enabled; false => protection disabled
+
+
+
+ Sets the protection enabled as well as the password
+
+ to set for protection. Pass null to remove protection
+
+
+
+ Answer whether scenario protection is enabled or disabled
+
+ true => protection enabled; false => protection disabled
+
+
+
+ Gets or sets the tab color of the _sheet
+
+
+
+
+ Returns the top-level drawing patriach, if there is one.
+ This will hold any graphics or charts for the _sheet.
+ WARNING - calling this will trigger a parsing of the
+ associated escher records. Any that aren't supported
+ (such as charts and complex drawing types) will almost
+ certainly be lost or corrupted when written out. Only
+ use this with simple drawings, otherwise call
+ HSSFSheet#CreateDrawingPatriarch() and
+ start from scratch!
+
+ The drawing patriarch.
+
+
+
+ Sets the zoom magnication for the sheet. The zoom is expressed as a
+ fraction. For example to express a zoom of 75% use 3 for the numerator
+ and 4 for the denominator.
+
+ The numerator for the zoom magnification.
+ denominator for the zoom magnification.
+
+
+
+ The top row in the visible view when the sheet is
+ first viewed after opening it in a viewer
+
+ the rownum (0 based) of the top row.
+
+
+
+ The left col in the visible view when the sheet is
+ first viewed after opening it in a viewer
+
+ the rownum (0 based) of the top row
+
+
+
+ Sets desktop window pane display area, when the file is first opened in a viewer.
+
+ the top row to show in desktop window pane
+ the left column to show in desktop window pane
+
+
+
+ Sets desktop window pane display area, when the
+ file is first opened in a viewer.
+
+ the top row to show in desktop window pane
+ the left column to show in desktop window pane
+
+
+
+ Shifts rows between startRow and endRow n number of rows.
+ If you use a negative number, it will shift rows up.
+ Code ensures that rows don't wrap around.
+
+ Calls shiftRows(startRow, endRow, n, false, false);
+
+
+ Additionally shifts merged regions that are completely defined in these
+ rows (ie. merged 2 cells on a row to be shifted).
+
+ the row to start shifting
+ the row to end shifting
+ the number of rows to shift
+
+
+
+ Shifts rows between startRow and endRow n number of rows.
+ If you use a negative number, it will shift rows up.
+ Code ensures that rows don't wrap around
+
+ Additionally shifts merged regions that are completely defined in these
+ rows (ie. merged 2 cells on a row to be shifted).
+
+ the row to start shifting
+ the row to end shifting
+ the number of rows to shift
+ whether to copy the row height during the shift
+ whether to set the original row's height to the default
+
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split
+ Vertical position of split
+ Top row visible in bottom pane
+ Left column visible in right pane
+
+
+
+ Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split.
+ Vertical position of split.
+
+
+
+ Creates a split pane. Any existing freezepane or split pane is overwritten.
+
+ Horizonatal position of split (in 1/20th of a point)
+ Vertical position of split (in 1/20th of a point)
+ Left column visible in right pane
+ Top row visible in bottom pane
+ Active pane. One of: PANE_LOWER_RIGHT, PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
+ @see #PANE_LOWER_LEFT
+ @see #PANE_LOWER_RIGHT
+ @see #PANE_UPPER_LEFT
+ @see #PANE_UPPER_RIGHT
+
+
+
+ Returns the information regarding the currently configured pane (split or freeze)
+
+ if no pane configured returns null else return the pane information.
+
+
+
+ Returns if gridlines are displayed
+
+
+
+
+ Returns if formulas are displayed
+
+
+
+
+ Returns if RowColHeadings are displayed.
+
+
+
+
+ Returns if RowColHeadings are displayed.
+
+
+
+
+ Determines if there is a page break at the indicated row
+
+ The row.
+
+
+
+ Removes the page break at the indicated row
+
+ The row index.
+
+
+
+ Retrieves all the horizontal page breaks
+
+ all the horizontal page breaks, or null if there are no row page breaks
+
+
+
+ Retrieves all the vertical page breaks
+
+ all the vertical page breaks, or null if there are no column page breaks.
+
+
+
+ Sets the active cell.
+
+ The row.
+ The column.
+
+
+
+ Sets the active cell range.
+
+ The firstrow.
+ The lastrow.
+ The firstcolumn.
+ The lastcolumn.
+
+
+
+ Sets the active cell range.
+
+ The cellranges.
+ The index of the active range.
+ The active row in the active range
+ The active column in the active range
+
+
+
+ Sets a page break at the indicated column
+
+ The column.
+
+
+
+ Sets the row break.
+
+ The row.
+
+
+
+ Determines if there is a page break at the indicated column
+
+ The column index.
+
+
+
+ Removes a page break at the indicated column
+
+ The column.
+
+
+
+ Expands or collapses a column group.
+
+ One of the columns in the group.
+ if set to truecollapse group.falseexpand group.
+
+
+
+ Create an outline for the provided column range.
+
+ beginning of the column range.
+ end of the column range.
+
+
+
+ Ungroup a range of columns that were previously groupped
+
+ start column (0-based).
+ end column (0-based).
+
+
+
+ Tie a range of rows toGether so that they can be collapsed or expanded
+
+ start row (0-based)
+ end row (0-based)
+
+
+
+ Ungroup a range of rows that were previously groupped
+
+ start row (0-based)
+ end row (0-based)
+
+
+
+ Set view state of a groupped range of rows
+
+ start row of a groupped range of rows (0-based).
+ whether to expand/collapse the detail rows.
+
+
+
+ Sets the default column style for a given column. POI will only apply this style to new cells Added to the sheet.
+
+ the column index
+ the style to set
+
+
+
+ Adjusts the column width to fit the contents.
+
+ the column index
+
+ This process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ processing.
+
+
+
+
+ Adjusts the column width to fit the contents.
+
+ the column index.
+ whether to use the contents of merged cells when
+ calculating the width of the column. Default is to ignore merged cells.
+
+ This process can be relatively slow on large sheets, so this should
+ normally only be called once per column, at the end of your
+ processing.
+
+
+
+
+ Returns cell comment for the specified row and column
+
+ The row.
+ The column.
+
+
+
+ Creates the top-level drawing patriarch.
+
+
+
+
+ Gets the parent workbook.
+
+
+
+
+ Gets the name of the sheet.
+
+
+
+
+ Gets or sets a value indicating whether this sheet is currently selected.
+
+
+
+
+ Sets whether sheet is selected.
+
+ Whether to select the sheet or deselect the sheet.
+
+
+
+ Sets array formula to specified region for result.
+
+ text representation of the formula
+ Region of array formula for result
+ the of cells affected by this change
+
+
+
+ Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well
+
+ any cell within Array Formula range
+ the of cells affected by this change
+
+
+
+ Checks if the provided region is part of the merged regions.
+
+ Region searched in the merged regions
+ true, when the region is contained in at least one of the merged regions
+
+
+
+ Create an instance of a DataValidationHelper.
+
+ Instance of a DataValidationHelper
+
+
+
+ Returns the list of DataValidation in the sheet.
+
+ list of DataValidation in the sheet
+
+
+
+ Creates a data validation object
+
+ The data validation object settings
+
+
+
+ Enable filtering for a range of cells
+
+ the range of cells to filter
+
+
+
+ The 'Conditional Formatting' facet for this Sheet
+
+ conditional formatting rule for this sheet
+
+
+
+ Whether the text is displayed in right-to-left mode in the window
+
+
+
+
+ Get or set the repeating rows used when printing the sheet, as found in File->PageSetup->Sheet.
+
+ Repeating rows cover a range of contiguous rows, e.g.:
+
+ Sheet1!$1:$1
+ Sheet2!$5:$8
+
+ The {@link CellRangeAddress} returned contains a column part which spans
+ all columns, and a row part which specifies the contiguous range of
+ repeating rows.
+
+ If the Sheet does not have any repeating rows defined, null is returned.
+
+
+
+
+ Gets or set the repeating columns used when printing the sheet, as found in File->PageSetup->Sheet.
+
+ Repeating columns cover a range of contiguous columns, e.g.:
+
+ Sheet1!$A:$A
+ Sheet2!$C:$F
+
+ The {@link CellRangeAddress} returned contains a row part which spans all
+ rows, and a column part which specifies the contiguous range of
+ repeating columns.
+
+ If the Sheet does not have any repeating columns defined, null is
+ returned.
+
+
+
+
+ Copy sheet with a new name
+
+ new sheet name
+ cloned sheet
+
+
+
+ Copy sheet with a new name
+
+ new sheet name
+ whether to copy styles
+ cloned sheet
+
+
+
+ Returns the column outline level. Increased as you
+ put it into more groups (outlines), reduced as
+ you take it out of them.
+
+
+
+
+
+ The 'Conditional Formatting' facet of Sheet
+
+ @author Dmitriy Kumshayev
+ @author Yegor Kozlov
+ @since 3.8
+
+
+
+ Add a new Conditional Formatting to the sheet.
+
+ list of rectangular regions to apply conditional formatting rules
+ the rule to apply
+ index of the newly Created Conditional Formatting object
+
+
+
+ Add a new Conditional Formatting consisting of two rules.
+
+ list of rectangular regions to apply conditional formatting rules
+ the first rule
+ the second rule
+ index of the newly Created Conditional Formatting object
+
+
+
+ Add a new Conditional Formatting Set to the sheet.
+
+ list of rectangular regions to apply conditional formatting rules
+ Set of up to three conditional formatting rules
+ index of the newly Created Conditional Formatting object
+
+
+
+ Adds a copy of a ConditionalFormatting object to the sheet
+
+ the Conditional Formatting to clone
+ index of the new Conditional Formatting object
+
+ This method could be used to copy ConditionalFormatting object
+ from one sheet to another. For example:
+ ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index);
+ newSheet.AddConditionalFormatting(cf);
+
+
+
+ A factory method allowing to create a conditional formatting rule
+ with a cell comparison operator
+
+ The Created conditional formatting rule Compares a cell value
+ to a formula calculated result, using the specified operator.
+ The type of the Created condition is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS}
+
+
+ @param comparisonOperation - MUST be a constant value from
+ {@link ComparisonOperator}:
+
+
BETWEEN
+
NOT_BETWEEN
+
EQUAL
+
NOT_EQUAL
+
GT
+
LT
+
GE
+
LE
+
+
+ @param formula1 - formula for the valued, Compared with the cell
+ @param formula2 - second formula (only used with
+ {@link ComparisonOperator#BETWEEN}) and {@link ComparisonOperator#NOT_BETWEEN} operations)
+
+
+
+ Create a conditional formatting rule that Compares a cell value to a formula calculated result, using an operator
+
+ MUST be a constant value from ComparisonOperator except BETWEEN and NOT_BETWEEN
+ the formula to determine if the conditional formatting is applied
+ a conditional formatting rule
+
+
+
+ Create a conditional formatting rule based on a Boolean formula.
+ When the formula result is true, the cell is highlighted.
+
+ the formula to Evaluate. MUST be a Boolean function.
+ conditional formatting rule
+
+
+
+ Gets Conditional Formatting object at a particular index
+
+ 0-based index of the Conditional Formatting object to fetch
+ Conditional Formatting object or null if not found
+ throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1)
+
+
+
+ get the number of conditional formats in this sheet
+
+
+
+
+ Removes a Conditional Formatting object by index
+
+ 0-based index of the Conditional Formatting object to remove
+ throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1)
+
+
+ @return the rich text string for this textbox.
+
+
+ @return Returns the left margin within the textbox.
+
+
+ @return returns the right margin within the textbox.
+
+
+ @return returns the top margin within the textbox.
+
+
+ s the bottom margin within the textbox.
+
+
+ This enumeration value indicates the type of vertical alignment for a cell, i.e.,
+ whether it is aligned top, bottom, vertically centered, justified or distributed.
+
+
+ The vertical alignment is aligned-to-top.
+
+
+ The vertical alignment is centered across the height of the cell.
+
+
+ The vertical alignment is aligned-to-bottom.
+
+
+
+ When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,
+ where each line of text inside the cell is evenly distributed across the height of the cell,
+ with flush top and bottom margins.
+
+
+ When text direction is vertical: similar behavior as horizontal justification.
+ The alignment is justified (flush top and bottom in this case). For each line of text, each
+ line of the wrapped text in a cell is aligned to the top and bottom (except the last line).
+ If no single line of text wraps in the cell, then the text is not justified.
+
+
+
+
+ When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,
+ where each line of text inside the cell is evenly distributed across the height of the cell,
+ with flush top
+
+
+ When text direction is vertical: behaves exactly as distributed horizontal alignment.
+ The first words in a line of text (appearing at the top of the cell) are flush
+ with the top edge of the cell, and the last words of a line of text are flush with the bottom edge of the cell,
+ and the line of text is distributed evenly from top to bottom.
+
+
+
+
+ Indicates the sheet is visible.
+
+
+
+
+ Indicates the book window is hidden, but can be shown by the user via the user interface.
+
+
+
+
+ Indicates the sheet is hidden and cannot be shown in the user interface (UI).
+
+
+ In Excel this state is only available programmatically in VBA:
+ ThisWorkbook.Sheets("MySheetName").Visible = xlSheetVeryHidden
+
+
+
+
+
+ High level interface of a Excel workbook. This is the first object most users
+ will construct whether they are reading or writing a workbook. It is also the
+ top level object for creating new sheets/etc.
+ This interface is shared between the implementation specific to xls and xlsx.
+ This way it is possible to access Excel workbooks stored in both formats.
+
+
+
+
+ get the active sheet. The active sheet is is the sheet
+ which is currently displayed when the workbook is viewed in Excel.
+
+
+
+
+ Gets the first tab that is displayed in the list of tabs in excel.
+
+
+
+
+ Sets the order of appearance for a given sheet.
+
+ the name of the sheet to reorder
+ the position that we want to insert the sheet into (0 based)
+
+
+
+ Sets the tab whose data is actually seen when the sheet is opened.
+ This may be different from the "selected sheet" since excel seems to
+ allow you to show the data of one sheet when another is seen "selected"
+ in the tabs (at the bottom).
+
+ the index of the sheet to select (0 based)
+
+
+
+ set the active sheet. The active sheet is is the sheet
+ which is currently displayed when the workbook is viewed in Excel.
+
+ index of the active sheet (0-based)
+
+
+
+ Set the sheet name
+
+ sheet number (0 based)
+ Sheet name
+
+
+
+ Set the sheet name.
+
+ sheet number (0 based)
+ sheet name
+
+
+
+ Returns the index of the sheet by its name
+
+ the sheet name
+ index of the sheet (0 based)
+
+
+
+ Returns the index of the given sheet
+
+ the sheet to look up
+ index of the sheet (0 based)
+
+
+
+ Sreate an Sheet for this Workbook, Adds it to the sheets and returns
+ the high level representation. Use this to create new sheets.
+
+
+
+
+
+ Create an Sheet for this Workbook, Adds it to the sheets and returns
+ the high level representation. Use this to create new sheets.
+
+ sheetname to set for the sheet.
+ Sheet representing the new sheet.
+
+
+
+ Create an Sheet from an existing sheet in the Workbook.
+
+
+
+
+
+
+ Get the number of spreadsheets in the workbook
+
+
+
+
+ Get the Sheet object at the given index.
+
+ index of the sheet number (0-based physical & logical)
+ Sheet at the provided index
+
+
+
+ Get sheet with the given name
+
+ name of the sheet
+ Sheet with the name provided or null if it does not exist
+
+
+
+ Removes sheet at the given index
+
+
+
+
+
+ Enumerate sheets
+
+
+
+
+ To set just repeating columns:
+ workbook.SetRepeatingRowsAndColumns(0,0,1,-1-1);
+ To set just repeating rows:
+ workbook.SetRepeatingRowsAndColumns(0,-1,-1,0,4);
+ To remove all repeating rows and columns for a sheet.
+ workbook.SetRepeatingRowsAndColumns(0,-1,-1,-1,-1);
+
+ Sets the repeating rows and columns for a sheet (as found in
+ File->PageSetup->Sheet). This is function is included in the workbook
+ because it Creates/modifies name records which are stored at the
+ workbook level.
+
+ 0 based index to sheet.
+ 0 based start of repeating columns.
+ 0 based end of repeating columns.
+ 0 based start of repeating rows.
+ 0 based end of repeating rows.
+
+
+
+ Create a new Font and add it to the workbook's font table
+
+
+
+
+
+ Finds a font that matches the one with the supplied attributes
+
+
+
+
+
+
+
+
+
+ the font with the matched attributes or null
+
+
+
+ Get the number of fonts in the font table
+
+
+
+
+ Get the font at the given index number
+
+ index number (0-based)
+ font at the index
+
+
+
+ Create a new Cell style and add it to the workbook's style table
+
+ the new Cell Style object
+
+
+
+ Get the number of styles the workbook Contains
+
+
+
+
+ Get the cell style object at the given index
+
+ index within the set of styles (0-based)
+ CellStyle object at the index
+
+
+
+ Write out this workbook to an OutPutstream.
+
+ the stream you wish to write to
+
+
+
+ the total number of defined names in this workbook
+
+
+
+
+ the defined name with the specified name.
+
+ the name of the defined name
+ the defined name with the specified name. null if not found
+
+
+
+ the defined name at the specified index
+
+ position of the named range (0-based)
+
+
+
+
+ Creates a new (unInitialised) defined name in this workbook
+
+ new defined name object
+
+
+
+ Gets the defined name index by name
+
+ the name of the defined name
+ zero based index of the defined name.
+
+
+
+ Remove the defined name at the specified index
+
+ named range index (0 based)
+
+
+
+ Remove a defined name by name
+
+ the name of the defined name
+
+
+
+ Adds the linking required to allow formulas referencing the specified
+ external workbook to be added to this one. In order for formulas
+ such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the file,
+ some linking information must first be recorded. Once a given external
+ workbook has been linked, then formulas using it can added. Each workbook
+ needs linking only once.
+ This linking only applies for writing formulas.
+ To link things for evaluation, see {@link FormulaEvaluator#setupReferencedWorkbooks(java.util.Map)}
+
+ The name the workbook will be referenced as in formulas
+ The open workbook to fetch the link required information from
+
+
+
+
+ Sets the printarea for the sheet provided
+
+ Zero-based sheet index
+ Valid name Reference for the Print Area
+
+
+
+ Sets the printarea for the sheet provided
+
+ Zero-based sheet index (0 = First Sheet)
+ Column to begin printarea
+ Column to end the printarea
+ Row to begin the printarea
+ Row to end the printarea
+
+
+
+ Retrieves the reference for the printarea of the specified sheet,
+ the sheet name is Appended to the reference even if it was not specified.
+
+ Zero-based sheet index
+ Null if no print area has been defined
+
+
+
+ Delete the printarea for the sheet specified
+
+ Zero-based sheet index (0 = First Sheet)
+
+
+
+ Retrieves the current policy on what to do when getting missing or blank cells from a row.
+
+
+
+
+ Returns the instance of DataFormat for this workbook.
+
+ the DataFormat object
+
+
+
+ Adds a picture to the workbook.
+
+ The bytes of the picture
+ The format of the picture.
+ the index to this picture (1 based).
+
+
+
+ Gets all pictures from the Workbook.
+
+ the list of pictures (a list of link PictureData objects.)
+
+
+
+ Return an object that handles instantiating concrete classes of
+ the various instances one needs for HSSF and XSSF.
+
+
+
+
+
+ if this workbook is not visible in the GUI
+
+
+
+
+ Check whether a sheet is hidden.
+
+ number of sheet
+ true if sheet is hidden
+
+
+ Check whether a sheet is very hidden.
+
+ This is different from the normal hidden status
+ ({@link #isSheetHidden(int)})
+
+ @param sheetIx sheet index to check
+ @return true if sheet is very hidden
+
+
+ Hide or unhide a sheet
+
+ @param sheetIx the sheet index (0-based)
+ @param hidden True to mark the sheet as hidden, false otherwise
+
+
+ Hide or unhide a sheet.
+
+ 0 = not hidden
+ 1 = hidden
+ 2 = very hidden.
+
+ @param sheetIx The sheet number
+ @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden
+
+
+
+ Register a new toolpack in this workbook.
+
+ the toolpack to register
+
+
+ The enumeration value indicating the style of fill pattern being used for a cell format.
+
+
+
+ No background
+
+
+ Solidly Filled
+
+
+ Small fine dots
+
+
+ Wide dots
+
+
+ Sparse dots
+
+
+ Thick horizontal bands
+
+
+ Thick vertical bands
+
+
+ Thick backward facing diagonals
+
+
+ Thick forward facing diagonals
+
+
+ Large spots
+
+
+ Brick-like layout
+
+
+ Thin horizontal bands
+
+
+ Thin vertical bands
+
+
+ Thin backward diagonal
+
+
+ Thin forward diagonal
+
+
+ Squares
+
+
+ Diamonds
+
+
+ Less Dots
+
+
+ Least Dots
+
+
+
+ Represents data marker used in charts.
+ @author Roman Kashitsyn
+
+
+
+
+ constructor
+
+ the sheet where data located.
+ the range within that sheet.
+
+
+
+ get or set the sheet marker points to.
+
+
+
+
+ get or set range of the marker.
+
+
+
+
+ Formats data marker using canonical format, for example
+ 'SheetName!$A$1:$A$5'.
+
+ formatted data marker
+
+
+ Convert DateFormat patterns into Excel custom number formats.
+ For example, to format a date in excel using the "dd MMMM, yyyy" pattern and Japanese
+ locale, use the following code:
+
+
+ // returns "[$-0411]dd MMMM, yyyy;@" where the [$-0411] prefix tells Excel to use the Japanese locale
+ String excelFormatPattern = DateFormatConverter.convert(Locale.JAPANESE, "dd MMMM, yyyy");
+
+ CellStyle cellStyle = workbook.createCellStyle();
+
+ DataFormat poiFormat = workbook.createDataFormat();
+ cellStyle.setDataFormat(poiFormat.getFormat(excelFormatPattern));
+ cell.setCellValue(new Date());
+ cell.setCellStyle(cellStyle); // formats date as '2012\u5e743\u670817\u65e5'
+
+
+
+
+
+
+ @author Yegor Kozlov
+
+
+ Return the dimension of this image
+
+ @param is the stream Containing the image data
+ @param type type of the picture: {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_JPEG},
+ {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_PNG} or {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_DIB}
+
+ @return image dimension in pixels
+
+
+ The metadata of PNG and JPEG can contain the width of a pixel in millimeters.
+ Return the the "effective" dpi calculated as 25.4/HorizontalPixelSize
+ and 25.4/VerticalPixelSize. Where 25.4 is the number of mm in inch.
+
+ @return array of two elements: {horisontalPdi, verticalDpi}.
+ {96, 96} is the default.
+
+
+ Calculate and Set the preferred size (anchor) for this picture.
+
+ @param scaleX the amount by which image width is multiplied relative to the original width.
+ @param scaleY the amount by which image height is multiplied relative to the original height.
+ @return the new Dimensions of the scaled picture in EMUs
+
+
+ Calculates the dimensions in EMUs for the anchor of the given picture
+
+ @param picture the picture Containing the anchor
+ @return the dimensions in EMUs
+
+
+ The Char (!) that Separates sheet names from cell references
+
+
+ The Char (:) that Separates the two cell references in a multi-cell area reference
+
+
+ The Char (') used to quote sheet names when they contain special Chars
+
+
+ Create an area ref from a string representation. Sheet names containing special Chars should be
+ delimited and escaped as per normal syntax rules for formulas.
+ The area reference must be contiguous (i.e. represent a single rectangle, not a Union of rectangles)
+
+
+ Creates an area ref from a pair of Cell References.
+
+
+ is the reference for a contiguous (i.e.
+ Unbroken) area, or is it made up of
+ several different parts?
+ (If it Is, you will need to call
+ ....
+
+
+ is the reference for a whole-column reference,
+ such as C:C or D:G ?
+
+
+ Takes a non-contiguous area reference, and
+ returns an array of contiguous area references.
+
+
+ @return false if this area reference involves more than one cell
+
+
+ @return the first cell reference which defines this area. Usually this cell is in the upper
+ left corner of the area (but this is not a requirement).
+
+
+ Note - if this area reference refers to a single cell, the return value of this method will
+ be identical to that of GetFirstCell()
+ @return the second cell reference which defines this area. For multi-cell areas, this is
+ cell diagonally opposite the 'first cell'. Usually this cell is in the lower right corner
+ of the area (but this is not a requirement).
+
+
+ Returns a reference to every cell covered by this area
+
+
+ Example return values:
+
+
Result
Comment
+
A1:A1
Single cell area reference without sheet
+
A1:$C$1
Multi-cell area reference without sheet
+
Sheet1!A$1:B4
Standard sheet name
+
'O''Brien''s Sales'!B5:C6'
Sheet name with special Chars
+
+ @return the text representation of this area reference as it would appear in a formula.
+
+
+ Separates Area refs in two parts and returns them as Separate elements in a String array,
+ each qualified with the sheet name (if present)
+
+ @return array with one or two elements. never null
+
+
+ Creates new cell range. Indexes are zero-based.
+
+ @param firstRow Index of first row
+ @param lastRow Index of last row (inclusive), must be equal to or larger than {@code firstRow}
+ @param firstCol Index of first column
+ @param lastCol Index of last column (inclusive), must be equal to or larger than {@code firstCol}
+
+
+ @return the text format of this range using specified sheet name.
+
+
+
+ Creates a CellRangeAddress from a cell range reference string.
+
+
+ usually a standard area ref (e.g. "B1:D8"). May be a single
+ cell ref (e.g. "B5") in which case the result is a 1 x 1 cell
+ range. May also be a whole row range (e.g. "3:5"), or a whole
+ column range (e.g. "C:F")
+
+ a CellRangeAddress object
+
+
+ See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'
+
+ Common subclass of 8-bit and 16-bit versions
+
+ @author Josh Micich
+
+
+ Validate the range limits against the supplied version of Excel
+
+ @param ssVersion the version of Excel to validate against
+ @throws IllegalArgumentException if the range limits are outside of the allowed range
+
+
+ Runs a bounds check for row numbers
+ @param row
+
+
+ Runs a bounds check for column numbers
+ @param column
+
+
+ @return column number for the upper left hand corner
+
+
+ @return row number for the upper left hand corner
+
+
+ @return column number for the lower right hand corner
+
+
+ @return row number for the lower right hand corner
+
+
+ @return the size of the range (number of cells in the area).
+
+
+ List of CellRangeAddresses. Each structure represents a cell range
+
+
+ Convenience constructor for creating a CellRangeAddressList with a single
+ CellRangeAddress. Other CellRangeAddresses may be Added later.
+
+
+ @param in the RecordInputstream to read the record from
+
+
+ Get the number of following ADDR structures. The number of this
+ structures is automatically set when reading an Excel file and/or
+ increased when you manually Add a new ADDR structure . This is the reason
+ there isn't a set method for this field .
+
+ @return number of ADDR structures
+
+
+ Add a cell range structure.
+
+ @param firstRow - the upper left hand corner's row
+ @param firstCol - the upper left hand corner's col
+ @param lastRow - the lower right hand corner's row
+ @param lastCol - the lower right hand corner's col
+ @return the index of this ADDR structure
+
+
+ @return CellRangeAddress at the given index
+
+
+ @return the total size of for the specified number of ranges,
+ including the initial 2 byte range count
+
+
+
+ Allow accessing the Initial value.
+
+
+
+
+ @author Avik Sengupta
+ @author Dennis doubleday (patch to seperateRowColumns())
+
+
+ The character ($) that signifies a row or column value is absolute instead of relative
+
+
+ The character (!) that Separates sheet names from cell references
+
+
+ The character (') used to quote sheet names when they contain special characters
+
+
+ Matches a run of one or more letters followed by a run of one or more digits.
+ The run of letters is group 1 and the run of digits is group 2.
+ Each group may optionally be prefixed with a single '$'.
+
+
+ Matches a run of one or more letters. The run of letters is group 1.
+ The text may optionally be prefixed with a single '$'.
+
+
+ Matches a run of one or more digits. The run of digits is group 1.
+ The text may optionally be prefixed with a single '$'.
+
+
+ Named range names must start with a letter or underscore. Subsequent characters may include
+ digits or dot. (They can even end in dot).
+
+
+ Create an cell ref from a string representation. Sheet names containing special characters should be
+ delimited and escaped as per normal syntax rules for formulas.
+
+
+ @return possibly null if this is a 2D reference. Special characters are not
+ escaped or delimited
+
+
+ takes in a column reference portion of a CellRef and converts it from
+ ALPHA-26 number format to 0-based base 10.
+ 'A' -> 0
+ 'Z' -> 25
+ 'AA' -> 26
+ 'IV' -> 255
+ @return zero based column index
+
+
+ Takes in a 0-based base-10 column and returns a ALPHA-26
+ representation.
+ eg column #3 -> D
+
+
+ Separates the row from the columns and returns an array of three Strings. The first element
+ is the sheet name. Only the first element may be null. The second element in is the column
+ name still in ALPHA-26 number format. The third element is the row.
+
+
+ Example return values:
+
+
Result
Comment
+
A1
Cell reference without sheet
+
Sheet1!A1
Standard sheet name
+
'O''Brien''s Sales'!A1'
Sheet name with special characters
+
+ @return the text representation of this cell reference as it would appear in a formula.
+
+
+ Returns the three parts of the cell reference, the
+ Sheet name (or null if none supplied), the 1 based
+ row number, and the A based column letter.
+ This will not include any markers for absolute
+ references, so use {@link #formatAsString()}
+ to properly turn references into strings.
+
+
+ Appends cell reference with '$' markers for absolute values as required.
+ Sheet name is not included.
+
+
+ Used to decide whether a name of the form "[A-Z]*[0-9]*" that appears in a formula can be
+ interpreted as a cell reference. Names of that form can be also used for sheets and/or
+ named ranges, and in those circumstances, the question of whether the potential cell
+ reference is valid (in range) becomes important.
+
+ Note - that the maximum sheet size varies across Excel versions:
+
+
+
Version
File Format
+
Last Column
Last Row
+
97-2003
BIFF8
"IV" (2^8)
65536 (2^14)
+
2007
BIFF12
"XFD" (2^14)
1048576 (2^20)
+
+ POI currently targets BIFF8 (Excel 97-2003), so the following behaviour can be observed for
+ this method:
+
+
Input
+
Result
+
"A", "1"
true
+
"a", "111"
true
+
"A", "65536"
true
+
"A", "65537"
false
+
"iv", "1"
true
+
"IW", "1"
false
+
"AAA", "1"
false
+
"a", "111"
true
+
"Sheet", "1"
false
+
+
+ @param colStr a string of only letter characters
+ @param rowStr a string of only digit characters
+ @return true if the row and col parameters are within range of a BIFF8 spreadsheet.
+
+
+ Various utility functions that make working with a cells and rows easier. The various methods
+ that deal with style's allow you to create your CellStyles as you need them. When you apply a
+ style change to a cell, the code will attempt to see if a style already exists that meets your
+ needs. If not, then it will create a new style. This is to prevent creating too many styles.
+ there is an upper limit in Excel on the number of styles that can be supported.
+
+ @author Eric Pugh epugh@upstate.com
+ @author (secondary) Avinash Kewalramani akewalramani@accelrys.com
+
+
+ Get a row from the spreadsheet, and create it if it doesn't exist.
+
+ @param rowIndex The 0 based row number
+ @param sheet The sheet that the row is part of.
+ @return The row indicated by the rowCounter
+
+
+ Get a specific cell from a row. If the cell doesn't exist, then create it.
+
+ @param row The row that the cell is part of
+ @param columnIndex The column index that the cell is in.
+ @return The cell indicated by the column.
+
+
+ Creates a cell, gives it a value, and applies a style if provided
+
+ @param row the row to create the cell in
+ @param column the column index to create the cell in
+ @param value The value of the cell
+ @param style If the style is not null, then set
+ @return A new Cell
+
+
+ Create a cell, and give it a value.
+
+ @param row the row to create the cell in
+ @param column the column index to create the cell in
+ @param value The value of the cell
+ @return A new Cell.
+
+
+ Take a cell, and align it.
+
+ @param cell the cell to set the alignment for
+ @param workbook The workbook that is being worked with.
+ @param align the column alignment to use.
+
+ @see CellStyle for alignment options
+
+
+ Take a cell, and apply a font to it
+
+ @param cell the cell to set the alignment for
+ @param workbook The workbook that is being worked with.
+ @param font The Font that you want to set...
+
+
+ This method attempt to find an already existing CellStyle that matches what you want the
+ style to be. If it does not find the style, then it creates a new one. If it does create a
+ new one, then it applies the propertyName and propertyValue to the style. This is necessary
+ because Excel has an upper limit on the number of Styles that it supports.
+
+ @param workbook The workbook that is being worked with.
+ @param propertyName The name of the property that is to be changed.
+ @param propertyValue The value of the property that is to be changed.
+ @param cell The cell that needs it's style changes
+
+
+ Returns a map containing the format properties of the given cell style.
+
+ @param style cell style
+ @return map of format properties (String -> Object)
+ @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map)
+
+
+ Sets the format properties of the given style based on the given map.
+
+ @param style cell style
+ @param workbook parent workbook
+ @param properties map of format properties (String -> Object)
+ @see #getFormatProperties(CellStyle)
+
+
+ Utility method that returns the named short value form the given map.
+ @return zero if the property does not exist, or is not a {@link Short}.
+
+ @param properties map of named properties (String -> Object)
+ @param name property name
+ @return property value, or zero
+
+
+ Utility method that returns the named boolean value form the given map.
+ @return false if the property does not exist, or is not a {@link Boolean}.
+
+ @param properties map of properties (String -> Object)
+ @param name property name
+ @return property value, or false
+
+
+ Utility method that puts the named short value to the given map.
+
+ @param properties map of properties (String -> Object)
+ @param name property name
+ @param value property value
+
+
+ Utility method that puts the named boolean value to the given map.
+
+ @param properties map of properties (String -> Object)
+ @param name property name
+ @param value property value
+
+
+ Looks for text in the cell that should be unicode, like an alpha and provides the
+ unicode version of it.
+
+ @param cell The cell to check for unicode values
+ @return translated to unicode
+
+
+ Represents callback for CellWalk traverse method.
+ @author Roman Kashitsyn
+
+
+ @param cell current cell
+ @param ctx information about invokation context
+
+
+ Traverse cell range.
+
+ @author Roman Kashitsyn
+
+
+ Should we call handler on empty (blank) cells. Default is
+ false.
+ @return true if handler should be called on empty (blank)
+ cells, false otherwise.
+
+
+ Sets the traverseEmptyCells property.
+ @param traverseEmptyCells new property value
+
+
+ Traverse cell range from top left to bottom right cell.
+ @param handler handler to call on each appropriate cell
+
+
+ Inner class to hold walk context.
+ @author Roman Kashitsyn
+
+
+ @author Roman Kashitsyn
+
+
+ Returns ordinal number of cell in range. Numeration starts
+ from top left cell and ends at bottom right cell. Here is a
+ brief example (number in cell is it's ordinal number):
+
+
+
+
1
2
+
3
4
+
+
+
+ @return ordinal number of current cell
+
+
+ Returns number of current row.
+ @return number of current row
+
+
+ Returns number of current column.
+ @return number of current column
+
+
+ Always 64 bits long (MSB, bit-63 is '1')
+
+
+ Convert to an equivalent {@link NormalisedDecimal} representation having 15 decimal digits of precision in the
+ non-fractional bits of the significand.
+
+
+ @return the number of non-fractional bits after the MSB of the significand
+
+
+
+ A substitute class for Format class in Java
+
+
+
+ Format class for Excel's SSN Format. This class mimics Excel's built-in
+ SSN Formatting.
+
+ @author James May
+
+
+ Format a number as an SSN
+
+
+ Format class for Excel Zip + 4 Format. This class mimics Excel's
+ built-in Formatting for Zip + 4.
+ @author James May
+
+
+ Format a number as Zip + 4
+
+
+ Format class for Excel phone number Format. This class mimics Excel's
+ built-in phone number Formatting.
+ @author James May
+
+
+ Format a number as a phone number
+
+
+ Format class that does nothing and always returns a constant string.
+
+ This format is used to simulate Excel's handling of a format string
+ of all # when the value is 0. Excel will output "", Java will output "0".
+
+ @see DataFormatter#createFormat(double, int, String)
+
+
+ The value the exponent field Gets for all NaN and InfInity values
+
+
+ @param rawBits the 64 bit binary representation of the double value
+ @return the top 12 bits (sign and biased exponent value)
+
+
+ The minimum value in 'Base-10 normalised form'.
+ When {@link #_binaryExponent} == 46 this is the the minimum {@link #_frac} value
+ (1014-0.05) * 2^17
+
+ Values between (1014-0.05) and 1014 will be represented as '1'
+ followed by 14 zeros.
+ Values less than (1014-0.05) will get Shifted by one more power of 10
+
+ This frac value rounds to '1' followed by fourteen zeros with an incremented decimal exponent
+
+
+ For 'Base-10 normalised form'
+ The maximum {@link #_frac} value when {@link #_binaryExponent} == 49
+ (10^15-0.5) * 2^14
+
+
+ Width of a long
+
+
+ Minimum precision after discarding whole 32-bit words from the significand
+
+
+ @param nBits number of bits to shift right
+
+
+ Holds values for quick multiplication and division by 10
+
+
+ Number of powers of ten Contained in the significand
+
+
+ 219
+
+
+ the value of {@link #_fractionalPart} that represents 0.5
+
+
+ 1015
+
+
+ Rounds at the digit with value 10decimalExponent
+
+
+ The decimal exponent increased by one less than the digit count of {@link #_wholePart}
+
+
+ The whole part of the significand (typically 15 digits).
+
+ 47-50 bits long (MSB may be anywhere from bit 46 to 49)
+ LSB is units bit.
+
+
+ The fractional part of the significand.
+ 24 bits (only top 14-17 bits significant): a value between 0x000000 and 0xFFFF80
+
+
+ Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent).
+ The resulting transformed object is easily Converted to a 64 bit IEEE double:
+
+
bits 2-53 of the {@link #GetSignificand()} become the 52 bit 'fraction'.
+
{@link #GetBinaryExponent()} is biased by 1023 to give the 'exponent'.
+
+ The sign bit must be obtained from somewhere else.
+ @return a new {@link NormalisedDecimal} normalised to base 2 representation.
+
+
+ @return the significand as a fixed point number (with 24 fraction bits and 47-50 whole bits)
+
+
+ Rounds the first whole digit position (considers only units digit, not frational part).
+ Caller should check total digit count of result to see whether the rounding operation caused
+ a carry out of the most significant digit
+
+
+ @return the number of powers of 10 which have been extracted from the significand and binary exponent.
+
+
+ assumes both this and other are normalised
+
+
+ This class attempts to reproduce Excel's behaviour for comparing numbers. Results are
+ mostly the same as those from {@link Double#compare(double, double)} but with some
+ rounding. For numbers that are very close, this code converts to a format having 15
+ decimal digits of precision and a decimal exponent, before completing the comparison.
+
+ In Excel formula evaluation, expressions like "(0.06-0.01)=0.05" evaluate to "TRUE" even
+ though the equivalent java expression is false. In examples like this,
+ Excel achieves the effect by having additional logic for comparison operations.
+
+
+ Note - Excel also gives special treatment to expressions like "0.06-0.01-0.05" which
+ evaluates to "0" (in java, rounding anomalies give a result of 6.9E-18). The special
+ behaviour here is for different reasons to the example above: If the last operator in a
+ cell formula is '+' or '-' and the result is less than 250 times smaller than
+ first operand, the result is rounded to zero.
+ Needless to say, the two rules are not consistent and it is relatively easy to find
+ examples that satisfy
+ "A=B" is "TRUE" but "A-B" is not "0"
+ and
+ "A=B" is "FALSE" but "A-B" is "0"
+
+ This rule (for rounding the result of a final addition or subtraction), has not been
+ implemented in POI (as of Jul-2009).
+
+ @return negative, 0, or positive according to the standard Excel comparison
+ of values a and b.
+
+
+ If both numbers are subnormal, Excel seems to use standard comparison rules
+
+
+ Usually any normal number is greater (in magnitude) than any subnormal number.
+ However there are some anomalous cases around the threshold where Excel produces screwy results
+ @param isNegative both values are either negative or positive. This parameter affects the sign of the comparison result
+ @return usually isNegative ? -1 : +1
+
+
+ for formatting double values in error messages
+
+
+ Converts the supplied value to the text representation that Excel would give if
+ the value were to appear in an unformatted cell, or as a literal number in a formula.
+ Note - the results from this method differ slightly from those of Double.ToString()
+ In some special cases Excel behaves quite differently. This function attempts to reproduce
+ those results.
+
+
+ Holds information regarding a split plane or freeze plane for a sheet.
+
+
+
+ Constant for active pane being the lower right
+
+
+ Constant for active pane being the upper right
+
+
+ Constant for active pane being the lower left
+
+
+ Constant for active pane being the upper left
+
+
+ Returns the vertical position of the split.
+ @return 0 if there is no vertical spilt,
+ or for a freeze pane the number of columns in the TOP pane,
+ or for a split plane the position of the split in 1/20th of a point.
+
+
+ Returns the horizontal position of the split.
+ @return 0 if there is no horizontal spilt,
+ or for a freeze pane the number of rows in the LEFT pane,
+ or for a split plane the position of the split in 1/20th of a point.
+
+
+ For a horizontal split returns the top row in the BOTTOM pane.
+ @return 0 if there is no horizontal split, or the top row of the bottom pane.
+
+
+ For a vertical split returns the left column in the RIGHT pane.
+ @return 0 if there is no vertical split, or the left column in the RIGHT pane.
+
+
+ Returns the active pane
+ @see #PANE_LOWER_RIGHT
+ @see #PANE_UPPER_RIGHT
+ @see #PANE_LOWER_LEFT
+ @see #PANE_UPPER_LEFT
+ @return the active pane.
+
+
+ Returns true if this is a Freeze pane, false if it is a split pane.
+
+
+ Represents a from/to row/col square. This is a object primitive
+ that can be used to represent row,col - row,col just as one would use String
+ to represent a string of characters. Its really only useful for HSSF though.
+
+ @author Andrew C. Oliver acoliver at apache dot org
+
+
+ Creates a new instance of Region (0,0 - 0,0)
+
+
+ Get the upper left hand corner column number
+
+ @return column number for the upper left hand corner
+
+
+ Get the upper left hand corner row number
+
+ @return row number for the upper left hand corner
+
+
+ Get the lower right hand corner column number
+
+ @return column number for the lower right hand corner
+
+
+ Get the lower right hand corner row number
+
+ @return row number for the lower right hand corner
+
+
+ Convert a List of CellRange objects to an array of regions
+
+ @param List of CellRange objects
+ @return regions
+
+
+ Various utility functions that make working with a region of cells easier.
+
+ @author Eric Pugh epugh@upstate.com
+ @author (secondary) Avinash Kewalramani akewalramani@accelrys.com
+
+
+ For setting the same property on many cells to the same value
+
+
+ Sets the left border for a region of cells by manipulating the cell style of the individual
+ cells on the left
+
+ @param border The new border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the leftBorderColor attribute of the RegionUtil object
+
+ @param color The color of the border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the borderRight attribute of the RegionUtil object
+
+ @param border The new border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the rightBorderColor attribute of the RegionUtil object
+
+ @param color The color of the border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the borderBottom attribute of the RegionUtil object
+
+ @param border The new border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the bottomBorderColor attribute of the RegionUtil object
+
+ @param color The color of the border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the borderBottom attribute of the RegionUtil object
+
+ @param border The new border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Sets the topBorderColor attribute of the RegionUtil object
+
+ @param color The color of the border
+ @param region The region that should have the border
+ @param workbook The workbook that the region is on.
+ @param sheet The sheet that the region is on.
+
+
+ Class {@code SheetBuilder} provides an easy way of building workbook sheets
+ from 2D array of Objects. It can be used in test cases to improve code
+ readability or in Swing applications with tables.
+
+ @author Roman Kashitsyn
+
+
+ Returns {@code true} if null array elements should be treated as empty
+ cells.
+
+ @return {@code true} if null objects should be treated as empty cells
+ and {@code false} otherwise
+
+
+ Specifies if null array elements should be treated as empty cells.
+
+ @param shouldCreateEmptyCells {@code true} if null array elements should be
+ treated as empty cells
+ @return {@code this}
+
+
+ Specifies name of the sheet to build. If not specified, default name (provided by
+ workbook) will be used instead.
+ @param sheetName sheet name to use
+ @return {@code this}
+
+
+ Builds sheet from parent workbook and 2D array with cell
+ values. Creates rows anyway (even if row contains only null
+ cells), creates cells if either corresponding array value is not
+ null or createEmptyCells property is true.
+ The conversion is performed in the following way:
+
+
+
Numbers become numeric cells.
+
java.util.Date or java.util.Calendar
+ instances become date cells.
+
String with leading '=' char become formulas (leading '='
+ will be truncated).
+
Other objects become strings via Object.toString()
+ method call.
+
+
+ @return newly created sheet
+
+
+ Sets the cell value using object type information.
+ @param cell cell to change
+ @param value value to set
+
+
+ Holds a collection of Sheet names and their associated
+ reference numbers.
+
+ @author Andrew C. Oliver (acoliver at apache dot org)
+
+
+
+ Helper methods for when working with Usermodel sheets
+
+ @author Yegor Kozlov
+
+
+ Dummy formula Evaluator that does nothing.
+ YK: The only reason of having this class is that
+ {@link NPOI.SS.UserModel.DataFormatter#formatCellValue(NPOI.SS.UserModel.Cell)}
+ returns formula string for formula cells. Dummy Evaluator Makes it to format the cached formula result.
+
+ See Bugzilla #50021
+
+
+ Compute width of a single cell
+
+ @param cell the cell whose width is to be calculated
+ @param defaultCharWidth the width of a single character
+ @param formatter formatter used to prepare the text to be measured
+ @param useMergedCells whether to use merged cells
+ @return the width in pixels
+
+
+ Compute width of a column and return the result
+
+ @param sheet the sheet to calculate
+ @param column 0-based index of the column
+ @param useMergedCells whether to use merged cells
+ @return the width in pixels
+
+
+
+ Convert HSSFFont to Font.
+
+ The font.
+
+
+
+ Generate a valid sheet name based on the existing one. Used when cloning sheets.
+
+ @param srcName the original sheet name to
+ @return clone sheet name
+
+
+ Return the cell, taking account of merged regions. Allows you to find the
+ cell who's contents are Shown in a given position in the sheet.
+
+
If the cell at the given co-ordinates is a merged cell, this will
+ return the primary (top-left) most cell of the merged region.
+
If the cell at the given co-ordinates is not in a merged region,
+ then will return the cell itself.
+
If there is no cell defined at the given co-ordinates, will return
+ null.
+
+
+ For POI internal use only
+
+ @author Josh Micich
+
+
+ Helper methods for when working with Usermodel Workbooks
+
+
+ Creates a valid sheet name, which is conform to the rules.
+ In any case, the result safely can be used for
+ {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}.
+
+ Rules:
+
Sheet names must not begin or end with ' (apostrophe)
+
+ Invalid characters are replaced by one space character ' '.
+
+ @param nameProposal can be any string, will be truncated if necessary,
+ allowed to be null
+ @return a valid string, "empty" if to short, "null" if null
+
+
+ Creates a valid sheet name, which is conform to the rules.
+ In any case, the result safely can be used for
+ {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}.
+
+ Rules:
+
Sheet names must not begin or end with ' (apostrophe)
+
+
+ @param nameProposal can be any string, will be truncated if necessary,
+ allowed to be null
+ @param replaceChar the char to replace invalid characters.
+ @return a valid string, "empty" if to short, "null" if null
+
+
+ Validates sheet name.
+
+
+ The character count MUST be greater than or equal to 1 and less than or equal to 31.
+ The string MUST NOT contain the any of the following characters:
+
+
0x0000
+
0x0003
+
colon (:)
+
backslash (\)
+
asterisk (*)
+
question mark (?)
+
forward slash (/)
+
opening square bracket ([)
+
closing square bracket (])
+
+ The string MUST NOT begin or end with the single quote (') character.
+
+
+ @param sheetName the name to validate
+
+
+ This enum allows spReadsheets from multiple Excel versions to be handled by the common code.
+ Properties of this enum correspond to attributes of the spReadsheet that are easily
+ discernable to the user. It is not intended to deal with low-level issues like file formats.
+
+
+ @author Josh Micich
+ @author Yegor Kozlov
+
+
+ Excel97 format aka BIFF8
+
+
The total number of available columns is 256 (2^8)
+
The total number of available rows is 64k (2^16)
+
The maximum number of arguments to a function is 30
+
Number of conditional format conditions on a cell is 3
+
Length of text cell contents is unlimited
+
Length of text cell contents is 32767
+
+
+
+ Excel2007
+
+
+
The total number of available columns is 16K (2^14)
+
The total number of available rows is 1M (2^20)
+
The maximum number of arguments to a function is 255
+
Number of conditional format conditions on a cell is unlimited
+ (actually limited by available memory in Excel)
+
Length of text cell contents is unlimited
+
+
+
+ @return the default file extension of spReadsheet
+
+
+ @return the maximum number of usable rows in each spReadsheet
+
+
+ @return the last (maximum) valid row index, equals to GetMaxRows() - 1
+
+
+ @return the maximum number of usable columns in each spReadsheet
+
+
+ @return the last (maximum) valid column index, equals to GetMaxColumns() - 1
+
+
+ @return the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF)
+
+
+
+ @return the maximum number of conditional format conditions on a cell
+
+
+
+ @return the last valid column index in a ALPHA-26 representation
+ (IV or XFD).
+
+
+ @return the maximum number of cell styles per spreadsheet
+
+
+ @return the maximum length of a text cell
+
+
+
+ This holds the common functionality for all POI
+ Document classes.
+ Currently, this relates to Document Information Properties
+
+ @author Nick Burch
+
+
+ Holds metadata on our document
+
+
+ Holds further metadata on our document
+
+
+ The directory that our document lives in
+
+
+ For our own logging use
+
+
+
+ Initializes a new instance of the class.
+
+ The dir.
+ The fs.
+
+
+
+ Initializes a new instance of the class.
+
+ The fs.
+
+
+ Will create whichever of SummaryInformation
+ and DocumentSummaryInformation (HPSF) properties
+ are not already part of your document.
+ This is normally useful when creating a new
+ document from scratch.
+ If the information properties are already there,
+ then nothing will happen.
+
+
+
+ Fetch the Document Summary Information of the document
+
+ The document summary information.
+
+
+
+ Fetch the Summary Information of the document
+
+ The summary information.
+
+
+
+ Find, and Create objects for, the standard
+ Documment Information Properties (HPSF).
+ If a given property Set is missing or corrupt,
+ it will remain null;
+
+
+
+
+ For a given named property entry, either return it or null if
+ if it wasn't found
+
+ Name of the set.
+
+
+
+
+ Writes out the standard Documment Information Properties (HPSF)
+
+ the POIFSFileSystem to Write the properties into
+
+
+
+ Writes out the standard Documment Information Properties (HPSF)
+
+ the POIFSFileSystem to Write the properties into.
+ a list of POIFS entries to Add the property names too.
+
+
+
+ Writes out a given ProperySet
+
+ the (POIFS Level) name of the property to Write.
+ the PropertySet to Write out.
+ the POIFSFileSystem to Write the property into.
+
+
+
+ Writes the document out to the specified output stream
+
+ The out1.
+
+
+
+ Copies nodes from one POIFS to the other minus the excepts
+
+ the source POIFS to copy from.
+ the target POIFS to copy to
+ a list of Strings specifying what nodes NOT to copy
+
+
+
+ Copies nodes from one POIFS to the other minus the excepts
+
+ the source POIFS to copy from.
+ the target POIFS to copy to
+ a list of Strings specifying what nodes NOT to copy
+
+
+
+ Checks to see if the String is in the list, used when copying
+ nodes between one POIFS and another
+
+ The entry.
+ The list.
+
+ true if [is in list] [the specified entry]; otherwise, false.
+
+
+
+
+ Copies an Entry into a target POIFS directory, recursively
+
+ The entry.
+ The target.
+
+
+ Base class of all the exceptions that POI throws in the event
+ that it's given a file that isn't supported
+
+
+
+ Common Parent for OLE2 based Text Extractors
+ of POI Documents, such as .doc, .xls
+ You will typically find the implementation of
+ a given format's text extractor under NPOI.Format.Extractor
+
+
+ @see org.apache.poi.hssf.extractor.ExcelExtractor
+ @see org.apache.poi.hslf.extractor.PowerPointExtractor
+ @see org.apache.poi.hdgf.extractor.VisioTextExtractor
+ @see org.apache.poi.hwpf.extractor.WordExtractor
+
+
+
+
+ Creates a new text extractor for the given document
+
+
+
+
+
+ Returns the document information metadata for the document
+
+ The doc summary information.
+
+
+
+ Returns the summary information metadata for the document
+
+ The summary information.
+
+
+
+ Returns an HPSF powered text extractor for the
+ document properties metadata, such as title and author.
+
+
+
+
+
+ Common Parent for Text Extractors
+ of POI Documents.
+ You will typically find the implementation of
+ a given format's text extractor under
+ org.apache.poi.[format].extractor .
+
+ @see org.apache.poi.hssf.extractor.ExcelExtractor
+ @see org.apache.poi.hslf.extractor.PowerPointExtractor
+ @see org.apache.poi.hdgf.extractor.VisioTextExtractor
+ @see org.apache.poi.hwpf.extractor.WordExtractor
+
+
+ The POIDocument that's open
+
+
+
+ Creates a new text extractor for the given document
+
+ The document.
+
+
+
+ Creates a new text extractor, using the same
+ document as another text extractor. Normally
+ only used by properties extractors.
+
+ The other extractor.
+
+
+
+ Retrieves all the text from the document.
+ How cells, paragraphs etc are separated in the text
+ is implementation specific - see the javadocs for
+ a specific project for details.
+
+ All the text from the document.
+
+
+
+ Returns another text extractor, which is able to
+ output the textual content of the document
+ metadata / properties, such as author and title.
+
+ The metadata text extractor.
+
+
+ This class represents a run of text that share common properties.
+
+
+ @return The text of the Run, including any tabs/spaces/etc
+
+
+ This class represents a paragraph, made up of one or more
+ Runs of text.
+
+
+
diff --git a/MES_Manage/Bin/Newtonsoft.Json.dll b/MES_Manage/Bin/Newtonsoft.Json.dll
new file mode 100644
index 0000000..597a1ce
Binary files /dev/null and b/MES_Manage/Bin/Newtonsoft.Json.dll differ
diff --git a/MES_Manage/Bin/Newtonsoft.Json.dll.refresh b/MES_Manage/Bin/Newtonsoft.Json.dll.refresh
new file mode 100644
index 0000000..adbcde3
Binary files /dev/null and b/MES_Manage/Bin/Newtonsoft.Json.dll.refresh differ
diff --git a/MES_Manage/Bin/Spire.License.dll b/MES_Manage/Bin/Spire.License.dll
new file mode 100644
index 0000000..fb625d3
Binary files /dev/null and b/MES_Manage/Bin/Spire.License.dll differ
diff --git a/MES_Manage/Bin/Spire.Pdf.dll b/MES_Manage/Bin/Spire.Pdf.dll
new file mode 100644
index 0000000..a3a0ba6
Binary files /dev/null and b/MES_Manage/Bin/Spire.Pdf.dll differ
diff --git a/MES_Manage/Bin/Spire.XLS.dll b/MES_Manage/Bin/Spire.XLS.dll
new file mode 100644
index 0000000..6a7e9be
Binary files /dev/null and b/MES_Manage/Bin/Spire.XLS.dll differ
diff --git a/MES_Manage/Bin/WriteExcelNPOI.dll b/MES_Manage/Bin/WriteExcelNPOI.dll
new file mode 100644
index 0000000..9337446
Binary files /dev/null and b/MES_Manage/Bin/WriteExcelNPOI.dll differ
diff --git a/MES_Manage/Bin/WriteExcelNPOI.pdb b/MES_Manage/Bin/WriteExcelNPOI.pdb
new file mode 100644
index 0000000..c76798f
Binary files /dev/null and b/MES_Manage/Bin/WriteExcelNPOI.pdb differ
diff --git a/MES_Manage/Bin/WriteExcelNPOI.xml b/MES_Manage/Bin/WriteExcelNPOI.xml
new file mode 100644
index 0000000..9529d4b
--- /dev/null
+++ b/MES_Manage/Bin/WriteExcelNPOI.xml
@@ -0,0 +1,1265 @@
+
+
+
+ WriteExcelNPOI
+
+
+
+
+ 00 标准DataTable
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+ 04 自家项目报表
+ 05 材料清单
+
+
+ 00 标准DataTable
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+ 04 自家项目报表
+ 05 材料清单
+
+
+
+
+ 返回Excel数据流和文件名
+
+
+
+
+
+
+
+
+ 返回Excel数据流和文件名
+
+
+
+
+
+
+
+
+ Execl工具辅助类
+
+
+
+
+ 读取Execl数据到DataTable中
+
+ 指定Execl文件路径
+ 设置第一行是否是列名
+ 返回一个DataTable数据集
+
+
+
+ 将DataTable导出到Execl文档
+
+ 传入一个DataTable数据集
+ 返回一个Bool类型的值,表示是否导出成功
+ True表示导出成功,Flase表示导出失败
+
+
+
+ 读取Execl数据到DataTable(DataSet)中
+
+ 指定Execl文件路径
+ 设置第一行是否是列名
+ 返回一个DataTable数据集
+
+
+
+ 将DataTable(DataSet)导出到Execl文档
+
+ 传入一个DataSet
+ 导出路径(可以不加扩展名,不加默认为.xls)
+ 返回一个Bool类型的值,表示是否导出成功
+ True表示导出成功,Flase表示导出失败
+
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 00 标准DataTable
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+ 00 标准DataTable
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+
+
+ 读取Excel后的TableData
+
+
+
+
+ 读取Excel后的TableData,excelDataTable
+
+
+
+
+
+ 读取单元数据
+
+
+
+
+
+
+
+ 获得Excel行数据
+
+
+
+
+
+
+ LLX增加
+ 20190923,1907
+
+
+
+
+
+
+ 根据模板填写报表
+
+
+
+
+
+
+
+
+
+
+ 是否数字列
+ 填写的数据
+
+
+
+
+
+ 按模板填写数据
+
+
+
+
+
+
+ 根据模板填写报表
+
+
+
+
+
+
+
+
+
+
+ 是否数字列
+ 填写的数据
+
+
+
+
+
+ 按模板填写数据
+
+
+
+
+
+
+ 根据模板填写报表
+
+
+
+
+
+
+
+
+ 导出标准表,填写对应的图片
+
+ dt0 表数据,dt1 对应的图形
+
+
+
+
+
+
+
+
+ 填写的数据
+
+
+
+
+
+ 导出标准表,填写对应的图片
+
+ dt0 表数据,dt1 对应的图形
+
+
+
+
+
+
+
+
+ 填写的数据
+
+
+
+
+
+ Reset the image to the original size.
+
+
+
+
+ 设定表字段的标准表导出
+
+
+
+
+
+
+
+
+
+
+ 填写的数据
+ 是否数字列
+
+
+
+
+
+ 一对多,两个表组合,通过关键字连接 keyword
+ 第一个是主表
+ 第二个是附表,附表第一个字段是keyword
+
+
+
+
+
+
+
+ 设定表字段的标准表导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 一对多,两个表组合
+
+
+
+
+
+
+
+ 按模板填写数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 带两行表头的标准表
+
+
+
+
+
+
+ 带一行表头的标准表
+
+
+
+
+
+
+ 一行表头,自定义字段宽度
+
+
+
+
+
+
+
+ 创建表头
+
+ 定义字段宽度
+ 表体内容
+
+ 创建表头的行号
+
+
+
+
+ 带两行表头的标准表
+
+
+
+
+
+
+ 带两行表头的标准表
+
+
+
+
+
+
+
+ 带一行表头的标准表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 读取Execl数据到DataTable中
+
+ 指定Execl文件路径
+ 设置第一行是否是列名
+ 返回一个DataTable数据集
+
+
+
+ 将DataTable导出到Execl文档
+
+ 传入一个DataTable数据集
+ 返回一个Bool类型的值,表示是否导出成功
+ True表示导出成功,Flase表示导出失败
+
+
+
+ 将DataTable导出到Execl文档
+
+ 传入一个DataTable数据集
+ 返回一个Bool类型的值,表示是否导出成功
+ True表示导出成功,Flase表示导出失败
+
+
+
+ 将DataTable导出到Execl文档
+
+ 传入一个DataTable数据集
+ 返回一个Bool类型的值,表示是否导出成功
+ True表示导出成功,Flase表示导出失败
+
+
+
+ 一对多,两个表组合
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 材料清单,机床分配
+
+ 材料清单
+ 机床分配
+
+
+
+ 03 外购备料请款
+
+
+
+
+
+
+ 03 外购备料请款
+
+
+
+
+
+
+
+ 02 外协加工任务单
+
+
+
+
+
+
+ 02 外协加工任务单
+
+
+
+
+
+
+
+ 02 外协加工任务单
+
+
+
+
+
+
+
+ 04 自家项目报表
+
+
+
+
+
+
+ 00 标准DataTable
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+ 04 自家项目报表
+
+
+
+
+
+
+
+ 自家项目报表
+ 模板代码 04
+
+
+
+
+ 自家项目报表
+ 模板代码 04
+
+
+
+
+
+
+
+ 自家项目报表
+ 模板代码 04
+ ///
+
+
+
+
+
+
+
+
+
+
+ 04
+
+
+
+
+
+
+
+
+
+ 创建单元格,
+ tableType=1 左半部分;=2 右半部分
+
+
+
+ BODY起始行
+ 单元格填写的文本
+ 填写文字的单元格行索引
+ 填写单元的列索引
+ 合并的行数,行方向不合并=0
+ 合并后的下一列起始列索引
+
+
+
+ 将Excle字节转换成PDF字节
+
+
+
+
+
+
+ 创建PDF文件
+
+ Excel
+
+
+
+
+ 通过模板文件数据流和Sheet索引,获得对应的表数据
+
+
+
+
+
+
+
+ 通过模板文件和Sheet索引,获得对应的表数据
+
+
+
+
+
+
+
+ 根据Sheet索引,获得对应的表数据
+
+
+
+
+
+ 创建Excel文件。
+ 根据数据流,文件后缀
+
+ 数据流
+ 文件后缀
+ 创建Excel文件
+
+
+
+
+
+
+
+ 仅仅文件名称,无文件后缀
+
+
+
+ 创建Excel文件
+
+
+
+
+
+
+ 打开模板文件流数据
+ 返回模板WorkBook
+
+
+
+
+
+
+
+
+
+ 2007版本"xlsx" 2003版本 "xls"
+
+
+
+
+ 删除无用的Sheet
+
+
+
+
+
+ 填充模板头部和底部数据
+
+
+ 准备填充的数据
+
+
+
+ 填充模板头部和底部数据
+
+
+ 模板数据
+ 填充数据
+
+
+
+
+
+ 输入序号
+ 模板数据
+ 序号对应的row
+ 序号对应的col
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 通过模板文件和输入的数据,输出Excel文件
+
+ 外协加工任务单.xls
+
+
+ 输出Excel文件
+
+
+
+ 通过模板文件数据流和输入的数据,输出Excel文件
+ 外协加工任务单.xls
+
+ 模板文件数据流
+
+
+ 输出Excel文件
+
+
+
+ 通过模板文件和输入的数据,输出Excel文件的数据流
+ 外协加工任务单.xls
+
+ 模板文件
+
+
+ 输出Excel文件的数据流
+
+
+
+ 通过模板文件数据流和输入的数据,输出Excel文件的数据流
+ 外协加工任务单.xls
+
+ 模板文件数据流
+
+
+ 输出Excel文件的数据流
+
+
+
+ 计划工时模板
+
+ 01
+
+
+
+
+ 材料清单,机床分配
+
+ 材料清单
+ 机床分配
+
+
+
+ 根据材料清单序号和机床名称,获得对应的重量和金额
+
+
+
+
+
+
+ 负责写表头
+
+
+
+
+
+
+ 获取当前单元格所在的合并单元格的位置
+
+ sheet表单
+ 行索引 0开始
+ 列索引 0开始
+ CellRangeAddress
+ 返回false表示非合并单元格
+
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+ 文件代码
+
+ 01 计划工时模板
+ 02 外协加工任务单
+ 03 外购备料请款
+
+
+
+
+ _文件存储_查询_根据文件代码
+
+ 文件代码
+ 下载名称
+ 文件内容
+
+
+
+
+ 更新文件代码和下载名称
+
+
+ 文件代码
+ 下载名称
+
+
+
+ _文件存储_查询_根据文件代码
+
+ 文件代码
+ 下载名称
+ 文件内容
+
+
+
+
+ 更新文件代码和下载名称
+
+
+ 文件代码
+ 下载名称
+
+
+
+ excel的路径
+ 预览Excel文件
+
+
+
+
+
+ 将DataSet转化成JSON数据
+
+
+
+
+
+
+
+
+
+ 报表类型代码
+ 匹配表代码
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+ 执行增、删、改存储过程 储过程加入 select @@identity
+
+
+
+ 返回自动编号
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+ 用存储过程查询数据,输出表集合
+
+
+
+
+
+
+
+
+ 通过执行SQL语句,查询数据库
+
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改。返回后面Select 参数 行数或自动编号
+
+
+
+
+
+
+
+ 执行不带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行不带参数的SQL语句,完成数据查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成数据查询
+
+
+
+
+
+
+
+ 分页查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+
+ 输入表名
+ 输入字段对应的值
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+
+
+
+ 根据条件,更新数据库
+
+ 被更新的表
+ 更改的字段与值对应表
+ 更改的字段与值对应表的条件
+
+
+
+
+ 根据条件,删除对应的记录
+
+
+
+
+
+
+
+
+
+
+ 报表类型代码
+ 匹配表代码
+
+
+
+
+
+
+ 根据传入的json type\procegureName\param
+ 输出
+
+
+ 模板类型
+ 存储过程
+ 存储过程参数
+
+
+
+ 获得 Json 的Type值
+
+
+
+
+
+
+ 获得 Json 的Name值
+
+
+
+
+
+
+ 获得 Json 的Param值
+
+
+
+
+
+
+ 执行增、删、改存储过程
+
+
+
+
+
+
+
+ 执行增、删、改存储过程 储过程加入 select @@identity
+
+
+
+ 返回自动编号
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+ 用存储过程查询数据
+
+
+
+
+
+
+
+
+ 用存储过程查询数据,输出表集合
+
+
+
+
+
+
+
+
+ 通过执行SQL语句,查询数据库
+
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改
+
+
+
+
+
+
+ 通过执行SQL语句,实现对表的增、删、改。返回后面Select 参数 行数或自动编号
+
+
+
+
+
+
+
+ 执行不带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成增、删、改
+
+
+
+
+
+
+
+ 执行不带参数的SQL语句,完成数据查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 执行带参数的SQL语句,完成数据查询
+
+
+
+
+
+
+
+ 分页查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+
+ 输入表名
+ 输入字段对应的值
+
+
+
+
+ 将数据插入数据库
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+ 输入表名
+ 输入字段对应的值
+ 返回自动编号
+
+
+
+
+ 根据条件,更新数据库
+
+ 被更新的表
+ 更改的字段与值对应表
+ 更改的字段与值对应表的条件
+
+
+
+
+ 根据条件,删除对应的记录
+
+
+
+
+
+
+
diff --git a/MES_Manage/Bin/_system~.ini b/MES_Manage/Bin/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/JS/_system~.ini b/MES_Manage/JS/_system~.ini
new file mode 100644
index 0000000..e69de29
diff --git a/MES_Manage/JS/jquery-3.2.1.min.js b/MES_Manage/JS/jquery-3.2.1.min.js
new file mode 100644
index 0000000..644d35e
--- /dev/null
+++ b/MES_Manage/JS/jquery-3.2.1.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
+!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
+a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"