Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • CholeskyDecomposition
  • Dao
  • DateTime
  • DateTimeZone
  • DOMNode
  • EigenvalueDecomposition
  • Elemento
  • Historial
  • Irradiacion
  • Latitud
  • MotorPhp
  • Panel
  • PclZip
  • Periodo
  • PHPExcel
  • PHPExcel_Autoloader
  • PHPExcel_Best_Fit
  • PHPExcel_CachedObjectStorage_APC
  • PHPExcel_CachedObjectStorage_CacheBase
  • PHPExcel_CachedObjectStorage_DiscISAM
  • PHPExcel_CachedObjectStorage_Igbinary
  • PHPExcel_CachedObjectStorage_Memcache
  • PHPExcel_CachedObjectStorage_Memory
  • PHPExcel_CachedObjectStorage_MemoryGZip
  • PHPExcel_CachedObjectStorage_MemorySerialized
  • PHPExcel_CachedObjectStorage_PHPTemp
  • PHPExcel_CachedObjectStorage_SQLite
  • PHPExcel_CachedObjectStorage_SQLite3
  • PHPExcel_CachedObjectStorage_Wincache
  • PHPExcel_CachedObjectStorageFactory
  • PHPExcel_CalcEngine_CyclicReferenceStack
  • PHPExcel_CalcEngine_Logger
  • PHPExcel_Calculation
  • PHPExcel_Calculation_Database
  • PHPExcel_Calculation_DateTime
  • PHPExcel_Calculation_Engineering
  • PHPExcel_Calculation_ExceptionHandler
  • PHPExcel_Calculation_Financial
  • PHPExcel_Calculation_FormulaParser
  • PHPExcel_Calculation_FormulaToken
  • PHPExcel_Calculation_Function
  • PHPExcel_Calculation_Functions
  • PHPExcel_Calculation_Logical
  • PHPExcel_Calculation_LookupRef
  • PHPExcel_Calculation_MathTrig
  • PHPExcel_Calculation_Statistical
  • PHPExcel_Calculation_TextData
  • PHPExcel_Calculation_Token_Stack
  • PHPExcel_Cell
  • PHPExcel_Cell_AdvancedValueBinder
  • PHPExcel_Cell_DataType
  • PHPExcel_Cell_DataValidation
  • PHPExcel_Cell_DefaultValueBinder
  • PHPExcel_Cell_Hyperlink
  • PHPExcel_Chart
  • PHPExcel_Chart_DataSeries
  • PHPExcel_Chart_DataSeriesValues
  • PHPExcel_Chart_Layout
  • PHPExcel_Chart_Legend
  • PHPExcel_Chart_PlotArea
  • PHPExcel_Chart_Renderer_jpgraph
  • PHPExcel_Chart_Title
  • PHPExcel_Comment
  • PHPExcel_DocumentProperties
  • PHPExcel_DocumentSecurity
  • PHPExcel_Exponential_Best_Fit
  • PHPExcel_HashTable
  • PHPExcel_IOFactory
  • PHPExcel_Linear_Best_Fit
  • PHPExcel_Logarithmic_Best_Fit
  • PHPExcel_NamedRange
  • PHPExcel_Polynomial_Best_Fit
  • PHPExcel_Power_Best_Fit
  • PHPExcel_Reader_Abstract
  • PHPExcel_Reader_CSV
  • PHPExcel_Reader_DefaultReadFilter
  • PHPExcel_Reader_Excel2003XML
  • PHPExcel_Reader_Excel2007
  • PHPExcel_Reader_Excel2007_Chart
  • PHPExcel_Reader_Excel2007_Theme
  • PHPExcel_Reader_Excel5
  • PHPExcel_Reader_Excel5_Escher
  • PHPExcel_Reader_Excel5_MD5
  • PHPExcel_Reader_Excel5_RC4
  • PHPExcel_Reader_Gnumeric
  • PHPExcel_Reader_HTML
  • PHPExcel_Reader_OOCalc
  • PHPExcel_Reader_SYLK
  • PHPExcel_ReferenceHelper
  • PHPExcel_RichText
  • PHPExcel_RichText_Run
  • PHPExcel_RichText_TextElement
  • PHPExcel_Settings
  • PHPExcel_Shared_CodePage
  • PHPExcel_Shared_Date
  • PHPExcel_Shared_Drawing
  • PHPExcel_Shared_Escher
  • PHPExcel_Shared_Escher_DgContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer
  • PHPExcel_Shared_Escher_DggContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip
  • PHPExcel_Shared_Excel5
  • PHPExcel_Shared_File
  • PHPExcel_Shared_Font
  • PHPExcel_Shared_JAMA_LUDecomposition
  • PHPExcel_Shared_JAMA_Matrix
  • PHPExcel_Shared_JAMA_QRDecomposition
  • PHPExcel_Shared_OLE
  • PHPExcel_Shared_OLE_ChainedBlockStream
  • PHPExcel_Shared_OLE_PPS
  • PHPExcel_Shared_OLE_PPS_File
  • PHPExcel_Shared_OLE_PPS_Root
  • PHPExcel_Shared_OLERead
  • PHPExcel_Shared_PasswordHasher
  • PHPExcel_Shared_String
  • PHPExcel_Shared_TimeZone
  • PHPExcel_Shared_XMLWriter
  • PHPExcel_Shared_ZipArchive
  • PHPExcel_Shared_ZipStreamWrapper
  • PHPExcel_Style
  • PHPExcel_Style_Alignment
  • PHPExcel_Style_Border
  • PHPExcel_Style_Borders
  • PHPExcel_Style_Color
  • PHPExcel_Style_Conditional
  • PHPExcel_Style_Fill
  • PHPExcel_Style_Font
  • PHPExcel_Style_NumberFormat
  • PHPExcel_Style_Protection
  • PHPExcel_Style_Supervisor
  • PHPExcel_Worksheet
  • PHPExcel_Worksheet_AutoFilter
  • PHPExcel_Worksheet_AutoFilter_Column
  • PHPExcel_Worksheet_AutoFilter_Column_Rule
  • PHPExcel_Worksheet_BaseDrawing
  • PHPExcel_Worksheet_CellIterator
  • PHPExcel_Worksheet_ColumnDimension
  • PHPExcel_Worksheet_Drawing
  • PHPExcel_Worksheet_Drawing_Shadow
  • PHPExcel_Worksheet_HeaderFooter
  • PHPExcel_Worksheet_HeaderFooterDrawing
  • PHPExcel_Worksheet_MemoryDrawing
  • PHPExcel_Worksheet_PageMargins
  • PHPExcel_Worksheet_PageSetup
  • PHPExcel_Worksheet_Protection
  • PHPExcel_Worksheet_Row
  • PHPExcel_Worksheet_RowDimension
  • PHPExcel_Worksheet_RowIterator
  • PHPExcel_Worksheet_SheetView
  • PHPExcel_WorksheetIterator
  • PHPExcel_Writer_Abstract
  • PHPExcel_Writer_CSV
  • PHPExcel_Writer_Excel2007
  • PHPExcel_Writer_Excel2007_Chart
  • PHPExcel_Writer_Excel2007_Comments
  • PHPExcel_Writer_Excel2007_ContentTypes
  • PHPExcel_Writer_Excel2007_DocProps
  • PHPExcel_Writer_Excel2007_Drawing
  • PHPExcel_Writer_Excel2007_Rels
  • PHPExcel_Writer_Excel2007_RelsRibbon
  • PHPExcel_Writer_Excel2007_RelsVBA
  • PHPExcel_Writer_Excel2007_StringTable
  • PHPExcel_Writer_Excel2007_Style
  • PHPExcel_Writer_Excel2007_Theme
  • PHPExcel_Writer_Excel2007_Workbook
  • PHPExcel_Writer_Excel2007_Worksheet
  • PHPExcel_Writer_Excel2007_WriterPart
  • PHPExcel_Writer_Excel5
  • PHPExcel_Writer_Excel5_BIFFwriter
  • PHPExcel_Writer_Excel5_Escher
  • PHPExcel_Writer_Excel5_Font
  • PHPExcel_Writer_Excel5_Parser
  • PHPExcel_Writer_Excel5_Workbook
  • PHPExcel_Writer_Excel5_Worksheet
  • PHPExcel_Writer_Excel5_Xf
  • PHPExcel_Writer_HTML
  • PHPExcel_Writer_PDF
  • PHPExcel_Writer_PDF_Core
  • PHPExcel_Writer_PDF_DomPDF
  • PHPExcel_Writer_PDF_mPDF
  • PHPExcel_Writer_PDF_tcPDF
  • Provincia
  • Radiacion
  • SingularValueDecomposition
  • Sistema
  • trendClass
  • xajax
  • xajaxArgumentManager
  • xajaxCallableObject
  • xajaxCallableObjectPlugin
  • xajaxControl
  • xajaxControlContainer
  • xajaxCustomRequest
  • xajaxCustomResponse
  • xajaxEvent
  • xajaxEventPlugin
  • xajaxFunctionPlugin
  • xajaxIncludeClientScriptPlugin
  • xajaxLanguageManager
  • xajaxPlugin
  • xajaxPluginManager
  • xajaxRequest
  • xajaxRequestPlugin
  • xajaxResponse
  • xajaxResponseManager
  • xajaxResponsePlugin
  • xajaxScriptPlugin
  • xajaxUserFunction
  • XMLWriter

Interfaces

  • DateTimeInterface
  • Iterator
  • PHPExcel_CachedObjectStorage_ICache
  • PHPExcel_Cell_IValueBinder
  • PHPExcel_IComparable
  • PHPExcel_Reader_IReader
  • PHPExcel_Reader_IReadFilter
  • PHPExcel_RichText_ITextElement
  • PHPExcel_Writer_IWriter
  • Throwable
  • Traversable

Exceptions

  • Exception
  • PHPExcel_Calculation_Exception
  • PHPExcel_Chart_Exception
  • PHPExcel_Exception
  • PHPExcel_Reader_Exception
  • PHPExcel_Writer_Exception

Functions

  • acosh
  • agregar_elemento
  • asinh
  • atanh
  • borrar_elementos
  • borrar_gdm_ab
  • borrar_irradiacion
  • borrar_latitud
  • borrar_panel
  • borrar_periodo
  • borrar_pmp_min_pmp_max
  • borrar_radiacion
  • borrar_resumen
  • borrar_sistema
  • borrar_sombra
  • gdm_ab
  • grabar_resumen
  • historial
  • hypo
  • irradiacion
  • JAMAError
  • latitud
  • limpiar_historial
  • login
  • mb_str_replace
  • mostrar_energia_total_ch
  • mostrar_panel_md_th
  • mostrar_panel_th
  • mostrar_radiacion_md_th
  • mostrar_radiacion_th
  • mostrar_resumen_th
  • panel
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • periodo
  • pmp_min_pmp_max
  • preparar_panel
  • preparar_radiacion
  • preparar_radiacion_media
  • radiacion
  • resumen
  • sistema
  • sombra
  • xajaxCompressFile
  • xajaxErrorHandler
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * PHPExcel
  4:  *
  5:  * Copyright (c) 2006 - 2014 PHPExcel
  6:  *
  7:  * This library is free software; you can redistribute it and/or
  8:  * modify it under the terms of the GNU Lesser General Public
  9:  * License as published by the Free Software Foundation; either
 10:  * version 2.1 of the License, or (at your option) any later version.
 11:  *
 12:  * This library is distributed in the hope that it will be useful,
 13:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15:  * Lesser General Public License for more details.
 16:  *
 17:  * You should have received a copy of the GNU Lesser General Public
 18:  * License along with this library; if not, write to the Free Software
 19:  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 20:  *
 21:  * @category   PHPExcel
 22:  * @package    PHPExcel_Writer_Excel2007
 23:  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 24:  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
 25:  * @version    1.8.0, 2014-03-02
 26:  */
 27: 
 28: 
 29: /**
 30:  * PHPExcel_Writer_Excel2007_Comments
 31:  *
 32:  * @category   PHPExcel
 33:  * @package    PHPExcel_Writer_Excel2007
 34:  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 35:  */
 36: class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_WriterPart
 37: {
 38:     /**
 39:      * Write comments to XML format
 40:      *
 41:      * @param   PHPExcel_Worksheet              $pWorksheet
 42:      * @return  string                              XML Output
 43:      * @throws  PHPExcel_Writer_Exception
 44:      */
 45:     public function writeComments(PHPExcel_Worksheet $pWorksheet = null)
 46:     {
 47:         // Create XML writer
 48:         $objWriter = null;
 49:         if ($this->getParentWriter()->getUseDiskCaching()) {
 50:             $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
 51:         } else {
 52:             $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
 53:         }
 54: 
 55:         // XML header
 56:         $objWriter->startDocument('1.0','UTF-8','yes');
 57: 
 58:         // Comments cache
 59:         $comments   = $pWorksheet->getComments();
 60: 
 61:         // Authors cache
 62:         $authors    = array();
 63:         $authorId   = 0;
 64:         foreach ($comments as $comment) {
 65:             if (!isset($authors[$comment->getAuthor()])) {
 66:                 $authors[$comment->getAuthor()] = $authorId++;
 67:             }
 68:         }
 69: 
 70:         // comments
 71:         $objWriter->startElement('comments');
 72:         $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main');
 73: 
 74:             // Loop through authors
 75:             $objWriter->startElement('authors');
 76:             foreach ($authors as $author => $index) {
 77:                 $objWriter->writeElement('author', $author);
 78:             }
 79:             $objWriter->endElement();
 80: 
 81:             // Loop through comments
 82:             $objWriter->startElement('commentList');
 83:             foreach ($comments as $key => $value) {
 84:                 $this->_writeComment($objWriter, $key, $value, $authors);
 85:             }
 86:             $objWriter->endElement();
 87: 
 88:         $objWriter->endElement();
 89: 
 90:         // Return
 91:         return $objWriter->getData();
 92:     }
 93: 
 94:     /**
 95:      * Write comment to XML format
 96:      *
 97:      * @param   PHPExcel_Shared_XMLWriter       $objWriter          XML Writer
 98:      * @param   string                          $pCellReference     Cell reference
 99:      * @param   PHPExcel_Comment                $pComment           Comment
100:      * @param   array                           $pAuthors           Array of authors
101:      * @throws  PHPExcel_Writer_Exception
102:      */
103:     public function _writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null)
104:     {
105:         // comment
106:         $objWriter->startElement('comment');
107:         $objWriter->writeAttribute('ref',       $pCellReference);
108:         $objWriter->writeAttribute('authorId',  $pAuthors[$pComment->getAuthor()]);
109: 
110:             // text
111:             $objWriter->startElement('text');
112:             $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText());
113:             $objWriter->endElement();
114: 
115:         $objWriter->endElement();
116:     }
117: 
118:     /**
119:      * Write VML comments to XML format
120:      *
121:      * @param   PHPExcel_Worksheet              $pWorksheet
122:      * @return  string                              XML Output
123:      * @throws  PHPExcel_Writer_Exception
124:      */
125:     public function writeVMLComments(PHPExcel_Worksheet $pWorksheet = null)
126:     {
127:         // Create XML writer
128:         $objWriter = null;
129:         if ($this->getParentWriter()->getUseDiskCaching()) {
130:             $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
131:         } else {
132:             $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
133:         }
134: 
135:         // XML header
136:         $objWriter->startDocument('1.0','UTF-8','yes');
137: 
138:         // Comments cache
139:         $comments   = $pWorksheet->getComments();
140: 
141:         // xml
142:         $objWriter->startElement('xml');
143:         $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml');
144:         $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office');
145:         $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel');
146: 
147:             // o:shapelayout
148:             $objWriter->startElement('o:shapelayout');
149:             $objWriter->writeAttribute('v:ext',         'edit');
150: 
151:                 // o:idmap
152:                 $objWriter->startElement('o:idmap');
153:                 $objWriter->writeAttribute('v:ext',     'edit');
154:                 $objWriter->writeAttribute('data',      '1');
155:                 $objWriter->endElement();
156: 
157:             $objWriter->endElement();
158: 
159:             // v:shapetype
160:             $objWriter->startElement('v:shapetype');
161:             $objWriter->writeAttribute('id',        '_x0000_t202');
162:             $objWriter->writeAttribute('coordsize', '21600,21600');
163:             $objWriter->writeAttribute('o:spt',     '202');
164:             $objWriter->writeAttribute('path',      'm,l,21600r21600,l21600,xe');
165: 
166:                 // v:stroke
167:                 $objWriter->startElement('v:stroke');
168:                 $objWriter->writeAttribute('joinstyle',     'miter');
169:                 $objWriter->endElement();
170: 
171:                 // v:path
172:                 $objWriter->startElement('v:path');
173:                 $objWriter->writeAttribute('gradientshapeok',   't');
174:                 $objWriter->writeAttribute('o:connecttype',     'rect');
175:                 $objWriter->endElement();
176: 
177:             $objWriter->endElement();
178: 
179:             // Loop through comments
180:             foreach ($comments as $key => $value) {
181:                 $this->_writeVMLComment($objWriter, $key, $value);
182:             }
183: 
184:         $objWriter->endElement();
185: 
186:         // Return
187:         return $objWriter->getData();
188:     }
189: 
190:     /**
191:      * Write VML comment to XML format
192:      *
193:      * @param   PHPExcel_Shared_XMLWriter       $objWriter          XML Writer
194:      * @param   string                          $pCellReference     Cell reference
195:      * @param   PHPExcel_Comment                $pComment           Comment
196:      * @throws  PHPExcel_Writer_Exception
197:      */
198:     public function _writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null)
199:     {
200:         // Metadata
201:         list($column, $row) = PHPExcel_Cell::coordinateFromString($pCellReference);
202:         $column = PHPExcel_Cell::columnIndexFromString($column);
203:         $id = 1024 + $column + $row;
204:         $id = substr($id, 0, 4);
205: 
206:         // v:shape
207:         $objWriter->startElement('v:shape');
208:         $objWriter->writeAttribute('id',            '_x0000_s' . $id);
209:         $objWriter->writeAttribute('type',          '#_x0000_t202');
210:         $objWriter->writeAttribute('style',         'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden'));
211:         $objWriter->writeAttribute('fillcolor',     '#' . $pComment->getFillColor()->getRGB());
212:         $objWriter->writeAttribute('o:insetmode',   'auto');
213: 
214:             // v:fill
215:             $objWriter->startElement('v:fill');
216:             $objWriter->writeAttribute('color2',        '#' . $pComment->getFillColor()->getRGB());
217:             $objWriter->endElement();
218: 
219:             // v:shadow
220:             $objWriter->startElement('v:shadow');
221:             $objWriter->writeAttribute('on',            't');
222:             $objWriter->writeAttribute('color',         'black');
223:             $objWriter->writeAttribute('obscured',      't');
224:             $objWriter->endElement();
225: 
226:             // v:path
227:             $objWriter->startElement('v:path');
228:             $objWriter->writeAttribute('o:connecttype', 'none');
229:             $objWriter->endElement();
230: 
231:             // v:textbox
232:             $objWriter->startElement('v:textbox');
233:             $objWriter->writeAttribute('style', 'mso-direction-alt:auto');
234: 
235:                 // div
236:                 $objWriter->startElement('div');
237:                 $objWriter->writeAttribute('style', 'text-align:left');
238:                 $objWriter->endElement();
239: 
240:             $objWriter->endElement();
241: 
242:             // x:ClientData
243:             $objWriter->startElement('x:ClientData');
244:             $objWriter->writeAttribute('ObjectType', 'Note');
245: 
246:                 // x:MoveWithCells
247:                 $objWriter->writeElement('x:MoveWithCells', '');
248: 
249:                 // x:SizeWithCells
250:                 $objWriter->writeElement('x:SizeWithCells', '');
251: 
252:                 // x:Anchor
253:                 //$objWriter->writeElement('x:Anchor', $column . ', 15, ' . ($row - 2) . ', 10, ' . ($column + 4) . ', 15, ' . ($row + 5) . ', 18');
254: 
255:                 // x:AutoFill
256:                 $objWriter->writeElement('x:AutoFill', 'False');
257: 
258:                 // x:Row
259:                 $objWriter->writeElement('x:Row', ($row - 1));
260: 
261:                 // x:Column
262:                 $objWriter->writeElement('x:Column', ($column - 1));
263: 
264:             $objWriter->endElement();
265: 
266:         $objWriter->endElement();
267:     }
268: }
269: 
Autene API documentation generated by ApiGen