Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Write text to specific Excel cells using CASL

Write text to specific Excel cells using CASL

Write text to specific Excel cells using CASL

Does anyone know how to specify in excel what cell the 'Write' statement sends strings to?

x = "Some Text"
sFile = "H:\My Documents\ExcelMacro.xls"  
Open append sFile as #1               
write #1, x
close #1

This will write to cell A1. If the marco is ran again, it will write to A2, and so on.

Does anyone know how to write to cell B1? or C2? or D8?


RE: Write text to specific Excel cells using CASL

You'll want to look at languages more robust than casl to populate excel. There are some good VBA examples in this forum showing how to set up screen objects and manipulate both attatchmate and excel.

Aside from that I'd say the best way to do what your attempting on a limited basis with casl is to write a delimited flat file in the manner your using above then import it in Excel via VBA or wizard.

Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close