tes001 / tableexport-for-vaadin Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/tableexport-for-vaadin
Automatically exported from code.google.com/p/tableexport-for-vaadin
What steps will reproduce the problem?
1. excelExport = new ExcelExport(mainTable);
2. excelExport.export();
What is the expected output? What do you see instead?
NOW:
public ExcelExport(final Table table, final Workbook wkbk, final String
sheetName, final String reportTitle, final String exportFileName, final boolean
hasTotalsRow)
...
sheet = workbook.createSheet(sheetName);
...
MUST BE:
public ExcelExport(final Table table, final Workbook wkbk, final String
sheetName, final String reportTitle, final String exportFileName, final boolean
hasTotalsRow)
...
sheet = workbook.createSheet(this.sheetName);
...
What version of the product are you using? On what operating system?
1.2.9
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Feb 2012 at 5:17
I have a column with /Doubles that are formatted with "###,##0.00 S;###,##0.00
H". This column is a simple one (not generated) and it's right aligned but the
Excel Export for this column is left aligned.
see:
http://vaadin.com/forum-/message_boards/view_message/579716
Original issue reported on code.google.com by [email protected]
on 12 Sep 2011 at 2:15
What steps will reproduce the problem?
1. Create a project with the folling pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.test</groupId>
<artifactId>test</artifactId>
<name>test</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>tableexport-for-vaadin</artifactId>
<version>1.5.1.3</version>
</dependency>
</dependencies>
</project>
2. run mvn compile
3. see output error
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.103s
[INFO] Finished at: Mon May 19 15:00:49 CEST 2014
[INFO] Final Memory: 5M/13M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test: Could not resolve dependencies
for project com.company.test:test:jar:0.0.1-SNAPSHOT: Could not find artifact
org.vaadin.addons:tableexport-for-vaadin:jar:1.5.1.3 in
maven2-repository.java.net (http://download.java.net/maven/2/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
To correct the issue:
Change groupId to 'groupId'
<dependency>
<groupId>groupId</groupId>
<artifactId>tableexport-for-vaadin</artifactId>
<version>1.5.1.3</version>
</dependency>
What is the expected output? What do you see instead?
The groupId should be clearer and closer to java package name
('com.vaadin.addon') or vaadin maven repo : 'org.vaadin.addons', at least, not
the generic 'groupId' value !
What version of the product are you using? On what operating system?
1.5.1.3
Win7
mvn 3.1.2
Java5
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 May 2014 at 1:07
see:
https://vaadin.com/forum/-/message_boards/view_message/579716#_19_message_906467
Hi Jonathan,
I just upgraded from v1.2.6 to v1.2.7. I noticed, that I there's an additional
empty row above the header row with the same background color as the header row.
Is there a new option that influences this behaviour? Or with other words: can
I switch this empty row off?
Thanks
Andreas
Original issue reported on code.google.com by [email protected]
on 16 Nov 2011 at 9:36
At the moment ExportableColumnGenerator.getGeneratedProperty() return a
Property and the toString-method is called and this result is used to be
displayed in excel cell.
We use toString methods for debugging and get a lot of information in log
files. So the output is not intented to be displayed in the exported excel cell.
Solution:
Let the getGeneratedProperty() return a type which makes sense for excel
(Number, String) and let the user implement the return value like it's done in
ColumnGenerator.generateCell()
What version of the product are you using? On what operating system?
vaadin 7.1.9
table export 1.5.1.1
Original issue reported on code.google.com by [email protected]
on 7 Apr 2014 at 8:53
could you please align the header cells in the same way (as regular cells)
see:
http://vaadin.com/forum/-/message_boards/view_message/579716
Original issue reported on code.google.com by [email protected]
on 12 Sep 2011 at 2:13
What steps will reproduce the problem?
1. table.setRowHeader(RowHeaderMode.INDEX);
2. new ExcelExport(table).export();
What is the expected output? What do you see instead?
I expected the RowHeader column in excel file, but it wasn't exported
It's a way to export tablerows, saving the RowHeader ? Or How can I define new
column in exported file with rownumbers...
Thanks!
Original issue reported on code.google.com by [email protected]
on 17 Dec 2014 at 9:53
from mahesh r w
RE: Addon: Export Table to Excel
2/21/12 2:51 PM as a reply to Andreas Lüdtke.
2. Is there a way to override text in column header of a table in export? In my
case, I don't have any text for a column header in table (it' normal column;
not generated). While exporting this table, can I add text for the empty header
of the column?
---
my response was:
For #2, one hack-ey workaround might be to set the column headers to what they
should be for export, right before export, and then set them back afterwards.
In the sample code, the headers get set with:
table.setColumnHeaders(new String[]{"Name", "Date", "Amount Earned", "Taxes
Paid",
"Is Manager?", "Collapsed Column Test"});
At some point I may implement a more elegant solution.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 9:45
https://vaadin.com/forum/-/message_boards/view_message/805194
Original issue reported on code.google.com by [email protected]
on 7 Oct 2011 at 10:02
Steps to reproduce
1. Implement and instantiate custom container MyHierarchical implementing
Container.Hierarchical
2. Create TreeTable and call setContainerDataSource with created instance of
MyHierarchical
3. Try to export the table. There will be no hierarchical structure in exported
Excel file
Expected behaviour:
Exported Excel file with hierarchical structure
Reproduces on vaadin-tableexport
1.2.9
Please provide any additional information below.
The problem is that hierarchical property is set if
HierarchicalContainer.class.isAssignableFrom(table.getContainerDataSource().getC
lass()) but later the DataSource is being cast to Container.Hierarchical
interface.
Original issue reported on code.google.com by [email protected]
on 31 Jul 2014 at 12:08
What steps will reproduce the problem?
We found a bug in the com.vaadin.addon.tableexport.ExcelExport. If you have
more than 2 levels in your Excel spreadsheet, the recursive method calls do not
properly track row numbers so you get rows with missing data rows with the
wrong data. Is this an appropriate place to report a bug?
Original issue reported on code.google.com by [email protected]
on 28 Nov 2014 at 4:57
Currently you can either do it for all numeric columns or none.
---
RE: Addon: Export Table to Excel
12/20/11 12:21 PM as a reply to Yuri olegovich Trykov.
Is it possible when using setDisplayTotals(true) to tell which columns to
totalize?? Because i have an ID column and the export is totalizing the IDS :S
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 8:55
1. Use Hierarchical container
2. excelExport.setDisplayTotals(false);
3. see exception below
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.IllegalArgumentException: Sheet index (-1) is out of range
(0..0)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:532)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:550)
at com.vaadin.ui.Button.changeVariables(Button.java:217)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1445)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1393)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1312)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:763)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Sheet index (-1) is out of range
(0..0)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.validateSheetIndex(HSSFWorkbook.java:403)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.removeSheetAt(HSSFWorkbook.java:822)
at com.vaadin.addon.tableexport.ExcelExport.finalSheetFormat(ExcelExport.java:730)
at com.vaadin.addon.tableexport.ExcelExport.convertTable(ExcelExport.java:271)
at com.vaadin.addon.tableexport.TableExport.export(TableExport.java:80)
Solution
ExcelExport.java:730
workbook.removeSheetAt(workbook.getSheetIndex(hierarchicalTotalsSheet));
//should be checked as it's done in initialSheetSetup()
Original issue reported on code.google.com by [email protected]
on 3 Feb 2012 at 11:53
Hello Everybody!
I have a question about this add-on.
(I use 0.0.5.4th version.)
When I export a table what is contain some numbers, then in the generated xls
file these values are strings and aren't numbers! What can I do to prevent this
mistake? Is exist any workaround?
Thank you very much for your help!
Original issue reported on code.google.com by [email protected]
on 18 Jun 2015 at 4:24
BigDecimal is also a numeric value, but there is no check against this class in
isNumeric method in ExcelExport.java; Please add it.
Original issue reported on code.google.com by [email protected]
on 17 Nov 2011 at 4:19
see: https://vaadin.com/forum/-/message_boards/view_message/579716
Original issue reported on code.google.com by [email protected]
on 13 Nov 2011 at 7:35
What steps will reproduce the problem?
1. Use TableExport to generate and download xls file.
What is the expected output? What do you see instead?
System crashes with next output:
SEVERE: IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
com.vaadin.addon.tableexport.DeletingFileInputStream
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
com.vaadin.addon.tableexport.DeletingFileInputStream
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
.....
What version of the product are you using? On what operating system?
Table export version: 1.3.0
OS: CentOS
Please provide any additional information below.
I've fixed problem locally by using my own MyDeletingFileInputStream class with
signature:
public class MyDeletingFileInputStream extends FileInputStream implements
Serializable;
Original issue reported on code.google.com by [email protected]
on 6 Aug 2012 at 2:47
What steps will reproduce the problem?
1. Add jar to a Vaadin project compiled under java 1.5
2. Run the project.
3.
What is the expected output? What do you see instead?
java.lang.UnsupportedClassVersionError:
Bad version number in .class file (unable to load class
com.vaadin.addon.tableexport.ExportableColumnGenerator)
What version of the product are you using? On what operating system?
TableExport-1.3.0
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 May 2012 at 9:39
The project lacks build automation, which makes is harder to build and use in
other projects. I have set it up in a clone:
http://code.google.com/r/voronaam-tableexport-for-vaadin/
Feel free to pull those changes in.
Original issue reported on code.google.com by [email protected]
on 24 Oct 2013 at 9:30
What steps will reproduce the problem?
1. Generate an excel with default styling
2. Open Excel 2007 and doubleclick on a data cell
3. The cell is displayed as black text on black background
What version of the product are you using? On what operating system?
TableExport 1.4
I solved that by modifying the default style this way:
style.setFillBackgroundColor(HSSFColor.WHITE.index);
Original issue reported on code.google.com by [email protected]
on 16 Oct 2013 at 9:22
from https://vaadin.com/forum/-/message_boards/view_message/579716
That resolved my issue. Thanks. However, I'm getting a null pointer exception
when my property value is null:
1
2
3
4
5
6
Caused by: java.lang.NullPointerException
at com.vaadin.addon.tableexport.ExcelExport.getProperty(ExcelExport.java:550)
at com.vaadin.addon.tableexport.ExcelExport.addDataRow(ExcelExport.java:501)
at com.vaadin.addon.tableexport.ExcelExport.addDataRows(ExcelExport.java:446)
at com.vaadin.addon.tableexport.ExcelExport.convertTable(ExcelExport.java:250)
at com.vaadin.addon.tableexport.TableExport.export(TableExport.java:42)
That's the line in getProperty when we use table format property values:
1
2
3
4
5
final String formattedProp =
((ExportableFormattedProperty) table).getFormattedPropertyValue(
rootItemId, propId, prop);
if (!prop.getValue().toString().equals(formattedProp)) {
prop = new ObjectProperty<String>(formattedProp, String.class);
In my case, both formattedProp and prop.getValue() are null. This seems to work
and is allowed for a Table. So perhaps an appropriate check for prop.getValue()
being null is needed, unless it's not actually correct what the Vaadin code is
allowing.
In IndexedContainer.IndexedContainerProperty.toString(), if the value is null,
it returns null.
1
2
3
4
5
6
7
public String toString() {
final Object value = getValue();
if (value == null) {
return null;
}
return value.toString();
}
But I'm not sure if that's a Vaadin bug or not since the property.toString() is
called by Table.formatPropertyValue() which returns "" for a null property, but
it makes no such determination for a null property value:
1
2
3
4
5
6
7
protected String formatPropertyValue(Object rowId, Object colId,
Property property) {
if (property == null) {
return "";
}
return property.toString();
}
UPDATED: I can fix my code so that formattedProp is never null by capturing
what Table.formatPropertyValue() returns, but that won't solve the bug since
prop.getValue() may return null and that I believe is always valid.
Original issue reported on code.google.com by [email protected]
on 12 Oct 2011 at 2:39
from: https://vaadin.com/forum/-/message_boards/view_message/805194
Original issue reported on code.google.com by [email protected]
on 7 Oct 2011 at 10:02
From post:
2) When using Hierarchial containers but the "displayTotals" is not set, the
code will crash during finalSheetFormat since the hierarchicalTotalsSheet is
not created. By adding a simple null check, this could easily been prevented:
protected void finalSheetFormat() {
final FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
if (isHierarchical()) {
...
if (hierarchicalTotalsSheet != null) workbook.removeSheetAt(workbook.getSheetIndex(hierarchicalTotalsSheet));
}
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 9:54
Enhance demo application to include a date column, a generated column, and a
differently formatted double column.
Original issue reported on code.google.com by [email protected]
on 17 Sep 2011 at 7:22
What steps will reproduce the problem?
1. I created a internal Table from the Grid ContainerDataSource
2. For the ExcelExport i use the new Table, which is never displays on the ui
(this is the point) as argument.
3. An Exception is raised in the TableExport.java when it tries to get the
Application
What is the expected output? What do you see instead?
No exception when the Table is not on the gui
What version of the product are you using? On what operating system?
addon Version 1.5.1.5
Websphere 8.5 on AIX
Please provide any additional information below.
Call:
Button bExport = new Button("Export");
final String finalSelectedTable = selectedTable;
bExport.addClickListener(new Button.ClickListener() {
private static final long serialVersionUID = -73954695086117200L;
private ExcelExport excelExport;
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
Date currDate = new Date();
Table table = new Table();
table.setContainerDataSource(grid.getContainerDataSource());
excelExport = new ExcelExport(table);
excelExport.excludeCollapsedColumns();
excelExport.setDisplayTotals(false);
excelExport.setRowHeaders(true);
excelExport.setDoubleDataFormat("0.00");
excelExport.setReportTitle(finalSelectedTable + " Report (" + sdf.format(currDate) + ")");
excelExport.setExportFileName(finalSelectedTable+"_"+sdf.format(currDate)+".xls");
excelExport.export();
}
});
cl.addComponent(bExport,"export");
Changed code in TableExport.java
Old:
protected boolean sendConvertedFileToUser(UI app, final File fileToExport,
final String exportFileName) {
TemporaryFileDownloadResource resource;
try {
resource =
new TemporaryFileDownloadResource(app, exportFileName, mimeType, fileToExport);
app.getPage().open(resource, null, false);
} catch (final FileNotFoundException e) {
LOGGER.warning("Sending file to user failed with FileNotFoundException " + e);
return false;
}
return true;
}
New:
protected boolean sendConvertedFileToUser(UI app, final File fileToExport,
final String exportFileName) {
TemporaryFileDownloadResource resource;
if (app == null){
app = UI.getCurrent();
}
try {
resource =
new TemporaryFileDownloadResource(app, exportFileName, mimeType, fileToExport);
app.getPage().open(resource, null, false);
} catch (final FileNotFoundException e) {
LOGGER.warning("Sending file to user failed with FileNotFoundException " + e);
return false;
}
return true;
}
Original issue reported on code.google.com by [email protected]
on 31 Mar 2015 at 10:04
What steps will reproduce the problem?
1. build hierarhical table with 3+ node deeps
1-
2-
3-
What is the expected output? What do you see instead?
Expected out
1-
2-
3-
Instead you will see only
1-
3-
What version of the product are you using? On what operating system?
1.3 version addon. vaadin 6.8+
Please provide any additional information below.
Problem in addDataRowRecursively method. It is not include added nodes numbers
for next child nodes.
private int addDataRowRecursively(final Sheet sheetToAddTo, final Object rootItemId,
final int row) {
int numberAdded = 0;
addDataRow(sheetToAddTo, rootItemId, row);
numberAdded++;
if (((Container.Hierarchical) getTable().getContainerDataSource()).hasChildren(rootItemId)) {
final Collection<?> children =
((Container.Hierarchical) getTable().getContainerDataSource())
.getChildren(rootItemId);
for (final Object child : children) {
numberAdded = numberAdded + addDataRowRecursively(sheetToAddTo, child, row+numberAdded);
}
}
return numberAdded;
}
Original issue reported on code.google.com by [email protected]
on 10 Aug 2012 at 2:58
From post:
1) A container is only considered to be hierarchical if it extends
HierarchicalContainer class. In my case, the container implements the
Container.Hierarchial interface. Could you please update the code to use the
interface Container.Hierarchial instead of HierarchicalContainer class?
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 9:53
Found the bug. Stupid error. Was setting this.sheetName correctly if sheetName
param was null. But then used sheetName, not this.SheetName later on. Renamed
all parameters to be different than their global counterparts.
---
From post:
Using 1.2.9
If you use the constructor ExcelExport(table) you get a nullPointerException.
Caused by: java.lang.NullPointerException
at
org.apache.poi.hssf.model.InternalWorkbook.doesContainsSheetName(InternalWorkboo
k.java:596)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:775)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:88)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:200)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:177)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:156)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:139)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:125)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:113)
It works if you specify a sheet name: ExcelExport(table,"my sheet")
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 10:17
Please add the ability to export java.util.Date types correctly. Right now,
they get exported as float values, and there is no way to specify a format for
the Excel cell.
Posted at: http://vaadin.com/directory#addon/tableexport
Original issue reported on code.google.com by [email protected]
on 10 Sep 2011 at 1:26
I had a working example with just one table in the XLS file:
// create TableQuery, SQLContainer and Table which are shown on the UI
excelExport = new ExcelExport(table, title);
excelExport.setExportFileName(filename);
excelExport.setDisplayTotals(false);
excelEXport.export();
But when trying to add another sheet with data from another table, the export()
call fails with NullPointerException at (TableExport.java:105)
// create TableQuery, SQLContainer and Table which are shown on the UI
excelExport = new ExcelExport(table, title);
excelExport.setExportFileName(filename);
excelExport.setDisplayTotals(false);
excelExport.convertTable();
// also create TableQuery, SQLContainer and Table not shown on the UI
excelExport.setNextTable(table2, title2);
excelExport.export();
What version of the product are you using? On what operating system?
TableExport 1.4.0, Vaaadin 7.1.0, Java 1.7.0
Original issue reported on code.google.com by [email protected]
on 28 Jan 2014 at 2:12
Would like to see this ported to Vaadin 7.
Original issue reported on code.google.com by [email protected]
on 16 Mar 2013 at 9:09
from http://vaadin.com/forum/-/message_boards/view_message/579716
Original issue reported on code.google.com by [email protected]
on 8 Sep 2011 at 6:06
I'm using your great addon for my application.
But I have a serious problem with Internet Explorer 7 and 8: it's impossible to
download the .xls file.
In fact, nothing happens except the url change (no stacktrace...).
I'm using:
Apache Poi 3.8
TableExport 1.3.0
In the vaadin forum you will see that other people have exactly the same
problem.
https://vaadin.com/forum/-/message_boards/view_message/1386664
Original issue reported on code.google.com by [email protected]
on 8 May 2012 at 12:25
from https://vaadin.com/forum/-/message_boards/view_message/579716
I got another issue that "bruno mertiku" posted to this thread as well. I am
exporting a pretty big table (20+ columns x 500+ rows) and also see the same
error message "The maximum number of cell styles was exceeded". I could see it
is an error thrown by POI but is there any easy way to set less style to avoid
the error? Thanks again.
Thanks
Gerry
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.IllegalStateException: The maximum number of cell styles was
exceeded. You can define up to 4000 styles in a .xls workbook
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1198)
at com.vaadin.ui.Button.fireClick(Button.java:539)
at com.vaadin.ui.Button.changeVariables(Button.java:206)
at
com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(
AbstractCommunicationManager.java:1305)
at
com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(Abst
ractCommunicationManager.java:1224)
at
com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(
AbstractCommunicationManager.java:739)
at
com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(Communicat
ionManager.java:296)
at
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplic
ationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollecti
on.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.IllegalStateException: The maximum number of cell styles
was exceeded. You can define up to 4000 styles in a .xls workbook
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.createCellStyle(HSSFWorkbook.java:114
4)
at com.vaadin.addon.tableexport.ExcelExport.getCellStyle(ExcelExport.java:591)
at com.vaadin.addon.tableexport.ExcelExport.addDataRow(ExcelExport.java:500)
at com.vaadin.addon.tableexport.ExcelExport.addDataRows(ExcelExport.java:438)
at com.vaadin.addon.tableexport.ExcelExport.convertTable(ExcelExport.java:243)
at com.vaadin.addon.tableexport.TableExport.export(TableExport.java:38)
at com.nomura.audit.ui.RawTable.export(RawTable.java:81)
at com.nomura.audit.ui.AuditApplication.export(AuditApplication.java:156)
at com.nomura.audit.ui.SearchForm.buttonClick(SearchForm.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
... 27 more
Hi Jonathan
I did a quick workaround to avoid the issue. In my inherited class of
ExcelExport, I override getCellStyle. Instead of creating new CellStyle upon
every call, I just reuse the static Style. I could export large amount of data
now and currently it is good enough for my case.
The ExportableColumnGenerator works perfectly well too.
Thanks!
Gerry
Original issue reported on code.google.com by [email protected]
on 12 Oct 2011 at 2:38
hasTotalsRow boolean flag is passed to constructor below, but it is ignored and
true used instead.
public ExcelExport(final Table table, final String sheetName, final String
reportTitle,
final String exportFileName, final boolean hasTotalsRow) {
this(table, new HSSFWorkbook(), sheetName, reportTitle, exportFileName, true);
}
Original issue reported on code.google.com by [email protected]
on 3 Feb 2012 at 11:44
In Vaadin it is possible to enter HTML markup inside the column title (we use
this for tooltips). On table export, this markup is displayed as column header.
Please provide a way to pass a custom header, either by a protected method or
(easier for us ;) by a setter.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2013 at 8:28
What steps will reproduce the problem?
1. Trying to export more than 655366 rows will throw an exception.
It'll be helpful if at least I can Split the table in parts, so It'll be
exported in multiple files, I'm working with 230000+ rows...
Original issue reported on code.google.com by [email protected]
on 3 Aug 2012 at 4:20
With this version I still get NullPointerExceptions in ExcelExport#addDataRow.
I can get around this problem by temporarily collapsing the generated column
that causes this problem, but maybe it's possible to avoid this at all?
Since I'm using several generated columns in my tables, I would also like to
know if the Excel Export can show the content of the generated columns instead
of the content of the container column.
Original issue reported on code.google.com by [email protected]
on 8 Sep 2011 at 6:05
from https://vaadin.com/forum/-/message_boards/view_message/579716
However, there's a strange behaviour according to me. I can export tables to
different sheets only if the tables have the same column headers.
It looks that the attribute "propIds" of the ExportExcel class doesn't depend
on the table that is being exported but on the first table that has been
exported.
Original issue reported on code.google.com by [email protected]
on 16 Nov 2011 at 9:37
What steps will reproduce the problem?
1. create a button which onclicke does the export
2. set filename with äöü
3. download
4. http 404 ressource not found
What is the expected output? What do you see instead?
the download window to download the file
What version of the product are you using? On what operating system?
vaadin 7.1.9
table export 1.5.1.1
Please provide any additional information below.
src button:
exportXLSButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event)
{
ExcelExport excelExport = new ExcelExport(theTable, user.getDisplayName());
excelExport.setExportFileName("sumary-Stephan-Grün"); //the ü is the problem
excelExport.setExcelFormatOfProperty("count", "#");
excelExport.setExcelFormatOfProperty("count1", "#");
excelExport.setExcelFormatOfProperty("totalPrice", "#,##0.00 €");
excelExport.setExcelFormatOfProperty("total", "#,##0.00 €");
excelExport.excludeCollapsedColumns();
excelExport.setReportTitle(user.getDisplayName());
excelExport.export();
}
});
Original issue reported on code.google.com by [email protected]
on 7 Apr 2014 at 8:22
File.deleteOnExit(), suggested by Henri Sara, may solve problem.
---
RE: Addon: Export Table to Excel
1/12/12 3:14 AM as a reply to Jonathan Nash.
Reply
Reply with Quote
Quick Reply
Hello!
I use TableExport-1.2.9 add-on. It leaves many temporary files(tmp*.xls) in
server directory. How can I avoid that?
Servers are WebSphere 6 and 7 at z/OS, and Apache Tomcat at Windows.
Henri Sara:
Anyway, although I have never used this add-on, it at least makes an effort to
clean up temporary files when streams are closed. I don't know if it calls
File.deleteOnExit() on the temporary files or not, that would provide another
layer of safety nets. Do you see many temporary files left there in normal use,
or only when stopping the server forcefully while debugging etc?
I see many temporary files left there in normal use.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 9:12
See comment on main add-on page (not the forum). " Is there any way to export
multiple sheets ?"
Original issue reported on code.google.com by [email protected]
on 13 Nov 2011 at 7:36
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.