Jan If the worksheet is to be listed by row and not column
Company Name Attention Line Address Billing You may want to create a temporary table with 3 columns TableIDNumber - INTEGER Autonum SomeColumnName TEXT (75) BuisnessCat - TEXT (25) Insert information for the company INSERT INTO tableName (SomeColumnName,BuisnessCat) VALUES .vCompanyName, .vBuisnessCat INSERT INTO tableName (SomeColumnName,BuisnessCat) VALUES .vattn, .vBuisnessCat Test the address to see what you want to insert. INSERT INTO tableName (SomeColumnName,BuisnessCat) VALUES .vadd, .vBuisnessCat If you want a blank row between companys then insert a blank line INSERT INTO tableName (SomeColumnName,BuisnessCat) VALUES NULL .vBuisnessCat DELETE filename.xls GATEWAY EXPORT XLSW filename.xls SEL SomColumnName FROM tableName ORDER BY BuisnessCat, TableIDNumber + OPTION BLANK_IF_ZERO ON|TAB_NAME WhatEver|COL_NAMES ON|SHOW_PROGRESS ON Buddy From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Barley Sent: Monday, November 03, 2008 2:06 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Printing to Excel File Hmmm... I use Arial 10 as my default font. All fields are left aligned. I ended up using one field (Variable memo) to hold all the info I need. I use a (char(10)) to seperate each line I need to create. Do I also need to LJS them? Here's my list of variables: 1 : TEXT : D : vattn = (ifgt((slen(attn)),1,(attn+(char(10))+addr1+(char(10))),(addr1+(char(10) )))) 2 : TEXT : D : vadd = (.vattn+(ifexists(addr2,(addr2+(char(10))+csz),(csz)))) 3 : TEXT : D : vbcsz = (ifgt((slen(bcsz)),1,((char(10))+bcsz),' ')) 4 : TEXT : D : vbadd = ((ifgt((slen(baddr1)),1,((char(10))+baddr1),' '))+(ifgt((slen(baddr2)),1,((char(10))+.vbcsz),.vbcsz))) 5 : TEXT : D : vem = (ifgt((slen(email)),1,((char(10))+email),email)) 6 : TEXT : D : vws = (ifgt((slen(website)),1,((char(10))+website),website)) 7 : TEXT : D : vphone = (ifgt((slen(phone)),1,((char(10))+phone),phone)) 8 : TEXT : D : vfax = (ifgt((slen(fax)),1,((char(10))+fax),fax)) 9 : TEXT : D : vaddress = (.vadd+(ifgt((slen(.vbadd)),1,.vbadd,' '))+(ifgt((slen(.vphone)),1,.vphone,' '))+(ifgt((slen(.vfax)),1,.vfax,' '))+(ifgt((slen(.vem)),1,.vem,' '))+(ifgt((slen(.vws)),1,.vws,' '))) I had to check to see if the field was longer than 1 char because it counts the space. On the report, the only field I use is the vaddress. I had to put the (char(10)) before the next field or I would get a space, then the field. I cannot simply export the data as I need to sort it by business category and don't want the business category to show for each business. Also, I don't know how to manipulate the Excel - if I click to Open after Generate, it creates a new worksheet! I have tried this in both my Excel 2002 and Excel 2007 and get the same results! Also am using the latest build for 7.6. This is so strange! The Excel drops different fields each time : the first record dropped the contact name and email the second record dropped the phone number the third record dropped the address the fourth record dropped the FAX the fifth record dropped the street address the sixth record dropped the city Jan

