[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 - Probleminpopulating data in different Cells
- Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Probleminpopulating data in different Cells
- From: Jinesh Shah <jinesh_78in@yahoo.com>
- Date: Thu, 23 Jun 2005 08:21:56 -0700 (PDT)
- Delivery-date: Thu, 23 Jun 2005 10:25:26 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;b=F2Z57+JqFdRZ+0je9YTfQHoacmJkzjtZs9zLcPLcnqoGzy68QKguGioIhZ57dE0QDycQzbiDRtEE5N0rtfEgdXXr47WpjS26xO63UXw4W7lLXAQuqbIuqUh88FqL8LKR2kRvGW3Ia5nMtaekb1867AMVKme2nbovSRujtGKSvts=;
- In-reply-to: <F21043E4D7DE6E419F956791AEEDEA5DE977B3@corpex03.navigant.com>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Hi Lance,
Thanks for the details. It's working fine now.
Regards
Jinesh Shah
--- Lance Munger <Lance.Munger@TQ3Navigant.com> wrote:
> First declare the file name in your begin-program.
>
> let $file_name = 'FareBasisSumm.xls'
> open $file_name as 1 for-writing record=3000:vary
> status=#file_status_out
> encode '<009>' into $delimiter
>
> and then in your print detail string it together and
> write out the
> records as you print.
>
> ! excel output begin
> string $curr_cust_name &passenger_name &ticket_num
> &invoice_num
> $issue_date $departure_date $adv_purch_days
> &validating_airline
> &class &trip_routing $ticket_amount
> $normal_coach_fare $savings
> $low_fare $Potential_Savings &code_description
> by $delimiter into $record
> write 1 from $record
> ! excel output end
>
> Hope this helps!
>
> Lance D. Munger
> RF4 Developer
> 303.925.3120 office
> 720.364.4721 mobile
>
> -----Original Message-----
> From:
>
sqr-users-bounces+lance.munger=tq3navigant.com@sqrug.org
>
[mailto:sqr-users-bounces+lance.munger=tq3navigant.com@sqrug.org]
> On
> Behalf Of Bob Stone
> Sent: Wednesday, June 22, 2005 1:50 PM
> To: 'This list is for discussion about the SQR
> database reporting
> languagefrom Hyperion Solutions.'
> Subject: RE: [sqr-users] Export SQR Report Data to
> Excel File - Problem
> inpopulating data in different Cells
>
> 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
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
__________________________________
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news and more. Check it out!
http://discover.yahoo.com/mobile.html
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users