Filling letter fields by incrementing and retrieving info from Excel cells

User-to-User discussion about the PhraseExpress macro programming.
Post Reply
Ted
Posts: 2
Joined: 22 Nov 19, 18:28

Filling letter fields by incrementing and retrieving info from Excel cells

Post by Ted » 23 Nov 19, 01:48

Hello, I am trying to create letters in Google Docs by grabbing information from a list I have in Excel with tenant names, addresses, and inspection dates. I am able to create a loop to print out the letters but I am not successfully pulling the data from Excel for some reason. Depending on how I set up the formulas I am either getting a letter with a single rows information, or no information except the letter. Here are the relevant phrases (I've shortened and changed some insignificant data to protect my privacy:

Code: Select all

(*{#settemp -name spec_inspections -content C:\Documents\Google Drive\file...Inspections.xslx -variablename specify_worksheet}*)
*){#forminput -text Number of Entries/Rows: -type 0 -def  -embeddata JVslUEVYX0VNQkVEX1BBUkFNUyVdJXsjc2V0dGVtcCAtbmFtZSBudW1iZXJfb2Zfcm93cyAtY29udGVudCAlWyV2YWx1ZSVdJX0= -variablename input_number_of_rows}(*
*){#forminput -text Created By: -type 0 -def  -embeddata JVslUEVYX0VNQkVEX1BBUkFNUyVdJXsjc2V0dGVtcCAtbmFtZSBjcmVhdGVkX2J5IC1jb250ZW50ICVbJXZhbHVlJV0lfQ== -variablename input_created_by}(*
*){#set -name row -content 1 -variablename set_initial_row_value}(*
*){#loop {#set -name row -content {#calc {#gettemp row -variablename row}+1 -variablename increment_row} -variablename increment_row}(*
*){#xls -col 4 -row {#gettemp row -variablename row} -endcol 4 -file {#gettemp spec_inspections -variablename spec_inspections} -sheet 4 -colseparator ,  -embeddata JVslUEVYX0VNQkVEX1BBUkFNUyVdJXsjc2V0dGVtcCAtbmFtZSB0ZW5hbnRfbmFtZSAtY29udGVudCAlWyV2YWx1ZSVdJX0= -variablename set_tenant_name}(*
*){#xls -col 5 -row {#gettemp row -variablename row} -endcol 5 -file {#gettemp spec_inspections -variablename spec_inspections} -sheet 4 -colseparator ,  -variablename set_unit_address}(*
*){#xls -col 3 -row {#gettemp row -variablename row} -endcol 3 -file {#gettemp spec_inspections -variablename spec_inspections} -sheet 4 -colseparator ,  -embeddata JVslUEVYX0VNQkVEX1BBUkFNUyVdJXsjc2V0dGVtcCAtbmFtZSBkYXRlIC1jb250ZW50ICVbJXZhbHVlJV0lfQ== -variablename set_inspection_date}(*
*){#insert -id 510D5A29-C8F7-4960-B3AF-60EAA0A22F43|113732 -variablename insert_letter} -count {#gettemp number_of_rows -variablename number_of_rows} -variablename loop}
and the letter:

Code: Select all


48-Hour Notice of Intent to Enter Premises


{#gettemp tenant_name -variablename tenant_name}
{#gettemp unit_address -variablename unit_address}

Re: Smoke detector inspection


Dear Resident,

Please be advised that the Owner/Agent or employee of Agent will enter above listed premises on or about {#gettemp date -variablename date} during normal business hours to inspect the smoke detectors in your unit. This inspection is mandated by CA law. We strongly prefer that someone be present at the time of this inspection. This notice serves as a 48 hour notice of entry.

If you have any questions regarding the above mentioned, please contact me@my-email.com or call the office at (phone number).


Sincerely,

My Company
By: {#gettemp created_by -variablename created_by}
Agent for Owner
Please let me know if there is any other information I can provide and thank you in advance to anyone who reads or helps.

Post Reply