Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotusscript - simple 123 automation - getting started

Status
Not open for further replies.

jimbackus

Technical User
Jul 2, 2002
10
0
0
GB
I use a 123 workbook to track my current (checking) account and balances for some credit cards. Each worksheet applies to a single account. I can get updated statement information in .csv files using internet banking, To assist in keeping the workbook up to date, I'd like to write a set of simple scripts. A typical task is to open a .csv file containing updates to my current account that can have a variable number of lines and copy the data into the right place on the spreadsheet. I can write pseudo code to do this but discovering appropriate Lotusscript classes/methods to achieve this is painfully slow.

For example if a particular .csv file has 7 lines, then opening the file and activating the sheet makes cell A1 active or selected. What I then want to do is go to the last occupied cell in column A (A7) and determine how many rows are in the csv file. I could do this by setting a count to 1 and then looping until I find a blank cell and subtracting 1 from the answer, but I feel there should be a much simpler way of doing this. Having found there are 7 lines in the file I then want to copy an area of 7 rows and 5 columns to the right place on the current account spreadsheet. How do I select an area of 5 columns by N rows, where N has just been determined? Finding the right place is simply a metter of checking various data items between the new data and existing data to find a match.

I've done a certain amount of programming in various languages, including Fortran, Pascal, Basic and Rexx, but Lotusscript (and VBA) seem completely alien to me.

Any assistance greatly appreciated. TIA!
 
You know I really don't know about that fancy smancy Lotus Script. But the following old Lotus macro commands using keystrokes and some simple advanced macro commands will get you the name of the range, provided there are no blank cells in this range, and there are no additional cells either below or to the right of the range with labels or numeric data in them.
/RNCdodo~{END}{D}{END}{R}~.
Now move your cellpointer with a macro command to the first cell where you want the data to be displayed and do:
{EDIT-COPY dodo}
{EDIT-PASTE}.
Done with 3 lines of code. I bet Lotus Script can't do that!!!!

Dan
 
I recommend appending the new data to your account database using {DATABASE-APPEND}. You can also just use {APPENDBELOW} or {APPENDRIGHT}.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top