[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: question: format an excel file (.xls) inside sqr program



How do you tell Excel to import a column as text with this approach? For
example, if SSN is to appear in the Excel file, and someone's SSN begins with
zero, how does Excel know that it is not to truncate the leading zero?





"Bohan, Kathy" <Kathy.Bohan@FMR.COM> on 01/08/2001 11:13:16 AM

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:    (bcc: Rodney Wright/Trcb/Rouse)

Subject:  Re: question:  format an excel file (.xls) inside sqr program



This is how I create excel files from within an SQR:

Begin-Program
 Let $_file ='c:\pen_earnings.xls'
 Open $_file as 10 for-writing record=32767:vary

    Do Main

 Close 10
End-Program

Begin-Procedure Main
Begin-Select
 encode '<009>' into $sep    !<tab>

fbpe.earn_q  &cy_pen_earn
 let #cy_pen_earn = #cy_pen_earn + &cy_pen_earn
 move #cy_pen_earn to $cy_pen_earn 99999999.99

 string $ssn $cy_pen_earn by $sep into $text
   write 10 from $text

>From  dbo.t_fbpe_part_earn fbpe
Where fbpe.clnt_id_n = 716362
 AND  fbpe.pay_prd_end_d between '01/01/2000' and '12/31/2000'
 AND  fbpe.earn_type_c = 'PEN'
 AND  fbpe.rec_upd_type_c <> 'D'

End-Select
End-Procedure



> -----Original Message-----
> From: Lambert, Jin [SMTP:JLambert@HRBLOCK.COM]
> Sent: Monday, January 08, 2001 10:32 AM
> To:   SQR-USERS@list.iex.net
> Subject:      question:  format an excel file (.xls) inside sqr program
>
> I have a question and hope some of you have accomplished such and can
> share
> your knowledge with me...
>
> We are developing a SQR program, which, generates a report for the end
> users.  We proposed the report be formatted as .csv file so the user can
> open it as an excel.  However the users insist that they want the excel
> file
> format (.xls) instead of .csv file format.  Is there anyway such request
> can
> be accomplished via a SQR program?
>
> Jin Lambert
> PeopleSoft Financial Team
> H&R Block
> voice:       (816) 932-7529
> fax:          (603) 687-4815
> e-mail:      JLambert@hrblock.com