This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Feb 2, 2016, 3:02 AM
1 Posts

Formatting Excel

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: Borders
  • Replies: 4

Hi:

I'm struggling with a very small thing - I'm trying to create a border around a range of cells in excel with Lotus script.  I've looked up the MS Help, and I've searched here as well and cannot seem to crack it.  In a last ditch attempt, I was hoping someone might be able to look at this and tell me what I'm doing wrong.  

object.range("B7:L10").Select
           With Selection.Borders(xlEdgeLeft)  <---whines here
            .LineStyle = xlContinuous
            .Weight = xlThin
            .ColorIndex = xlAutomatic
        End With
    With Selection.Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .Weight = xlThin
            .ColorIndex = xlAutomatic
        End With
    With Selection.Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .Weight = xlThin
            .ColorIndex = xlAutomatic
        End With
    With Selection.Borders(xlEdgeRight)
            .LineStyle = xlContinuous
            .Weight = xlThin
            .ColorIndex = xlAutomatic
        End With

Thanks

Feb 2, 2016, 8:54 AM
107 Posts
What error message do you get?
My best guess is that Excel constants (like e.g. xlEdgeLeft) might be undefined in the context of your LS code. To know for sure you'd need to add an error handler to your code to obtain the exact error message.
Feb 2, 2016, 4:09 PM
100 Posts
Use the VBA editor

You need to change all of the 'xl<things>' to numeric values.

Bring up the VBA editor

Bring up the browser (I think it's F12)

Find the attribute you're looking for and you'll see the numeric value for it.

I can't find a quick link, but in one of the forums there is a post that describes how to convert VBA into LS. This is helpful for what you're trying to do since the format VBA generates may not work directly in Notes/LS.

There are lots of posts going back to the 4/5 forum on this topic. You may also want to poke around OpenNTF.org for more examples.

Feb 2, 2016, 4:09 PM
100 Posts
Use the VBA editor

You need to change all of the 'xl<things>' to numeric values.

Bring up the VBA editor

Bring up the browser (I think it's F12)

Find the attribute you're looking for and you'll see the numeric value for it.

I can't find a quick link, but in one of the forums there is a post that describes how to convert VBA into LS. This is helpful for what you're trying to do since the format VBA generates may not work directly in Notes/LS.

There are lots of posts going back to the 4/5 forum on this topic. You may also want to poke around OpenNTF.org for more examples.

Feb 2, 2016, 6:55 PM
11 Posts
Use "border around"

Hi,

I'm using this code to add border:

ForAll cell In xlsheet.Range("A"+Cstr(firstrow)).Resize(x, 8)
            With cell
                '    .BorderAround xlContinuous, xlThin
                .BorderAround 1,2
            End With
 End ForAll

You can find Excel constants here: http://www.smarterdatacollection.com/Blog/?p=374

Attila


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal