Home » SQL & PL/SQL » SQL & PL/SQL » All values getting populated in one cell in Excel file
All values getting populated in one cell in Excel file [message #427918] Mon, 26 October 2009 06:47 Go to next message
abhishek_510
Messages: 24
Registered: October 2009
Junior Member
hi....i have created a procedure which prints data in excel file(.xls) through utl_file. The problem is all data are coming in one cell. How to print ecah cell with one value?? here is my code...
l_report_name := 'MHEJTF_TERR_W_MULTIPLE_RESOURCE_'||l_date||'.xls';
--l_header :=
l_file_name := utl_file.fopen('/usr/tmp',l_report_name,'W',2430);
FOR r_last_five_days in c_last_five_days LOOP
UTL_FILE.put_line(l_file_name,r_last_five_days.person_id
--l_string := r_last_five_days.person_id
||r_last_five_days.full_name
||r_last_five_days.effective_start_date
||r_last_five_days.business_group_id
||r_last_five_days.person_type_id
||r_last_five_days.start_date
||r_last_five_days.creation_date
||r_last_five_days.title
||r_last_five_days.entered_by
||r_last_five_days.party_number
||r_last_five_days.party_name
||r_last_five_days.created_date
||r_last_five_days.orig_system_reference
||r_last_five_days.party_type
||'/n');

END LOOP;
UTL_FILE.fclose(l_file_name);
END IF;

Re: All values getting populated in one cell in Excel file [message #427920 is a reply to message #427918] Mon, 26 October 2009 06:52 Go to previous messageGo to next message
cookiemonster
Messages: 12409
Registered: September 2008
Location: Rainy Manchester
Senior Member
Create a csv instead of a xsls and put commas between each column value.
Re: All values getting populated in one cell in Excel file [message #427929 is a reply to message #427918] Mon, 26 October 2009 07:58 Go to previous message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There are many solutions on Google, here, on AskTom, just search for them.

Regards
Michel
Previous Topic: shedule job is not working
Next Topic: Insert into table & then sort the colum value
Goto Forum:
  


Current Time: Tue Dec 06 12:29:06 CST 2016

Total time taken to generate the page: 0.15268 seconds