BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Create Excel/Word/CSV from BAW

    Posted Fri March 05, 2021 09:28 AM
    Can we create Excel/CSV/Word documents with a given format from BAW?

    ------------------------------
    Nisala Chamath Jayasinghe
    ------------------------------


  • 2.  RE: Create Excel/Word/CSV from BAW

    Posted Fri March 05, 2021 03:27 PM
    Totally sure this was answered in the discussion forum that existed before this one, but apparently those have gone away.  First lets separate "Word" from "Excel" as those are really much different topics. Several of the UI table controls out in the wild have the ability to download a given table as excel. Under the covers the way most of these work is via a slight cheat.  If you create an HTML file that contains only a table in the body, and name the file with an Excel extension (e.g. my_data.xls) then when the user opens that file it will open in Excel.

    Advantages -
    • Pretty easy to do.
    • Can be intuitive for the user.
    • Built into something you already have.
    Disadvantages -
    • Only one "Tab" in the excel
    • No real "formulas" so all the cells are static

    I had our company create a Toolkit for Excel Creation / Reading that can generate (and read) multi-sheet Excel files via use of the open source poi library. It isn't that hard to do so if the above doesn't meet your requirements you could think about using that. Being honest, many times when users want the data in Excel it can indicate a bit of a breakdown in the underlying process, so I would definitely drill more into the underlying requirement.

    You can also use POI to generate Word files, but I've seen much less call for that. Similarly I think you can trick Word like you can excel and create an HTML file with a .doc extension and have it open in word for you. It isn't truly a word file at that moment, but good enough for most user's needs.

    ------------------------------
    Andrew Paier
    ------------------------------