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

RE: [sqr-users] Export SQR Report Data to Excel File - Problem inpopulating data in different Cells



If you need to create Excel files that contain formatting take a look at
this on Ray's site.  We've used this code at Fastenal Company for several
years to create Excel files.

http://www.ontko.com/sqr/sylk.html

-----Original Message-----
From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of
Jinesh Shah
Sent: Wednesday, June 22, 2005 2:38 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Export SQR Report Data to Excel File - Problem in
populating data in different Cells


Hi All,

Any one could help me to create a SQR report, which
will generate a report with the data to be exported in
the Excel sheet. 

Here I could able to Create Excel sheet by using ,

OPEN , CLOSE and WRITE function of SQR Language.
But could not able to write differen fields value in
separate cells in the excel sheet. Is there any
delimiter, I need to used beetween two values ?

Following Code I have used in my SQR :
*****************************************
BEGIN-PROCEDURE CREATE_EXCEL

OPEN 'C:\EQUIP_LIST.xls'  as 1  for-writing
record=1000:vary status=#filestat

IF #filestat != 0 

   PRINT  'Unable to Create EQUIP_LIST.xls file on
C:\' (+1,1)
 
END-IF

END-PROCEDURE

*****************************************
BEGIN-SELECT

eqnum           &eqnum
description     &description

    PRINT  &eqnum                       (+1, {Col1})
        PRINT  &description             (  , {Col2})

    LET $eqnum = &eqnum
    LET $desc = &description

    LET $s = $eqnum || ';' ||$desc

    !WRITE 1 FROM $eqnum $desc

    WRITE 1 FROM $s

    LET #rows_selected = #rows_selected + 1
        
        from [$schema]equipment
        where [$where] and rownum < 100
        order by 1
        
END-SELECT
*******************************************

Thanks in advance.

Regards

Jinesh Shah







                
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users