Export Jide Tables to HTML

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Export Jide Tables to HTML

Postby eloy » Sun Sep 09, 2012 11:38 am

Hello,

I have been asked to export data - which is available in a Jide Grid - to HTML.
Technically, this is no problem but I thought it would be much better
if Jide provides such a feature already out-of-the-box.

I have seen a similar request from another Jide customer:
http://www.jidesoft.com/forum/viewtopic.php?f=17&t=13654&p=67266&hilit=Export#p67266

If I got it right he has also implemented his own solution.

Are there any plans to provide such a feature in an upcoming Jide version?

Thanks,
eloy
eloy
 
Posts: 59
Joined: Wed Jan 04, 2012 1:48 am
Location: Freiburg

Re: Export Jide Tables to HTML

Postby JIDE Support » Mon Sep 10, 2012 3:06 pm

Yes, it's in our plan and we will keep you posted when we have this feature delivered.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Export Jide Tables to HTML

Postby gtt » Thu Apr 07, 2016 4:40 am

Hi all,

we GTT are also urgently interested in exporting to html format as is possible by CSV or HSSF/Excel formats.
What about a release time?

This thread is already some years old.

Regards
Markus (GTT)
gtt
 
Posts: 311
Joined: Thu Feb 04, 2010 11:42 pm

Re: Export Jide Tables to HTML

Postby JIDE Support » Thu Apr 07, 2016 9:39 am

We haven't done anything to it. Feel free to do it yourself as it doesn't really have any dependent to the existing JIDE code. I can share the CsvTableUtils here in case you think it might be useful.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Export Jide Tables to HTML

Postby gtt » Fri Apr 08, 2016 10:33 am

Yes please share this code ...
gtt
 
Posts: 311
Joined: Thu Feb 04, 2010 11:42 pm

Re: Export Jide Tables to HTML

Postby JIDE Support » Fri Apr 08, 2016 11:02 am

I just emailed you the file.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Export Jide Tables to HTML

Postby skywalker » Tue Dec 04, 2018 8:40 am

Can you please email me the code of CsvTableUtils as well?

Thanks,
Sanjiv

Edit : got it, thanks
skywalker
 
Posts: 204
Joined: Sat Jun 30, 2012 10:17 am

Re: Export Jide Tables to HTML

Postby skywalker » Wed Mar 13, 2019 5:44 am

I see that CsvTableUtils doesn't support exporting AggregateTablePane. I'd expect the export to be similar to an AggregateTable with aggregate columns. I see there are API's to export AggregateTablePane to Excel but we're unable to use it as we're on an older version of POI that's not compatible with the one Jide requires.

Are you able to add support for exporting AggregateTablePane to CSV? Or if you can give me suggestions on how to implement it similar to what HssfAggregateTablePaneUtils does?

Thanks,
Sanjiv
skywalker
 
Posts: 204
Joined: Sat Jun 30, 2012 10:17 am

Re: Export Jide Tables to HTML

Postby JIDE Support » Wed Mar 13, 2019 10:19 am

HssfAggregateTablePaneUtils just gets each child tables and export them at the right location to create a large table.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Export Jide Tables to HTML

Postby skywalker » Wed Mar 13, 2019 10:28 am

(Sorry for the cross post. I intended to delete this one and leave the one under Pivot Grid forum. Since you replied here, I deleted the other dup post).

Are you able to share the source for the relevant portions in HssfAggregateTablePaneUtils so that I can port it to CsvTableUtils with less effort implementing the logic myself?

Thanks,
Sanjiv
skywalker
 
Posts: 204
Joined: Sat Jun 30, 2012 10:17 am

Re: Export Jide Tables to HTML

Postby JIDE Support » Wed Mar 13, 2019 12:32 pm

The main method in HssfAggregateTablePaneUtils is this.
Code: Select all
    private static void exportToWorkbook(Workbook wb, String sheetName, AggregateTablePane tablePane, HssfTableFormat format) {
        boolean sheetExists = wb.getSheet(sheetName) != null;
        Sheet sheet = sheetExists ? wb.getSheet(sheetName) : wb.createSheet(sheetName);

        int startColumn = format.getStartColumn();
        int startRow = format.getStartRow();
        int freezeColumn = startColumn;

        JTable rowHeaderTable = tablePane.getRowHeaderTable();
        if (rowHeaderTable != null && rowHeaderTable.getColumnCount() > 0 && rowHeaderTable instanceof AggregateTable) {
            HssfAggregateTableUtils.exportToSheet((AggregateTable) rowHeaderTable, wb, sheet, 0, startColumn, true, format.getCellValueConverter());
            startColumn += rowHeaderTable.getColumnCount();
            freezeColumn = startColumn;
        }

        JTable mainTable = tablePane.getMainTable();
        if (mainTable != null && mainTable.getColumnCount() != 0) {
            HssfTableUtils.exportToSheet(mainTable, wb, sheet, 0, startColumn, true, format.getCellValueConverter());
            startColumn += mainTable.getColumnCount();
            startRow += mainTable.getRowCount();
        }

        JTable footerTable = tablePane.getRowFooterTable();
        if (footerTable != null && footerTable.getColumnCount() > 0) {
            HssfTableUtils.exportToSheet(footerTable, wb, sheet, 0, startColumn, true, format.getCellValueConverter());
        }

        startColumn = 0;

        JTable rowHeaderColumnFooterTable = tablePane.getRowHeaderColumnFooterTable();
        if (rowHeaderColumnFooterTable != null && rowHeaderColumnFooterTable.getColumnCount() > 0) {
            HssfTableUtils.exportToSheet(rowHeaderColumnFooterTable, wb, sheet, startRow, startColumn, false, format.getCellValueConverter());
            startColumn += rowHeaderColumnFooterTable.getColumnCount();
        }

        JTable columnFooterTable = tablePane.getColumnFooterTable();
        if (columnFooterTable != null && columnFooterTable.getColumnCount() > 0) {
            HssfTableUtils.exportToSheet(columnFooterTable, wb, sheet, startRow, startColumn, false, format.getCellValueConverter());
            startColumn += columnFooterTable.getColumnCount();
        }

        JTable rowFooterColumnFooterTable = tablePane.getRowFooterColumnFooterTable();
        if (rowFooterColumnFooterTable != null && rowFooterColumnFooterTable.getColumnCount() > 0) {
            HssfTableUtils.exportToSheet(rowFooterColumnFooterTable, wb, sheet, startRow, startColumn, false, format.getCellValueConverter());
        }

        if (format.isFreezePanes()) {
            sheet.createFreezePane(freezeColumn, format.getStartRow() + 1);
        }
    }
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Export Jide Tables to HTML

Postby skywalker » Wed Mar 13, 2019 12:43 pm

Thanks, appreciate it!
skywalker
 
Posts: 204
Joined: Sat Jun 30, 2012 10:17 am


Return to Product Suggestions

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron