Topic
19 replies Latest Post - ‏2014-07-01T12:01:38Z by Samuel Chan
RupakJha
RupakJha
31 Posts
ACCEPTED ANSWER

Pinned topic how to export excel file from coach table

‏2012-10-16T19:56:22Z |
Hi all,
i have requirement to export excel file from coach table with below
1. exported excel file's cells back ground color and cell's font color should be on formula base.
2. some cell's value should be non editable based on formula.

can anyone help me to achieve above.
I am trying with POI jar any idea please share.

Regards,
Rupak Jha
Updated on 2013-01-25T04:31:35Z at 2013-01-25T04:31:35Z by kolban
  • SystemAdmin
    SystemAdmin
    7615 Posts
    ACCEPTED ANSWER

    Re: how to export excel file from coach table

    ‏2012-10-16T21:37:58Z  in response to RupakJha
    Honestly the easiest way to do this is to cheat. Assuming you don't have multiple tabs, you don't need POI. Here's how you cheat.

    1. You realize that you can do all the formatting you need in an HTML table.
    2. You generate you HTML table and save it to a file (I like to use XSLT for this, but do it however is easiest for you)
    3. You save the file with an .xls extension.
    4. When the user's machine see the file, excel tries to open it, and, kindly, retains all the HTML formatting for you.

    POI is nice, but I would only break it out if I really really needed. it.

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    • RupakJha
      RupakJha
      31 Posts
      ACCEPTED ANSWER

      Re: how to export excel file from coach table

      ‏2012-11-03T07:47:51Z  in response to SystemAdmin
      Hi Andrew,

      Thanks for your valuable response.
      rite now i am doing the same to achieve the solution.

      It will be great if we can achieve the solution using POI Jar file.
      Looking forward,

      Regards,
      Rupak Jha
      • SystemAdmin
        SystemAdmin
        7615 Posts
        ACCEPTED ANSWER

        Re: how to export excel file from coach table

        ‏2012-11-05T09:56:31Z  in response to RupakJha
        Which version are you using ? Take a look at below URL.

        http://bpmwiki.blueworkslive.com/display/commwiki/Coach+Table+Excel+Export+Example

        Thanks !
        • RupakJha
          RupakJha
          31 Posts
          ACCEPTED ANSWER

          Re: how to export excel file from coach table

          ‏2012-11-06T20:42:03Z  in response to SystemAdmin
          Hi SG,

          Thanks for you response.
          I think you haven't read my requirement. Please read it .
          Thanks,
          Rupak Jha
          • SystemAdmin
            SystemAdmin
            7615 Posts
            ACCEPTED ANSWER

            Re: how to export excel file from coach table

            ‏2012-11-07T06:58:50Z  in response to RupakJha
            Yeah I have gone through that.Below is my ans for the same.

            1. exported excel file's cells back ground color and cell's font color should be on formula base.
            2. some cell's value should be non editable based on formula.
            Ans:-You have to control this in your code.

            below is sample code.

            Set Obj=CreateObject("Excel.Application")
            Obj.WorkBooks.Add
            Set xlsheet=obj.WorkBooks(1).WorkSheets(1)
            xlsheet.name="REPORT"

            WHAT YOU ARE USING POI JAR ? IS that necessary here ? Or you are trying to copy some one's code and fitting that here in ....which version u use.....that was my question.

            Don't expect to get the source code for this kind of queries....practice coding.

            Thanks !
            • SystemAdmin
              SystemAdmin
              7615 Posts
              ACCEPTED ANSWER

              Re: how to export excel file from coach table

              ‏2012-11-07T17:43:40Z  in response to SystemAdmin
              That's a great solution for IE Runing on windows, but does it work for other browsers and Operating systems? Just curious.

              Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: how to export excel file from coach table

                ‏2012-11-08T06:47:24Z  in response to SystemAdmin
                Andrew I need to test browser and os compatibility.It works fine for me in IE.Will post soon.

                Thanks !
            • RupakJha
              RupakJha
              31 Posts
              ACCEPTED ANSWER

              Re: how to export excel file from coach table

              ‏2012-11-07T20:12:05Z  in response to SystemAdmin
              Hello SG,
              Thanks for your suggestion.
              you should think about your skills.
              Please don't reply the post to increase the count. if don't know the solution.
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: how to export excel file from coach table

                ‏2012-11-07T21:30:09Z  in response to RupakJha
                This forum maintains its value through discussions from people of various skill levels, and participation is encouraged from everyone.
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: how to export excel file from coach table

                ‏2012-11-08T06:48:51Z  in response to RupakJha
                @ Rupak Jha did you try the way i suggested or still expecting the source code and later you will copy paste the code ?
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: how to export excel file from coach table

                  ‏2012-11-08T16:28:58Z  in response to SystemAdmin
                  @SG_BPM I think you are going to find that the code you posted will only work in IE on a windows system, where MS-office is installed. This may be okay for some customers, but I'm finding more an more customers that allow other browsers and who may not even be using Excel for their spreadsheets. Although, that being said, I'm not sure how well my HTML hack would work in those cases. I think it will work as long as the .xls extension is mapped to a Spreadsheet tool that will handle html files. Open Office for example...

                  Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
              • kolban
                kolban
                3314 Posts
                ACCEPTED ANSWER

                Re: how to export excel file from coach table

                ‏2012-11-08T15:37:34Z  in response to RupakJha
                Rupak,
                Every post from everyone is valid and useful. Your post came across as rude and I'm sure that is not what you meant. Remember that we all share the same goal in learning and using the IBM BPM product. No-one is paid to provide answers on this forum. It is not a formal technical support vehicle. There are no quality controls.

                In my opinion, posting a well thought out question with lots of supporting information, description of what has been tried and the reasons behind the desire for the answer will result in a better chance of a valued response.

                Neil
                • RupakJha
                  RupakJha
                  31 Posts
                  ACCEPTED ANSWER

                  Re: how to export excel file from coach table

                  ‏2012-11-11T16:48:50Z  in response to kolban
                  Hi Neil,

                  I completely agree to your post. Precisely I was not in search of any 'source code to copy-paste' but few well thought ideas and concepts. i will take care of your suggestion.

                  Regards,
                  Rupak Jha
                • RupakJha
                  RupakJha
                  31 Posts
                  ACCEPTED ANSWER

                  Re: how to export excel file from coach table

                  ‏2012-11-11T16:53:41Z  in response to kolban
                  Hi Neil,

                  I completely agree to your post. Precisely I was not in search of any 'source code to copy-paste' but few well thought ideas and concepts. i will take care of your suggestion.

                  Regards,
                  Rupak Jha
                  • kolban
                    kolban
                    3314 Posts
                    ACCEPTED ANSWER

                    Re: how to export excel file from coach table

                    ‏2013-01-25T04:31:35Z  in response to RupakJha
                    A new sample Integration Service has been produced which writes an Excel spreadsheet from a list of Business Objects. See:

                    http://bpmwiki.blueworkslive.com/display/samples/Write+Excel

                    Neil
                    • HarishKumarRamKumar
                      HarishKumarRamKumar
                      72 Posts
                      ACCEPTED ANSWER

                      Re: how to export excel file from coach table

                      ‏2014-07-01T03:30:40Z  in response to kolban

                      Hi Kolban,

                      I tried downloading the .twx but unfortunately am on 8.0.1 .

                      Any help please.

                      • kolban
                        kolban
                        3314 Posts
                        ACCEPTED ANSWER

                        Re: how to export excel file from coach table

                        ‏2014-07-01T04:11:20Z  in response to HarishKumarRamKumar

                        Howdy,

                        Unfortunately its always a good news/bad news story.  The good news is that there is nothing in BPM 8.0.1 that should prevent the technology from working.  The bad news is that I only have IBM BPM 8.5.5 available to me now so there is simply no way I can package up a copy for 8.0.1.  The samples I put on the Wiki are just those ... samples ... and unfortunately no-one is yet charged with the responsibility of ensuring that all samples are available for all releases.  About the best I can suggest is that you get yourself a copy of the level of BPM needed to run the sample, import the sample ... study it hard and make sure you know how it works and then "back-port it" yourself to the release level you need.

            • RupakJha
              RupakJha
              31 Posts
              ACCEPTED ANSWER

              Re: how to export excel file from coach table

              ‏2012-11-11T16:20:12Z  in response to SystemAdmin
              Hi SG,

              Thanks for your valuable suggestion. I would like to clarify anyways that I had posted my query not to get any source code for 'copy and pasting' but to broaden my understanding. Your suggested sample code was really useful for IE though I was approaching to make the code browser independent by Java approach solution (using POI Jar).

              Currently I am using 7.5.1 version.

              Thanks,

              Rupak
  • Samuel Chan
    Samuel Chan
    382 Posts
    ACCEPTED ANSWER

    Re: how to export excel file from coach table

    ‏2014-07-01T12:01:38Z  in response to RupakJha

    There are Javascript only solutions (as in, no server request required) to generate at the very least a CSV that the user is able to download.

    It's only supported in modern browsers (Chrome, Safari, FF, IE10+), so it might not be a real solution if you're needing old IE support.

    I can't remember where the tutorial was for setting this up, but this is part of the puzzle: https://developer.mozilla.org/en-US/docs/Web/API/Blob

    I'll post back here when I can find it, but the essentials are that you can create a blob file (see link) that you can attach to a normal <a href=""></a> element which will simply download the blob as a file. You're free to name the file as well. I've created CSV files like this before for download. I just don't have the code on hand to demonstrate.

    The basic idea is that you have a CV that has a button that has the <a> tag wrapped around it. That <a> tag will have a click listener that generates the required blob on demand and immediately downloads it after it's done.

    Updated on 2014-07-01T12:04:29Z at 2014-07-01T12:04:29Z by Samuel Chan