NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: jking on May 31, 2018, 06:56:44 PM

Title: Export button on browse
Post by: jking on May 31, 2018, 06:56:44 PM
I would like to conditionally set cell colors in the exported xml when using the Export to Excel button on a NT 10.19 browse.  I have set my own style in the After Set Styles embed as follows:

!!Create my own cell style
  ExcelExport.SetStyle('s999','MyCell')
  ExcelExport.SetStyleInterior('s999','#F6EFCE','Solid')

Then, in the Export To Excel Set Queue Record embed I tried the following:

 !!conditionally set exported cell with my style
        If loc:Status = 'Complete'
            ExcelExport.SetCell(rowNumber,ColumnNumber,loc:Status,'s999')
        END

This has not worked for me and I have tried a number of the other Export To Excel embeds.  Can anyone suggest a solution? 

P.S.
Ideally, I'd like an integration of SendTo in Nettalk, to export a browse to HTLM, XLS, PDF, etc., but I don't think this has been done yet.





Title: Re: Export button on browse
Post by: Bruce on May 31, 2018, 10:56:57 PM
Hi Jeff,

you're on the right track. The only thing missing for you was a good embed point.
The problem with the embed point you used was that the RowNumber and ColumnNumber fields are not set correctly (for the loc:status field) at that point.

I have added a new embed point in 10.22 which allows you to better so what you need, just after the generated call to .SetCell.
You can then do;

        If loc:Status = 'Complete'
            ExcelExport.SetCell(rowNumber,ColumnNumber, ,'s999')
        END


(you can put loc:status in the 3rd parameter, or leave it off, either way is fine.)

so grab 10.22 when it's up and try with that.

cheers
Bruce

Title: Re: Export button on browse
Post by: jking on June 01, 2018, 07:19:32 AM
Bruce,

     Thanks!  I'll get 10.22 as soon as you post it.

Jeff
Title: Re: Export button on browse
Post by: jking on June 13, 2018, 10:36:06 AM
Bruce,

     I have done some testing and the new embed you added works well.  See the attached image.

Thanks!

Jeff
Title: Re: Export button on browse
Post by: Bruce on June 13, 2018, 10:31:50 PM
cool.