[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



Hi Bob,

Thanks a lot for your immediate help and it's works
fine.

Thank you once again.

Regards

Jinesh Shah

--- Bob Stone <bstone@fastenal.com> wrote:

> I find the easiest thing to do is pretend it's a tab
> delimited text file
> that just happens to have a '.xls' at the end.  it
> will open it up, see the
> tabs, and assume those are cell spacings.  So, TAB
> ...like this: 
> 
> encode <009> into $tab
> let $s = $eqnum || $tab || $desc
> write 1 from $s
> 
> There's a lot you can do with Excel reports as far
> as formatting goes...but
> your best bet on all of that is to look in the
> SQR-User guide archive pages.
> http://www.sqrug.org/sqr-users/ There's been
> numerous discussions about it.
> 
> Bob
> 
> 
> -----Original Message-----
> From:
> sqr-users-bounces+bstone=fastenal.com@sqrug.org
>
[mailto:sqr-users-bounces+bstone=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
> 



                
____________________________________________________ 
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