Announcement

Collapse
No announcement yet.

Excel exports

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Excel exports

    Hello yuri + the rest of the Espo team.

    I'm looking for some advice.

    I have a patch that exports via Excel rather than CSV. It works really well, different field types are supported, correctly formatting the columns, combining id + name pairs into links back to the espo url. Uses the translated labels rather than field names.



    I also added the concept of 'default export field lists' for users as a configurable layout in the Admin section. This is a separate commit.

    Click image for larger version

Name:	
Views:	0
Size:	51.2 KB
ID:	25891


    I would be really happy for it to be included in Espo (one less separate commit to refactor every few months). However since I wrote this patch you introduced the Custom Field List modal dialog in both core + the Advanced pack.

    In my patch I reduced a lot of the duplicate code between Core + Advanced pack as well as refactored the Core/Services/Record class to perform all the Excel formatting for both Core + Reports.

    I've started refactoring this against latest Espo - but I wonder if it's worth the effort? Would you consider adding it? The current exports are not great to look at, and everyone here is really happy with them. I think Espo users might appreciate this.

    The question would be how to handle the Custom Field List modal - whether to expand it ? Auto populate the Custom Field list from the 'layout'. Users could choose what is default mode - the rich Excel version or CSV. PHPExcel also supports OpenOffice which could be configurable.

    I'm happy to do the work getting it suitable for core - but need guidance on how you'd see it working.

    thanks.

    Alasdair
    Attached Files
    Last edited by alasdaircr; 01-16-2017, 04:59 PM.

  • #2
    Tha will be a great!! . I was doing some Table export over the weekend and its really poor handle. In my case, the wysywing field was not formatted correctly making the file almost unworkable.

    Comment


    • #3
      Excel doesn't render HTML in cells, however there are some functions in PHPExcel to convert HTML to RTF. Perhaps that is a workable thing. Will look into it.

      Comment


      • #4
        Looking in more detail at the Advanced pack report exporting and it seems to be pretty broken for me :-(

        Although you can select some of a related entities attributes in the 'columns' select box, these are not being exported (you can't choose them from the Custom Field List modal dialog. (In the advanced demo on espocrm.de I get a 500 error when exporting with a custom list and related property chosen as a column)

        Also if you click select a subset of the items in the report's output list (instead of Select All) the selected columns are not used and instead the full attribute set of the entity is exported...

        This makes me even more convinced that the exporting in general needs a major overhaul! Tapping on excel outputs is just another hundred lines of code which I already have.

        It actually shouldn't be so hard.. the correct data is being returned from the executeListReport call (as long as you comment out fullSelect param). And each column's type definitions can be determined easily, even for related entities. With that it should be possible to export exactly what is displayed in the UI.

        Comment


        • #5
          One of the first things to do would be remove all duplicated code in Espo/Services/Record.php + Espo/Modules/Advanced/Services/Report.php

          Comment


          • #6
            Hi.
            In the advanced demo on espocrm.de I get a 500 error when exporting with a custom list and related property chosen as a column
            Could you describe you report and errors (better with screenshots)?

            Comment

          Working...
          X