Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Foxpro to Excel Spreadsheet (Excel 2K)

    I have set up an Excel session within FoxPro to generate a worksheets as an output option. After creating the Excel Object as oleAPP< I think populate the cell values with the follwing code:

    oleApp.cells(Row,Column).value=<memory variable>

    What I'm wanting to know is how to format the cell using the same technique (i.e. oleApp.cells(Row,Column).fontbold='True') If you have any info, please let me know as I am unable to find anything in the help file.

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Foxpro to Excel Spreadsheet (Excel 2K)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> dreyes

    can you do something like this: This is straight out of Excel's VBA:

    <font color=red> With oleApp.cells(Row,Column)
    ).value=<memory variable>
    .Font.ColorIndex = 3 <font color=448800> 'Makes the Text color Red </font color=448800>
    .Font.Bold = True <font color=448800> 'Makes the Text bold </font color=448800>
    .Font.Underline = xlUnderlineStyleSingle <font color=448800> 'Makes the Text Underlined </font color=448800>
    .HorizontalAlignment = xlCenter <font color=448800> 'Makes the Text centered </font color=448800>
    End With </font color=red>


    I would also suggest that you fully qualify the objects you work with so that it includes the Worksheet name and then the cell coordinates.

    HTH

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Foxpro to Excel Spreadsheet (Excel 2K)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> again dreyes

    Sory there is no leading ) before the .Value line. I guess when I copied and pasted I had an extra character I did not notice until I posted the message.

    Simply remove it.

    BTW are you working with Visual FoxPor? I thought it had VBA?

    Thanks

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •