Line 0
Link Here
|
|
|
1 |
/* ==================================================================== |
2 |
Licensed to the Apache Software Foundation (ASF) under one or more |
3 |
contributor license agreements. See the NOTICE file distributed with |
4 |
this work for additional information regarding copyright ownership. |
5 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
6 |
(the "License"); you may not use this file except in compliance with |
7 |
the License. You may obtain a copy of the License at |
8 |
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
10 |
|
11 |
Unless required by applicable law or agreed to in writing, software |
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 |
See the License for the specific language governing permissions and |
15 |
limitations under the License. |
16 |
==================================================================== */ |
17 |
package org.apache.poi.xssf.streaming.reader; |
18 |
|
19 |
import java.util.ArrayList; |
20 |
import java.util.Collection; |
21 |
import java.util.Iterator; |
22 |
import java.util.List; |
23 |
import java.util.Map; |
24 |
|
25 |
import javax.xml.stream.XMLEventReader; |
26 |
import javax.xml.stream.XMLStreamException; |
27 |
import javax.xml.stream.events.XMLEvent; |
28 |
|
29 |
import org.apache.poi.ss.usermodel.AutoFilter; |
30 |
import org.apache.poi.ss.usermodel.Cell; |
31 |
import org.apache.poi.ss.usermodel.CellRange; |
32 |
import org.apache.poi.ss.usermodel.CellStyle; |
33 |
import org.apache.poi.ss.usermodel.Comment; |
34 |
import org.apache.poi.ss.usermodel.DataValidation; |
35 |
import org.apache.poi.ss.usermodel.DataValidationHelper; |
36 |
import org.apache.poi.ss.usermodel.Drawing; |
37 |
import org.apache.poi.ss.usermodel.Footer; |
38 |
import org.apache.poi.ss.usermodel.Header; |
39 |
import org.apache.poi.ss.usermodel.Hyperlink; |
40 |
import org.apache.poi.ss.usermodel.PrintSetup; |
41 |
import org.apache.poi.ss.usermodel.Row; |
42 |
import org.apache.poi.ss.usermodel.Sheet; |
43 |
import org.apache.poi.ss.usermodel.SheetConditionalFormatting; |
44 |
import org.apache.poi.ss.usermodel.Workbook; |
45 |
import org.apache.poi.ss.util.CellAddress; |
46 |
import org.apache.poi.ss.util.CellRangeAddress; |
47 |
import org.apache.poi.ss.util.PaneInformation; |
48 |
import org.apache.poi.xssf.model.SharedStringsTable; |
49 |
import org.apache.poi.xssf.model.StylesTable; |
50 |
|
51 |
/** |
52 |
* Represents an excel sheet. |
53 |
* |
54 |
*/ |
55 |
public class StreamedSheet implements Sheet{ |
56 |
private XMLEventReader xmlParser; |
57 |
private SharedStringsTable sharedStringsTable; |
58 |
private StylesTable stylesTable; |
59 |
private int numberOfColumns; |
60 |
private int sheetNumber; |
61 |
private StreamedSheetEventHandler eventHandler = null; |
62 |
|
63 |
/** |
64 |
* <pre> |
65 |
* Fetch all rows from the excel. |
66 |
* </pre> |
67 |
* |
68 |
* This method consumes only less memory, but it is |
69 |
* advisable to use it only for small excel files, since |
70 |
* it will fetch all rows in a single call. |
71 |
* |
72 |
* @return Iterator<Row> |
73 |
* @throws XMLStreamException |
74 |
*/ |
75 |
public Iterator<StreamedRow> getAllRows() throws XMLStreamException{ |
76 |
return getAllRows(this, sharedStringsTable, stylesTable); |
77 |
} |
78 |
|
79 |
/** |
80 |
* <pre> |
81 |
* Used to fetch N number of rows. |
82 |
* </pre> |
83 |
* |
84 |
* Recommended method to reduce memory utilization. |
85 |
* It allows to read big excel files in batch. |
86 |
* This gives control to the user to process the records already fetched, |
87 |
* before fetching next set of records. |
88 |
* After reading N records, invoke the same method with number of rows to be |
89 |
* fetched to get the next set of rows. |
90 |
* <br> |
91 |
* |
92 |
* *********************Usage**************************** |
93 |
* Iterator<StreamedRow> rows = sheet.getNRows(1); |
94 |
* <br> |
95 |
* while(rows.hasNext()){ //read the first 1 row |
96 |
* <br> |
97 |
* StreamedRow row = rows.next(); |
98 |
* <br> |
99 |
* } |
100 |
* <br> |
101 |
* rows = sheet.getNRows(10); |
102 |
* <br> |
103 |
* while(rows.hasNext()){ //read the next 10 rows |
104 |
* <br> |
105 |
* StreamedRow row = rows.next(); |
106 |
* <br> |
107 |
* } |
108 |
* |
109 |
* @param numberOfRows |
110 |
* @return Iterator<Row> |
111 |
* @throws XMLStreamException |
112 |
*/ |
113 |
public Iterator<StreamedRow> getNRows(int numberOfRows) throws XMLStreamException{ |
114 |
return getNRows(this, eventHandler, numberOfRows); |
115 |
} |
116 |
|
117 |
public boolean hasMoreRows(){ |
118 |
return xmlParser.hasNext(); |
119 |
} |
120 |
|
121 |
|
122 |
public XMLEventReader getXmlParser() { |
123 |
return xmlParser; |
124 |
} |
125 |
|
126 |
public void setXmlParser(XMLEventReader xmlParser) { |
127 |
this.xmlParser = xmlParser; |
128 |
} |
129 |
|
130 |
public void setSharedStringsTable(SharedStringsTable sharedStringsTable) { |
131 |
this.sharedStringsTable = sharedStringsTable; |
132 |
} |
133 |
|
134 |
public void setStylesTable(StylesTable stylesTable) { |
135 |
this.stylesTable = stylesTable; |
136 |
} |
137 |
|
138 |
public void createEventHandler(){ |
139 |
eventHandler = new StreamedSheetEventHandler(sharedStringsTable, stylesTable); |
140 |
} |
141 |
|
142 |
|
143 |
public int getNumberOfColumns() { |
144 |
return numberOfColumns; |
145 |
} |
146 |
|
147 |
|
148 |
public void setNumberOfColumns(int numberOfColumns) { |
149 |
this.numberOfColumns = numberOfColumns; |
150 |
} |
151 |
|
152 |
|
153 |
public int getSheetNumber() { |
154 |
return sheetNumber; |
155 |
} |
156 |
|
157 |
|
158 |
public void setSheetNumber(int sheetNumber) { |
159 |
this.sheetNumber = sheetNumber; |
160 |
} |
161 |
|
162 |
/* @Override |
163 |
protected void finalize() throws Throwable { |
164 |
super.finalize(); |
165 |
|
166 |
xmlParser = null; |
167 |
sharedStringsTable = null; |
168 |
stylesTable = null; |
169 |
eventHandler = null; |
170 |
|
171 |
}*/ |
172 |
|
173 |
/** |
174 |
* reads all data from sheet |
175 |
* @param xmlParser |
176 |
* @param sharedStringsTable |
177 |
* @param stylesTable |
178 |
* @return |
179 |
* @throws XMLStreamException |
180 |
*/ |
181 |
private Iterator<StreamedRow> getAllRows(StreamedSheet sheet, |
182 |
SharedStringsTable sharedStringsTable, StylesTable stylesTable) throws XMLStreamException { |
183 |
List<StreamedRow> dataList = new ArrayList<StreamedRow>(); |
184 |
StreamedSheetEventHandler eventHandler = new StreamedSheetEventHandler(sharedStringsTable, stylesTable); |
185 |
while(sheet.getXmlParser().hasNext()){ |
186 |
XMLEvent event = sheet.getXmlParser().nextEvent(); |
187 |
eventHandler.handleEvent(event); |
188 |
if(eventHandler.isEndOfRow()){ |
189 |
dataList.add(eventHandler.getRow()); |
190 |
eventHandler.setEndOfRow(false); |
191 |
} |
192 |
sheet.setNumberOfColumns(eventHandler.getNumberOfColumns()); |
193 |
} |
194 |
|
195 |
return dataList.iterator(); |
196 |
} |
197 |
|
198 |
/** |
199 |
* Reads N Rows from excel |
200 |
* @param sheet |
201 |
* @param sharedStringsTable |
202 |
* @param stylesTable |
203 |
* @param numberOFRows |
204 |
* @return |
205 |
* @throws XMLStreamException |
206 |
*/ |
207 |
private Iterator<StreamedRow> getNRows(StreamedSheet sheet, StreamedSheetEventHandler eventHandler, int numberOfRows) throws XMLStreamException { |
208 |
List<StreamedRow> dataList = new ArrayList<StreamedRow>(); |
209 |
while(sheet.getXmlParser().hasNext()){ |
210 |
XMLEvent event = sheet.getXmlParser().nextEvent(); |
211 |
eventHandler.handleEvent(event); |
212 |
if(eventHandler.isEndOfRow()){ |
213 |
dataList.add(eventHandler.getRow()); |
214 |
eventHandler.setEndOfRow(false); |
215 |
} |
216 |
sheet.setNumberOfColumns(eventHandler.getNumberOfColumns()); |
217 |
if(dataList.size() == numberOfRows){ |
218 |
break; |
219 |
} |
220 |
} |
221 |
|
222 |
return dataList.iterator(); |
223 |
} |
224 |
|
225 |
/** |
226 |
* Not supported. Refer getAllRows or getNRows |
227 |
*/ |
228 |
public Iterator<Row> iterator() { |
229 |
// TODO Auto-generated method stub |
230 |
return null; |
231 |
} |
232 |
|
233 |
/** |
234 |
* <pre> |
235 |
* Not supported right now, as StreamedWorkbook |
236 |
* supports only reading. |
237 |
* </pre> |
238 |
* |
239 |
*/ |
240 |
public Row createRow(int rownum) { |
241 |
// TODO Auto-generated method stub |
242 |
return null; |
243 |
} |
244 |
|
245 |
/** |
246 |
* <pre> |
247 |
* Not supported right now, as StreamedWorkbook |
248 |
* supports only reading. |
249 |
* </pre> |
250 |
* |
251 |
*/ |
252 |
public void removeRow(Row row) { |
253 |
// TODO Auto-generated method stub |
254 |
|
255 |
} |
256 |
|
257 |
/** |
258 |
* <pre> |
259 |
* Not supported due to memory footprint. |
260 |
* </pre> |
261 |
*/ |
262 |
public Row getRow(int rownum) { |
263 |
// TODO Auto-generated method stub |
264 |
return null; |
265 |
} |
266 |
|
267 |
/** |
268 |
* <pre> |
269 |
* Not supported due to memory footprint. |
270 |
* </pre> |
271 |
*/ |
272 |
public int getPhysicalNumberOfRows() { |
273 |
// TODO Auto-generated method stub |
274 |
return 0; |
275 |
} |
276 |
|
277 |
/** |
278 |
* <pre> |
279 |
* Will be supported in the future. |
280 |
* </pre> |
281 |
* |
282 |
*/ |
283 |
public int getFirstRowNum() { |
284 |
// TODO Auto-generated method stub |
285 |
return 0; |
286 |
} |
287 |
|
288 |
/** |
289 |
* <pre> |
290 |
* Not supported due to memory footprint. |
291 |
* </pre> |
292 |
*/ |
293 |
public int getLastRowNum() { |
294 |
// TODO Auto-generated method stub |
295 |
return 0; |
296 |
} |
297 |
|
298 |
/** |
299 |
* <pre> |
300 |
* Not supported right now, as StreamedWorkbook |
301 |
* supports only reading. |
302 |
* </pre> |
303 |
* |
304 |
*/ |
305 |
public void setColumnHidden(int columnIndex, boolean hidden) { |
306 |
// TODO Auto-generated method stub |
307 |
|
308 |
} |
309 |
|
310 |
/** |
311 |
* <pre> |
312 |
* Not supported due to memory footprint. |
313 |
* </pre> |
314 |
*/ |
315 |
public boolean isColumnHidden(int columnIndex) { |
316 |
// TODO Auto-generated method stub |
317 |
return false; |
318 |
} |
319 |
|
320 |
/** |
321 |
* <pre> |
322 |
* Not supported right now, as StreamedWorkbook |
323 |
* supports only reading. |
324 |
* </pre> |
325 |
* |
326 |
*/ |
327 |
public void setRightToLeft(boolean value) { |
328 |
// TODO Auto-generated method stub |
329 |
|
330 |
} |
331 |
|
332 |
/** |
333 |
* <pre> |
334 |
* Not supported right now, as StreamedWorkbook |
335 |
* supports only reading. |
336 |
* </pre> |
337 |
* |
338 |
*/ |
339 |
public boolean isRightToLeft() { |
340 |
// TODO Auto-generated method stub |
341 |
return false; |
342 |
} |
343 |
|
344 |
/** |
345 |
* <pre> |
346 |
* Not supported right now, as StreamedWorkbook |
347 |
* supports only reading. |
348 |
* </pre> |
349 |
* |
350 |
*/ |
351 |
public void setColumnWidth(int columnIndex, int width) { |
352 |
// TODO Auto-generated method stub |
353 |
|
354 |
} |
355 |
|
356 |
/** |
357 |
* <pre> |
358 |
* Will be supported in future. |
359 |
* </pre> |
360 |
*/ |
361 |
public int getColumnWidth(int columnIndex) { |
362 |
// TODO Auto-generated method stub |
363 |
return 0; |
364 |
} |
365 |
|
366 |
|
367 |
/** |
368 |
* <pre> |
369 |
* Will be supported in future. |
370 |
* </pre> |
371 |
*/ |
372 |
public float getColumnWidthInPixels(int columnIndex) { |
373 |
// TODO Auto-generated method stub |
374 |
return 0; |
375 |
} |
376 |
|
377 |
/** |
378 |
* <pre> |
379 |
* Not supported right now, as StreamedWorkbook |
380 |
* supports only reading. |
381 |
* </pre> |
382 |
* |
383 |
*/ |
384 |
public void setDefaultColumnWidth(int width) { |
385 |
// TODO Auto-generated method stub |
386 |
|
387 |
} |
388 |
|
389 |
/** |
390 |
* <pre> |
391 |
* Will be supported in future. |
392 |
* </pre> |
393 |
*/ |
394 |
public int getDefaultColumnWidth() { |
395 |
// TODO Auto-generated method stub |
396 |
return 0; |
397 |
} |
398 |
|
399 |
/** |
400 |
* <pre> |
401 |
* Will be supported in future. |
402 |
* </pre> |
403 |
*/ |
404 |
public short getDefaultRowHeight() { |
405 |
// TODO Auto-generated method stub |
406 |
return 0; |
407 |
} |
408 |
|
409 |
/** |
410 |
* <pre> |
411 |
* Will be supported in future. |
412 |
* </pre> |
413 |
*/ |
414 |
public float getDefaultRowHeightInPoints() { |
415 |
// TODO Auto-generated method stub |
416 |
return 0; |
417 |
} |
418 |
|
419 |
/** |
420 |
* <pre> |
421 |
* Not supported right now, as StreamedWorkbook |
422 |
* supports only reading. |
423 |
* </pre> |
424 |
* |
425 |
*/ |
426 |
public void setDefaultRowHeight(short height) { |
427 |
// TODO Auto-generated method stub |
428 |
|
429 |
} |
430 |
|
431 |
/** |
432 |
* <pre> |
433 |
* Not supported right now, as StreamedWorkbook |
434 |
* supports only reading. |
435 |
* </pre> |
436 |
* |
437 |
*/ |
438 |
public void setDefaultRowHeightInPoints(float height) { |
439 |
// TODO Auto-generated method stub |
440 |
|
441 |
} |
442 |
|
443 |
/** |
444 |
* <pre> |
445 |
* Will be supported in future. |
446 |
* </pre> |
447 |
*/ |
448 |
public CellStyle getColumnStyle(int column) { |
449 |
// TODO Auto-generated method stub |
450 |
return null; |
451 |
} |
452 |
|
453 |
/** |
454 |
* <pre> |
455 |
* Not supported right now, as StreamedWorkbook |
456 |
* supports only reading. |
457 |
* </pre> |
458 |
* |
459 |
*/ |
460 |
public int addMergedRegion(CellRangeAddress region) { |
461 |
// TODO Auto-generated method stub |
462 |
return 0; |
463 |
} |
464 |
|
465 |
/** |
466 |
* <pre> |
467 |
* Not supported right now, as StreamedWorkbook |
468 |
* supports only reading. |
469 |
* </pre> |
470 |
* |
471 |
*/ |
472 |
public int addMergedRegionUnsafe(CellRangeAddress region) { |
473 |
// TODO Auto-generated method stub |
474 |
return 0; |
475 |
} |
476 |
|
477 |
/** |
478 |
* <pre> |
479 |
* Will be supported in future. |
480 |
* </pre> |
481 |
*/ |
482 |
public void validateMergedRegions() { |
483 |
// TODO Auto-generated method stub |
484 |
|
485 |
} |
486 |
|
487 |
/** |
488 |
* <pre> |
489 |
* Not supported right now, as StreamedWorkbook |
490 |
* supports only reading. |
491 |
* </pre> |
492 |
* |
493 |
*/ |
494 |
public void setVerticallyCenter(boolean value) { |
495 |
// TODO Auto-generated method stub |
496 |
|
497 |
} |
498 |
|
499 |
/** |
500 |
* <pre> |
501 |
* Not supported right now, as StreamedWorkbook |
502 |
* supports only reading. |
503 |
* </pre> |
504 |
* |
505 |
*/ |
506 |
public void setHorizontallyCenter(boolean value) { |
507 |
// TODO Auto-generated method stub |
508 |
|
509 |
} |
510 |
|
511 |
/** |
512 |
* <pre> |
513 |
* Will be supported in future. |
514 |
* </pre> |
515 |
*/ |
516 |
public boolean getHorizontallyCenter() { |
517 |
// TODO Auto-generated method stub |
518 |
return false; |
519 |
} |
520 |
|
521 |
/** |
522 |
* <pre> |
523 |
* Will be supported in future. |
524 |
* </pre> |
525 |
*/ |
526 |
public boolean getVerticallyCenter() { |
527 |
// TODO Auto-generated method stub |
528 |
return false; |
529 |
} |
530 |
|
531 |
/** |
532 |
* <pre> |
533 |
* Not supported right now, as StreamedWorkbook |
534 |
* supports only reading. |
535 |
* </pre> |
536 |
* |
537 |
*/ |
538 |
public void removeMergedRegion(int index) { |
539 |
// TODO Auto-generated method stub |
540 |
|
541 |
} |
542 |
|
543 |
/** |
544 |
* <pre> |
545 |
* Not supported right now, as StreamedWorkbook |
546 |
* supports only reading. |
547 |
* </pre> |
548 |
* |
549 |
*/ |
550 |
public void removeMergedRegions(Collection<Integer> indices) { |
551 |
// TODO Auto-generated method stub |
552 |
|
553 |
} |
554 |
|
555 |
/** |
556 |
* <pre> |
557 |
* Not supported due to memory footprint. |
558 |
* </pre> |
559 |
*/ |
560 |
public int getNumMergedRegions() { |
561 |
// TODO Auto-generated method stub |
562 |
return 0; |
563 |
} |
564 |
|
565 |
/** |
566 |
* <pre> |
567 |
* Not supported due to memory footprint. |
568 |
* </pre> |
569 |
*/ |
570 |
public CellRangeAddress getMergedRegion(int index) { |
571 |
// TODO Auto-generated method stub |
572 |
return null; |
573 |
} |
574 |
|
575 |
/** |
576 |
* <pre> |
577 |
* Not supported due to memory footprint. |
578 |
* </pre> |
579 |
*/ |
580 |
public List<CellRangeAddress> getMergedRegions() { |
581 |
// TODO Auto-generated method stub |
582 |
return null; |
583 |
} |
584 |
|
585 |
/** |
586 |
* <pre> |
587 |
* Not supported. Use getAllRows or getNRows |
588 |
* </pre> |
589 |
*/ |
590 |
public Iterator<Row> rowIterator() { |
591 |
// TODO Auto-generated method stub |
592 |
return null; |
593 |
} |
594 |
|
595 |
/** |
596 |
* <pre> |
597 |
* Not supported right now, as StreamedWorkbook |
598 |
* supports only reading. |
599 |
* </pre> |
600 |
* |
601 |
*/ |
602 |
public void setForceFormulaRecalculation(boolean value) { |
603 |
// TODO Auto-generated method stub |
604 |
|
605 |
} |
606 |
|
607 |
/** |
608 |
* <pre> |
609 |
* Will be supported in future. |
610 |
* </pre> |
611 |
*/ |
612 |
public boolean getForceFormulaRecalculation() { |
613 |
// TODO Auto-generated method stub |
614 |
return false; |
615 |
} |
616 |
|
617 |
/** |
618 |
* <pre> |
619 |
* Not supported right now, as StreamedWorkbook |
620 |
* supports only reading. |
621 |
* </pre> |
622 |
* |
623 |
*/ |
624 |
public void setAutobreaks(boolean value) { |
625 |
// TODO Auto-generated method stub |
626 |
|
627 |
} |
628 |
|
629 |
/** |
630 |
* <pre> |
631 |
* Not supported right now, as StreamedWorkbook |
632 |
* supports only reading. |
633 |
* </pre> |
634 |
* |
635 |
*/ |
636 |
public void setDisplayGuts(boolean value) { |
637 |
// TODO Auto-generated method stub |
638 |
|
639 |
} |
640 |
|
641 |
/** |
642 |
* <pre> |
643 |
* Will be supported in future. |
644 |
* </pre> |
645 |
*/ |
646 |
public void setDisplayZeros(boolean value) { |
647 |
// TODO Auto-generated method stub |
648 |
|
649 |
} |
650 |
|
651 |
/** |
652 |
* <pre> |
653 |
* Will be supported in future. |
654 |
* </pre> |
655 |
*/ |
656 |
public boolean isDisplayZeros() { |
657 |
// TODO Auto-generated method stub |
658 |
return false; |
659 |
} |
660 |
|
661 |
/** |
662 |
* <pre> |
663 |
* Not supported right now, as StreamedWorkbook |
664 |
* supports only reading. |
665 |
* </pre> |
666 |
* |
667 |
*/ |
668 |
public void setFitToPage(boolean value) { |
669 |
// TODO Auto-generated method stub |
670 |
|
671 |
} |
672 |
|
673 |
/** |
674 |
* <pre> |
675 |
* Not supported right now, as StreamedWorkbook |
676 |
* supports only reading. |
677 |
* </pre> |
678 |
* |
679 |
*/ |
680 |
public void setRowSumsBelow(boolean value) { |
681 |
// TODO Auto-generated method stub |
682 |
|
683 |
} |
684 |
|
685 |
/** |
686 |
* <pre> |
687 |
* Not supported right now, as StreamedWorkbook |
688 |
* supports only reading. |
689 |
* </pre> |
690 |
* |
691 |
*/ |
692 |
public void setRowSumsRight(boolean value) { |
693 |
// TODO Auto-generated method stub |
694 |
|
695 |
} |
696 |
|
697 |
/** |
698 |
* <pre> |
699 |
* Will be supported in future. |
700 |
* </pre> |
701 |
*/ |
702 |
public boolean getAutobreaks() { |
703 |
// TODO Auto-generated method stub |
704 |
return false; |
705 |
} |
706 |
|
707 |
/** |
708 |
* <pre> |
709 |
* Will be supported in future. |
710 |
* </pre> |
711 |
*/ |
712 |
public boolean getDisplayGuts() { |
713 |
// TODO Auto-generated method stub |
714 |
return false; |
715 |
} |
716 |
|
717 |
/** |
718 |
* <pre> |
719 |
* Will be supported in future. |
720 |
* </pre> |
721 |
*/ |
722 |
public boolean getFitToPage() { |
723 |
// TODO Auto-generated method stub |
724 |
return false; |
725 |
} |
726 |
|
727 |
/** |
728 |
* <pre> |
729 |
* Will be supported in future. |
730 |
* </pre> |
731 |
*/ |
732 |
public boolean getRowSumsBelow() { |
733 |
// TODO Auto-generated method stub |
734 |
return false; |
735 |
} |
736 |
|
737 |
/** |
738 |
* <pre> |
739 |
* Will be supported in future. |
740 |
* </pre> |
741 |
*/ |
742 |
public boolean getRowSumsRight() { |
743 |
// TODO Auto-generated method stub |
744 |
return false; |
745 |
} |
746 |
|
747 |
/** |
748 |
* <pre> |
749 |
* Will be supported in future. |
750 |
* </pre> |
751 |
*/ |
752 |
public boolean isPrintGridlines() { |
753 |
// TODO Auto-generated method stub |
754 |
return false; |
755 |
} |
756 |
|
757 |
/** |
758 |
* <pre> |
759 |
* Not supported right now, as StreamedWorkbook |
760 |
* supports only reading. |
761 |
* </pre> |
762 |
* |
763 |
*/ |
764 |
public void setPrintGridlines(boolean show) { |
765 |
// TODO Auto-generated method stub |
766 |
|
767 |
} |
768 |
|
769 |
/** |
770 |
* <pre> |
771 |
* Will be supported in future. |
772 |
* </pre> |
773 |
*/ |
774 |
public boolean isPrintRowAndColumnHeadings() { |
775 |
// TODO Auto-generated method stub |
776 |
return false; |
777 |
} |
778 |
|
779 |
/** |
780 |
* <pre> |
781 |
* Not supported right now, as StreamedWorkbook |
782 |
* supports only reading. |
783 |
* </pre> |
784 |
* |
785 |
*/ |
786 |
public void setPrintRowAndColumnHeadings(boolean show) { |
787 |
// TODO Auto-generated method stub |
788 |
|
789 |
} |
790 |
|
791 |
/** |
792 |
* <pre> |
793 |
* Will be supported in future. |
794 |
* </pre> |
795 |
*/ |
796 |
public PrintSetup getPrintSetup() { |
797 |
// TODO Auto-generated method stub |
798 |
return null; |
799 |
} |
800 |
|
801 |
/** |
802 |
* <pre> |
803 |
* Will be supported in future. |
804 |
* </pre> |
805 |
*/ |
806 |
public Header getHeader() { |
807 |
// TODO Auto-generated method stub |
808 |
return null; |
809 |
} |
810 |
|
811 |
/** |
812 |
* <pre> |
813 |
* Will be supported in future. |
814 |
* </pre> |
815 |
*/ |
816 |
public Footer getFooter() { |
817 |
// TODO Auto-generated method stub |
818 |
return null; |
819 |
} |
820 |
|
821 |
/** |
822 |
* <pre> |
823 |
* Not supported right now, as StreamedWorkbook |
824 |
* supports only reading. |
825 |
* </pre> |
826 |
* |
827 |
*/ |
828 |
public void setSelected(boolean value) { |
829 |
// TODO Auto-generated method stub |
830 |
|
831 |
} |
832 |
|
833 |
/** |
834 |
* <pre> |
835 |
* Will be supported in future. |
836 |
* </pre> |
837 |
*/ |
838 |
public double getMargin(short margin) { |
839 |
// TODO Auto-generated method stub |
840 |
return 0; |
841 |
} |
842 |
|
843 |
/** |
844 |
* <pre> |
845 |
* Not supported right now, as StreamedWorkbook |
846 |
* supports only reading. |
847 |
* </pre> |
848 |
* |
849 |
*/ |
850 |
public void setMargin(short margin, double size) { |
851 |
// TODO Auto-generated method stub |
852 |
|
853 |
} |
854 |
|
855 |
/** |
856 |
* <pre> |
857 |
* Will be supported in future. |
858 |
* </pre> |
859 |
*/ |
860 |
public boolean getProtect() { |
861 |
// TODO Auto-generated method stub |
862 |
return false; |
863 |
} |
864 |
|
865 |
/** |
866 |
* <pre> |
867 |
* Not supported right now, as StreamedWorkbook |
868 |
* supports only reading. |
869 |
* </pre> |
870 |
* |
871 |
*/ |
872 |
public void protectSheet(String password) { |
873 |
// TODO Auto-generated method stub |
874 |
|
875 |
} |
876 |
|
877 |
/** |
878 |
* <pre> |
879 |
* Will be supported in future. |
880 |
* </pre> |
881 |
*/ |
882 |
public boolean getScenarioProtect() { |
883 |
// TODO Auto-generated method stub |
884 |
return false; |
885 |
} |
886 |
|
887 |
/** |
888 |
* <pre> |
889 |
* Not supported right now, as StreamedWorkbook |
890 |
* supports only reading. |
891 |
* </pre> |
892 |
* |
893 |
*/ |
894 |
public void setZoom(int numerator, int denominator) { |
895 |
// TODO Auto-generated method stub |
896 |
|
897 |
} |
898 |
|
899 |
/** |
900 |
* <pre> |
901 |
* Not supported right now, as StreamedWorkbook |
902 |
* supports only reading. |
903 |
* </pre> |
904 |
* |
905 |
*/ |
906 |
public void setZoom(int scale) { |
907 |
// TODO Auto-generated method stub |
908 |
|
909 |
} |
910 |
|
911 |
/** |
912 |
* <pre> |
913 |
* Will be supported in future. |
914 |
* </pre> |
915 |
*/ |
916 |
public short getTopRow() { |
917 |
// TODO Auto-generated method stub |
918 |
return 0; |
919 |
} |
920 |
|
921 |
/** |
922 |
* <pre> |
923 |
* Will be supported in future. |
924 |
* </pre> |
925 |
*/ |
926 |
public short getLeftCol() { |
927 |
// TODO Auto-generated method stub |
928 |
return 0; |
929 |
} |
930 |
|
931 |
/** |
932 |
* <pre> |
933 |
* Will be supported in future. |
934 |
* </pre> |
935 |
*/ |
936 |
public void showInPane(int toprow, int leftcol) { |
937 |
// TODO Auto-generated method stub |
938 |
|
939 |
} |
940 |
|
941 |
/** |
942 |
* <pre> |
943 |
* Not supported right now, as StreamedWorkbook |
944 |
* supports only reading. |
945 |
* </pre> |
946 |
* |
947 |
*/ |
948 |
public void shiftRows(int startRow, int endRow, int n) { |
949 |
// TODO Auto-generated method stub |
950 |
|
951 |
} |
952 |
|
953 |
/** |
954 |
* <pre> |
955 |
* Not supported right now, as StreamedWorkbook |
956 |
* supports only reading. |
957 |
* </pre> |
958 |
* |
959 |
*/ |
960 |
public void shiftRows(int startRow, int endRow, int n, |
961 |
boolean copyRowHeight, boolean resetOriginalRowHeight) { |
962 |
// TODO Auto-generated method stub |
963 |
|
964 |
} |
965 |
|
966 |
/** |
967 |
* <pre> |
968 |
* Not supported right now, as StreamedWorkbook |
969 |
* supports only reading. |
970 |
* </pre> |
971 |
* |
972 |
*/ |
973 |
public void createFreezePane(int colSplit, int rowSplit, |
974 |
int leftmostColumn, int topRow) { |
975 |
// TODO Auto-generated method stub |
976 |
|
977 |
} |
978 |
|
979 |
/** |
980 |
* <pre> |
981 |
* Not supported right now, as StreamedWorkbook |
982 |
* supports only reading. |
983 |
* </pre> |
984 |
* |
985 |
*/ |
986 |
public void createFreezePane(int colSplit, int rowSplit) { |
987 |
// TODO Auto-generated method stub |
988 |
|
989 |
} |
990 |
|
991 |
/** |
992 |
* <pre> |
993 |
* Not supported right now, as StreamedWorkbook |
994 |
* supports only reading. |
995 |
* </pre> |
996 |
* |
997 |
*/ |
998 |
public void createSplitPane(int xSplitPos, int ySplitPos, |
999 |
int leftmostColumn, int topRow, int activePane) { |
1000 |
// TODO Auto-generated method stub |
1001 |
|
1002 |
} |
1003 |
|
1004 |
/** |
1005 |
* <pre> |
1006 |
* Will be supported in future. |
1007 |
* </pre> |
1008 |
*/ |
1009 |
public PaneInformation getPaneInformation() { |
1010 |
// TODO Auto-generated method stub |
1011 |
return null; |
1012 |
} |
1013 |
|
1014 |
/** |
1015 |
* <pre> |
1016 |
* Not supported right now, as StreamedWorkbook |
1017 |
* supports only reading. |
1018 |
* </pre> |
1019 |
* |
1020 |
*/ |
1021 |
public void setDisplayGridlines(boolean show) { |
1022 |
// TODO Auto-generated method stub |
1023 |
|
1024 |
} |
1025 |
|
1026 |
/** |
1027 |
* <pre> |
1028 |
* Will be supported in future. |
1029 |
* </pre> |
1030 |
*/ |
1031 |
public boolean isDisplayGridlines() { |
1032 |
// TODO Auto-generated method stub |
1033 |
return false; |
1034 |
} |
1035 |
|
1036 |
/** |
1037 |
* <pre> |
1038 |
* Not supported right now, as StreamedWorkbook |
1039 |
* supports only reading. |
1040 |
* </pre> |
1041 |
* |
1042 |
*/ |
1043 |
public void setDisplayFormulas(boolean show) { |
1044 |
// TODO Auto-generated method stub |
1045 |
|
1046 |
} |
1047 |
|
1048 |
/** |
1049 |
* <pre> |
1050 |
* Will be supported in future. |
1051 |
* </pre> |
1052 |
*/ |
1053 |
public boolean isDisplayFormulas() { |
1054 |
// TODO Auto-generated method stub |
1055 |
return false; |
1056 |
} |
1057 |
|
1058 |
/** |
1059 |
* <pre> |
1060 |
* Not supported right now, as StreamedWorkbook |
1061 |
* supports only reading. |
1062 |
* </pre> |
1063 |
* |
1064 |
*/ |
1065 |
public void setDisplayRowColHeadings(boolean show) { |
1066 |
// TODO Auto-generated method stub |
1067 |
|
1068 |
} |
1069 |
|
1070 |
/** |
1071 |
* <pre> |
1072 |
* Will be supported in future. |
1073 |
* </pre> |
1074 |
*/ |
1075 |
public boolean isDisplayRowColHeadings() { |
1076 |
// TODO Auto-generated method stub |
1077 |
return false; |
1078 |
} |
1079 |
|
1080 |
/** |
1081 |
* <pre> |
1082 |
* Not supported right now, as StreamedWorkbook |
1083 |
* supports only reading. |
1084 |
* </pre> |
1085 |
* |
1086 |
*/ |
1087 |
public void setRowBreak(int row) { |
1088 |
// TODO Auto-generated method stub |
1089 |
|
1090 |
} |
1091 |
|
1092 |
/** |
1093 |
* <pre> |
1094 |
* Will be supported in future. |
1095 |
* </pre> |
1096 |
*/ |
1097 |
public boolean isRowBroken(int row) { |
1098 |
// TODO Auto-generated method stub |
1099 |
return false; |
1100 |
} |
1101 |
|
1102 |
/** |
1103 |
* <pre> |
1104 |
* Not supported right now, as StreamedWorkbook |
1105 |
* supports only reading. |
1106 |
* </pre> |
1107 |
* |
1108 |
*/ |
1109 |
public void removeRowBreak(int row) { |
1110 |
// TODO Auto-generated method stub |
1111 |
|
1112 |
} |
1113 |
|
1114 |
/** |
1115 |
* <pre> |
1116 |
* Will be supported in future. |
1117 |
* </pre> |
1118 |
*/ |
1119 |
public int[] getRowBreaks() { |
1120 |
// TODO Auto-generated method stub |
1121 |
return null; |
1122 |
} |
1123 |
|
1124 |
/** |
1125 |
* <pre> |
1126 |
* Will be supported in future. |
1127 |
* </pre> |
1128 |
*/ |
1129 |
public int[] getColumnBreaks() { |
1130 |
// TODO Auto-generated method stub |
1131 |
return null; |
1132 |
} |
1133 |
|
1134 |
public void setColumnBreak(int column) { |
1135 |
// TODO Auto-generated method stub |
1136 |
|
1137 |
} |
1138 |
|
1139 |
/** |
1140 |
* <pre> |
1141 |
* Will be supported in future. |
1142 |
* </pre> |
1143 |
*/ |
1144 |
public boolean isColumnBroken(int column) { |
1145 |
// TODO Auto-generated method stub |
1146 |
return false; |
1147 |
} |
1148 |
|
1149 |
/** |
1150 |
* <pre> |
1151 |
* Not supported right now, as StreamedWorkbook |
1152 |
* supports only reading. |
1153 |
* </pre> |
1154 |
* |
1155 |
*/ |
1156 |
public void removeColumnBreak(int column) { |
1157 |
// TODO Auto-generated method stub |
1158 |
|
1159 |
} |
1160 |
|
1161 |
/** |
1162 |
* <pre> |
1163 |
* Not supported right now, as StreamedWorkbook |
1164 |
* supports only reading. |
1165 |
* </pre> |
1166 |
* |
1167 |
*/ |
1168 |
public void setColumnGroupCollapsed(int columnNumber, boolean collapsed) { |
1169 |
// TODO Auto-generated method stub |
1170 |
|
1171 |
} |
1172 |
|
1173 |
/** |
1174 |
* <pre> |
1175 |
* Not supported right now, as StreamedWorkbook |
1176 |
* supports only reading. |
1177 |
* </pre> |
1178 |
* |
1179 |
*/ |
1180 |
public void groupColumn(int fromColumn, int toColumn) { |
1181 |
// TODO Auto-generated method stub |
1182 |
|
1183 |
} |
1184 |
|
1185 |
/** |
1186 |
* <pre> |
1187 |
* Not supported right now, as StreamedWorkbook |
1188 |
* supports only reading. |
1189 |
* </pre> |
1190 |
* |
1191 |
*/ |
1192 |
public void ungroupColumn(int fromColumn, int toColumn) { |
1193 |
// TODO Auto-generated method stub |
1194 |
|
1195 |
} |
1196 |
|
1197 |
/** |
1198 |
* <pre> |
1199 |
* Not supported right now, as StreamedWorkbook |
1200 |
* supports only reading. |
1201 |
* </pre> |
1202 |
* |
1203 |
*/ |
1204 |
public void groupRow(int fromRow, int toRow) { |
1205 |
// TODO Auto-generated method stub |
1206 |
|
1207 |
} |
1208 |
|
1209 |
/** |
1210 |
* <pre> |
1211 |
* Not supported right now, as StreamedWorkbook |
1212 |
* supports only reading. |
1213 |
* </pre> |
1214 |
* |
1215 |
*/ |
1216 |
public void ungroupRow(int fromRow, int toRow) { |
1217 |
// TODO Auto-generated method stub |
1218 |
|
1219 |
} |
1220 |
|
1221 |
/** |
1222 |
* <pre> |
1223 |
* Not supported right now, as StreamedWorkbook |
1224 |
* supports only reading. |
1225 |
* </pre> |
1226 |
* |
1227 |
*/ |
1228 |
public void setRowGroupCollapsed(int row, boolean collapse) { |
1229 |
// TODO Auto-generated method stub |
1230 |
|
1231 |
} |
1232 |
|
1233 |
/** |
1234 |
* <pre> |
1235 |
* Not supported right now, as StreamedWorkbook |
1236 |
* supports only reading. |
1237 |
* </pre> |
1238 |
* |
1239 |
*/ |
1240 |
public void setDefaultColumnStyle(int column, CellStyle style) { |
1241 |
// TODO Auto-generated method stub |
1242 |
|
1243 |
} |
1244 |
|
1245 |
/** |
1246 |
* <pre> |
1247 |
* Not supported right now, as StreamedWorkbook |
1248 |
* supports only reading. |
1249 |
* </pre> |
1250 |
* |
1251 |
*/ |
1252 |
public void autoSizeColumn(int column) { |
1253 |
// TODO Auto-generated method stub |
1254 |
|
1255 |
} |
1256 |
|
1257 |
/** |
1258 |
* <pre> |
1259 |
* Not supported right now, as StreamedWorkbook |
1260 |
* supports only reading. |
1261 |
* </pre> |
1262 |
* |
1263 |
*/ |
1264 |
public void autoSizeColumn(int column, boolean useMergedCells) { |
1265 |
// TODO Auto-generated method stub |
1266 |
|
1267 |
} |
1268 |
|
1269 |
/** |
1270 |
* <pre> |
1271 |
* Will be supported in future. |
1272 |
* </pre> |
1273 |
*/ |
1274 |
public Comment getCellComment(int row, int column) { |
1275 |
// TODO Auto-generated method stub |
1276 |
return null; |
1277 |
} |
1278 |
|
1279 |
/** |
1280 |
* <pre> |
1281 |
* Will be supported in future. |
1282 |
* </pre> |
1283 |
*/ |
1284 |
public Comment getCellComment(CellAddress ref) { |
1285 |
// TODO Auto-generated method stub |
1286 |
return null; |
1287 |
} |
1288 |
|
1289 |
/** |
1290 |
* <pre> |
1291 |
* Will be supported in future. |
1292 |
* </pre> |
1293 |
*/ |
1294 |
public Map<CellAddress, ? extends Comment> getCellComments() { |
1295 |
// TODO Auto-generated method stub |
1296 |
return null; |
1297 |
} |
1298 |
|
1299 |
/** |
1300 |
* <pre> |
1301 |
* Will be supported in future. |
1302 |
* </pre> |
1303 |
*/ |
1304 |
public Drawing getDrawingPatriarch() { |
1305 |
// TODO Auto-generated method stub |
1306 |
return null; |
1307 |
} |
1308 |
|
1309 |
/** |
1310 |
* <pre> |
1311 |
* Not supported right now, as StreamedWorkbook |
1312 |
* supports only reading. |
1313 |
* </pre> |
1314 |
* |
1315 |
*/ |
1316 |
public Drawing createDrawingPatriarch() { |
1317 |
// TODO Auto-generated method stub |
1318 |
return null; |
1319 |
} |
1320 |
|
1321 |
/** |
1322 |
* <pre> |
1323 |
* Will not be supported due to memory constraints |
1324 |
* </pre> |
1325 |
*/ |
1326 |
public Workbook getWorkbook() { |
1327 |
// TODO Auto-generated method stub |
1328 |
return null; |
1329 |
} |
1330 |
|
1331 |
/** |
1332 |
* <pre> |
1333 |
* Will be supported in future. |
1334 |
* </pre> |
1335 |
*/ |
1336 |
public String getSheetName() { |
1337 |
// TODO Auto-generated method stub |
1338 |
return null; |
1339 |
} |
1340 |
|
1341 |
/** |
1342 |
* <pre> |
1343 |
* Will be supported in future. |
1344 |
* </pre> |
1345 |
*/ |
1346 |
public boolean isSelected() { |
1347 |
// TODO Auto-generated method stub |
1348 |
return false; |
1349 |
} |
1350 |
|
1351 |
/** |
1352 |
* <pre> |
1353 |
* Not supported right now, as StreamedWorkbook |
1354 |
* supports only reading. |
1355 |
* </pre> |
1356 |
* |
1357 |
*/ |
1358 |
public CellRange<? extends Cell> setArrayFormula(String formula, |
1359 |
CellRangeAddress range) { |
1360 |
// TODO Auto-generated method stub |
1361 |
return null; |
1362 |
} |
1363 |
|
1364 |
/** |
1365 |
* <pre> |
1366 |
* Not supported right now, as StreamedWorkbook |
1367 |
* supports only reading. |
1368 |
* </pre> |
1369 |
* |
1370 |
*/ |
1371 |
public CellRange<? extends Cell> removeArrayFormula(Cell cell) { |
1372 |
// TODO Auto-generated method stub |
1373 |
return null; |
1374 |
} |
1375 |
|
1376 |
/** |
1377 |
* <pre> |
1378 |
* Will be supported in future. |
1379 |
* </pre> |
1380 |
*/ |
1381 |
public DataValidationHelper getDataValidationHelper() { |
1382 |
// TODO Auto-generated method stub |
1383 |
return null; |
1384 |
} |
1385 |
|
1386 |
/** |
1387 |
* <pre> |
1388 |
* Will be supported in future. |
1389 |
* </pre> |
1390 |
*/ |
1391 |
public List<? extends DataValidation> getDataValidations() { |
1392 |
// TODO Auto-generated method stub |
1393 |
return null; |
1394 |
} |
1395 |
|
1396 |
/** |
1397 |
* <pre> |
1398 |
* Not supported right now, as StreamedWorkbook |
1399 |
* supports only reading. |
1400 |
* </pre> |
1401 |
* |
1402 |
*/ |
1403 |
public void addValidationData(DataValidation dataValidation) { |
1404 |
// TODO Auto-generated method stub |
1405 |
|
1406 |
} |
1407 |
|
1408 |
/** |
1409 |
* <pre> |
1410 |
* Not supported right now, as StreamedWorkbook |
1411 |
* supports only reading. |
1412 |
* </pre> |
1413 |
* |
1414 |
*/ |
1415 |
public AutoFilter setAutoFilter(CellRangeAddress range) { |
1416 |
// TODO Auto-generated method stub |
1417 |
return null; |
1418 |
} |
1419 |
|
1420 |
/** |
1421 |
* <pre> |
1422 |
* Will be supported in future. |
1423 |
* </pre> |
1424 |
*/ |
1425 |
public SheetConditionalFormatting getSheetConditionalFormatting() { |
1426 |
// TODO Auto-generated method stub |
1427 |
return null; |
1428 |
} |
1429 |
|
1430 |
/** |
1431 |
* <pre> |
1432 |
* Will be supported in future. |
1433 |
* </pre> |
1434 |
*/ |
1435 |
public CellRangeAddress getRepeatingRows() { |
1436 |
// TODO Auto-generated method stub |
1437 |
return null; |
1438 |
} |
1439 |
|
1440 |
/** |
1441 |
* <pre> |
1442 |
* Will be supported in future. |
1443 |
* </pre> |
1444 |
*/ |
1445 |
public CellRangeAddress getRepeatingColumns() { |
1446 |
// TODO Auto-generated method stub |
1447 |
return null; |
1448 |
} |
1449 |
|
1450 |
/** |
1451 |
* <pre> |
1452 |
* Not supported right now, as StreamedWorkbook |
1453 |
* supports only reading. |
1454 |
* </pre> |
1455 |
* |
1456 |
*/ |
1457 |
public void setRepeatingRows(CellRangeAddress rowRangeRef) { |
1458 |
// TODO Auto-generated method stub |
1459 |
|
1460 |
} |
1461 |
|
1462 |
/** |
1463 |
* <pre> |
1464 |
* Not supported right now, as StreamedWorkbook |
1465 |
* supports only reading. |
1466 |
* </pre> |
1467 |
* |
1468 |
*/ |
1469 |
public void setRepeatingColumns(CellRangeAddress columnRangeRef) { |
1470 |
// TODO Auto-generated method stub |
1471 |
|
1472 |
} |
1473 |
|
1474 |
/** |
1475 |
* <pre> |
1476 |
* Will be supported in future. |
1477 |
* </pre> |
1478 |
*/ |
1479 |
public int getColumnOutlineLevel(int columnIndex) { |
1480 |
// TODO Auto-generated method stub |
1481 |
return 0; |
1482 |
} |
1483 |
|
1484 |
/** |
1485 |
* <pre> |
1486 |
* Will be supported in future. |
1487 |
* </pre> |
1488 |
*/ |
1489 |
public Hyperlink getHyperlink(int row, int column) { |
1490 |
// TODO Auto-generated method stub |
1491 |
return null; |
1492 |
} |
1493 |
|
1494 |
/** |
1495 |
* <pre> |
1496 |
* Will be supported in future. |
1497 |
* </pre> |
1498 |
*/ |
1499 |
public Hyperlink getHyperlink(CellAddress addr) { |
1500 |
// TODO Auto-generated method stub |
1501 |
return null; |
1502 |
} |
1503 |
|
1504 |
|
1505 |
/** |
1506 |
* <pre> |
1507 |
* Will not be supported due to memory constraints |
1508 |
* </pre> |
1509 |
*/ |
1510 |
public List<? extends Hyperlink> getHyperlinkList() { |
1511 |
// TODO Auto-generated method stub |
1512 |
return null; |
1513 |
} |
1514 |
|
1515 |
/** |
1516 |
* <pre> |
1517 |
* Will be supported in future. |
1518 |
* </pre> |
1519 |
*/ |
1520 |
public CellAddress getActiveCell() { |
1521 |
// TODO Auto-generated method stub |
1522 |
return null; |
1523 |
} |
1524 |
|
1525 |
/** |
1526 |
* <pre> |
1527 |
* Not supported right now, as StreamedWorkbook |
1528 |
* supports only reading. |
1529 |
* </pre> |
1530 |
* |
1531 |
*/ |
1532 |
public void setActiveCell(CellAddress address) { |
1533 |
// TODO Auto-generated method stub |
1534 |
|
1535 |
} |
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 |
|
1542 |
} |