Issue in Export SQL to Excel SS with template

Hi All,

I am using Export SQL to Excel SS in 18.1 version with predefined template where data need to writes.

Done the SS configuration like below. For testing i am trying only with 1 cell.

1. Cell_Keys: {B10}

2.Cell Values: {ABC}.

3. Document name to create :"Today"

4. Save directory :XYZ

5. Excel bases template :ABC template stored in KC

6. Sheet number: 0

7. JNDI: Data source

8. SQL : "Select * from XYZ where id=1234"

Here is the template:

I am getting below When i am running my PM.

Any pointer on this will really helpful.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    1. what is the value you're using for "JNDI name"?  It should be a text string representing the environment's JNDI name, for a generic example, "java:/jdbc/Appian".  (I've been told it should have the same value as "conf.data.datasources" in the environment properties file.)
    2. You only need to populate "Cell Keys" and "Cell Values" with the cell names and values you want to populate manually (in your example you would potentially use this for Date, Action, and Level, but probably nothing else).
    3. What value do you have for "Starting_cell"?
    4. What do you get when you run your select statement directly in the database?  Or in other words, please verify that your SQL statement is actually returning data (if so then you can disregard this step). 
    5. Did you intend to include an error message with the original post?  I'm not sure what you're referring to with "I am getting below When i am running my PM" - it soundedl ike there should be more detail below that I don't see.
  • Thanks Mike for response!!

    1. JNDI should not be the issue because i am able to export data in excel without template.

    2. Now, i am populating only required values.

    e.g : Cell Keys: ={"C7","B10","C10","D10","E10","F10","G10","H10","I10"}

            Cell Values: {}// How do i pass values which i got from SQL. Right now i am passing table fields name in values which might be wrong.

    3. I have not mentioned starting cell as it is not mandatory.

    4. I am getting result for passed ID. Now i have fetching only required fields.

    5. Yes, Error i wanted to share.

     

    6. Include Header: false()

  • 0
    Certified Lead Developer
    in reply to Vinod Tate
    JNDI should not be the issue because i am able to export data in excel without template

    Are you saying that if you temporarily remove the Excel Base Template from the node, without changing anything else, that it works fine?  Can you confirm whether your JNDI value is a text string at least somewhat similar to the one I posted?

    Cell Values: {}// How do i pass values which i got from SQL. Right now i am passing table fields name in values which might be wrong.

    I think you're misunderstanding what these inputs are for.  There is nothing additional needed to "pass SQL values" other than entering your SQL statement and giving an (optional) starting cell.  Based on your earlier screenshot you will need to make your starting cell B10.

    The "cell keys / cell values" inputs are, as i mentioned before, only for those individual values you need to populate manually such as a date or your filter values/etc.  At first you probably want to get it working without passing anything to these, just to simplify.

    I have not mentioned starting cell as it is not mandatory

    Just to clarify further: without passing a starting cell, the smart service will attempt to start filling in data from the SQL call at cell A1, which even if it doesn't cause an error, will definitely overwrite cells you don't want to overwrite.