Download list as Excel
Hello,
they made me recreate the ABAP-Reports as BSP pages and after some head aches I did it and the lists are displayed in the browser. Now they want me to offer the option of downloading the list as an Excel file.
I work with SUBMIT EXPORTING LIST TO MEMORY and then
1) CALL FUNCTION 'LIST_FROM_MEMORY'
2) CALL FUNCTION 'LIST_TO_ASCI'
3) CALL FUNCTION 'GUI_DOWNLOAD'
the problem ist LIST_TO_ASCI, because some how it cannot detect the printed list on the browser and returns the exception "list_index_invalid" or "CNTL_ERROR". It works perfect in ABAP but not in BSP.
Does some one of you have an idea on what to do or if there´s a better way to convert unreadable characters delivered by LIST_FROM_MEMORY as ASCII characters ??
Thanks in advance.
Hello,
your code works fine and I can open the Excel from my BSP, but I still have the main problem, that is, I´m not getting to read the displayed list. Reading the many postings in this forum, the following code should extract the texts:
neither
CALL METHOD runtime->server->response->get_data
RECEIVING
data = l_string.
nor
CALL METHOD runtime->server->response->get_cdata
RECEIVING
data = l_string.
seem to work with me.
"That'll open B.xls. This is rather the same as B.htm but with Excel save HTML and colouring. You might do an include of the common HTML."
You mean that B.XLS is a HTML page where I embed the Excel as object ??
Thanks
Similar Messages
-
Hi,
Help, please.
I’m trying to export a list to Excel and I’m getting this error: "unable to download owssvr.dll"
Thanks in advanced.Hi,
According to your post, my understanding is that you got the error "unable to download owssvr.dll" when exporting a list to Excel.
owssvr.dll is the module given by Microsoft to read the data from SharePoint Lists using remote procedure call.
You can find the OWSSVR.DLL in SharePoint 2010 Server Physical Path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI.
Please check whether it exists in SharePoint 2010 Server Physical Path.
Please check whether you export a list to Excel correctly.
Generally, the issue is caused by the brower. Please reset the IE to check whether it works.
In addition, you can repair the Office to check whether it works.
Here is a similar thread for your reference:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/5f471d53-e980-4acc-a6cb-7c8722571ec0/problem-with-export-to-spreadsheet?forum=sharepointgenerallegacy
More information:
SharePoint RPC Protocols Examples Using OWSSVR.DLL
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Hi Experts,
There is a requirement from user that "To explore the possibility of downloading the distribution lists
into excel for maintenance in t-code SO23 ".
Kindly provide your valuable informations/assistance in this regard.
Madhavan KThis Applesctipt will add comma's to the file count:
(Copy into Applescript Editor, and Save as File Format: App, then just click the App to run)
set x to choose folder with prompt "Choose Folder to Count Files" default location alias (the path to pictures folder as text)
set filecount to do shell script "find " & POSIX path of x & " ! -type d ! \\( -name \".*\" -or -name \"Icon*\" \\) | wc -l"
display dialog "File Count: " & comma_delimit(trim(filecount))
on trim(someText)
repeat until someText does not start with " "
set someText to text 2 thru -1 of someText
end repeat
repeat until someText does not end with " "
set someText to text 1 thru -2 of someText
end repeat
return someText
end trim
on comma_delimit(this_number)
set this_number to this_number as string
if this_number contains "E" then set this_number to number_to_text(this_number)
set the num_length to the length of this_number
set the this_number to (the reverse of every character of this_number) as string
set the new_num to ""
repeat with i from 1 to the num_length
if i is the num_length or (i mod 3) is not 0 then
set the new_num to (character i of this_number & the new_num) as string
else
set the new_num to ("," & character i of this_number & the new_num) as string
end if
end repeat
return the new_num
end comma_delimit -
Download bom from pull list in excel sheet.
please tell hw to download bom from pull list in excell sheet.
Hi,
try CS11/CS12/CS13 for downloading the BOM to the excel sheet.
Please check and revert.
Thanks,
Hrishi -
How to download the vendor list in Excel?
Hi,
How the vendor list (report RFKKVZ00) be easily downloaded in Excel?
Thank you.
Kind regards,
Lindahi Linda,
execute, and when the list is displayed, in the menu:
System / List / Save / Local file
Then select 'Table format' (or something like that)
Now enter file name with '.xls' at the end
the downloaded list won't be perfect, but more than nothing
hope this helps
ec -
hi all,
i have a situation, i want to download the data of an alv grid display to a excel sheet, is there any other way of doin it other than choosing from the List menu, coz when i click the excel sheet button on the application tool bar i get a blank excel sheet, do i need to pass any parameters ??? can any one plz gimme the funtionality of this.
thansk
anupamaHi,
I am giving u a sample code to download dat ato excel.
try to use it.
CONSTANTS:c_x(1) TYPE c VALUE'X',
lc_a(1) TYPE c VALUE 'A',
c_p2(2) TYPE c VALUE 'P2',
c_dir TYPE string VALUE 'C:\',
c_ext TYPE string VALUE 'XLS'.
DATA: fullpath TYPE string, "Full path of the file
filename TYPE string, "Name of the excel file
path TYPE string, "Path where the file will be stored
user_action TYPE i , "To catch User Action
l_title TYPE string. "To display title
* encoding TYPE abap_encoding.
l_title = 'Save File'(006).
* Open the save dialog
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = l_title
default_extension = c_ext
initial_directory = c_dir
CHANGING
filename = filename
path = path
fullpath = fullpath
user_action = user_action
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF.
** Check which button is pressed
IF user_action <> cl_gui_frontend_services=>action_ok.
MESSAGE i006. "Action Cancelled By User
EXIT.
ENDIF.
* Download error data collected from the internal table
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = fullpath
filetype = 'ASC'
write_field_separator = '#'
CHANGING
data_tab = gi_final "Your InterNal Table Name
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
* If selection is successful
IF sy-subrc EQ 0.
MESSAGE s004 . " File created successfully
ELSE.
MESSAGE i005 . " File is not created successfully
ENDIF. -
Set a particular column's Color when importing a list to Excel
Hi all,
I am displaying a list by using REUSE_ALV_LIST_DISPLAY.
It works fine.Now i import this List to Excel sheet by custom program to set the formatting part and for color prospect which is not working with standard Import functionality.I am using the Methods of Interface I_OI_SPREADSHEET.
Now my query is that how to set a particular column's Color ?
And how to set the width of a particular column ?
Suggess.
Points will be sured.
Thanks
Sanket sethicheck this
downloading my report output with the same color on my report to excel .
Download alv output to an excel file -
Authorization object to import mb51 detail list to excel
Dear all,
What is authorization object to import mb51 detail list to excel ?
Able to see report material document list,but export to local file is greyed out ?
JeyakanthanHi,
you can export ALV using menu option List -> Export -> Local file. Icon with green arrow which is usually used for download functionality in ALV has a different meaning in MB51. I know it's confusing. It's used to get full MM documents from archive. It's active only if you set option Short Documents in the section Data Source.
Cheers -
I cannot dowload all fields from ALV list to Excel - urgent, please help me
I developed a report and displayed in ALV list using FM 'REUSE_ALV_GRID_DISPLAY'.The list contains 200 fields.But when i am trying to download in EXCEL file from ALV list, it is unable to download all the fields from ALV list into EXCEL.
Thanks in advance,
Katta.is your list having packed decimals or any fields which are of large length (around 128 char)?
It can happen so. -
Download files in excel format
Hi,
Can anyone help me for downloading file in excel format? I have scheduled a job repeated everyday at a particular time, but it dumps a text file, NOT in excel format. My programme is an ALV.
Code snippet would be verymuch helpfull.
Thank,
Thushara.Hello Thushara,
here is a code i am giving you . It will take the data from a database , and download it into the excel format..
You just can customize this program to download the data from an ALV ....
Here is the sample code...
REPORT ZKUN_FILE4 .
TABLES: USR03,DD02L.
DATA: ZX030L LIKE X030L.
DATA BEGIN OF ZDFIES OCCURS 0.
INCLUDE STRUCTURE DFIES.
DATA END OF ZDFIES.
DATA: BEGIN OF FLDITAB OCCURS 0,
FLDNAME(11) TYPE C,
END OF FLDITAB.
DATA ITABUSR03 LIKE USR03 OCCURS 0 WITH HEADER LINE.
DATA TNAME LIKE DD02L-TABNAME.
SELECT * FROM USR03 INTO TABLE ITABUSR03.
TNAME = 'USR03'.
PERFORM GETFIELEDS.
PERFORM SHOW123.
FORM GETFIELEDS.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
LANGU = SY-LANGU
ONLY = SPACE
TABNAME = TNAME
WITHTEXT = 'X'
IMPORTING
HEADER = ZX030L
TABLES
FIELDTAB = ZDFIES
EXCEPTIONS
INTERNAL_ERROR = 01
NO_TEXTS_FOUND = 02
TABLE_HAS_NO_FIELDS = 03
TABLE_NOT_ACTIV = 04.
CASE SY-SUBRC.
WHEN 0.
LOOP AT ZDFIES.
FLDITAB-FLDNAME = ZDFIES-FIELDNAME.
APPEND FLDITAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
with SY-SUBRC.
ENDCASE.
ENDFORM.
FORM SHOW123.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'C:\USR03.XLS'
DATA_SHEET_NAME = 'USER LIST'
TABLES
DATA_TAB = ITABUSR03
FIELDNAMES = FLDITAB
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Hope this solves your problem.
Regards,
Kunal.
Note : Reward points if found useful. -
Directory API to download list of Business Components
Hi All,
I have requirement to download the Business Component list into an excel using Directory API using NWDS.I have followed william's blog, and able to download ICO and CC list in excel, however when I am trying the similar way to download Business components, the code is giving multiple errors.
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/10/12/using-pi-73-s-directory-api
If anyone has worked on this requirement, please help me with the pointers.
Thanks,
Ruchithese functions are available inside BusinessComponentIdentifierCollection.java.
This has getBusinessComponentID(). Try using this -
Download report into excel sheet
Hi
I have requirement like, in report output I want a button, if I press that button it has to ask where I have to save that output list in excel sheet format.
Plz help me out
Thanks in advance
Regards
RaoPls do like...
START-OF-SELECTION.
* Select and Process the data .
PERFORM select_and_process_data.
* Display Records.
PERFORM display_result.
* Set the pf-status and user command.
SET PF-STATUS '110_VAL'. " create yr button here
AT USER-COMMAND.
* Download result to spreadsheet.
PERFORM download_to_spreadsheet.
END-OF-SELECTION
FORM download_to_spreadsheet .
DATA:
l_filefilter TYPE string,
l_filename TYPE string,
l_path TYPE string,
l_fullpath TYPE string,
l_user_action TYPE i.
IF sy-ucomm = 'DLOAD'. " Button name (Function code)
l_filefilter = 'EXCEL Files (*.XLS)|*.XLS|Text Files (*.TXT)|*.TXT|All files (*.*)|*.*||'.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
file_filter = l_filefilter
default_extension = 'xls'
IMPORTING
filename = l_filename
path = l_path
fullpath = l_fullpath
user_action = l_user_action.
IF l_user_action = 1 OR l_user_action = 0.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_fullpath
filetype = 'ASC'
TABLES
data_tab = o_file
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSEIF l_user_action = 2.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
append = 'X'
filename = l_fullpath
filetype = 'ASC'
trunc_trailing_blanks = 'X'
TABLES
data_tab = o_file
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " download_to_spreadsheet
" Note : Give the path according yr requirement.
Regards,
RH -
Hi experts,
I used subtotals in ALV.first three columns I claculated based on the addition of individual column.In fourth column i calculated the value based on three calculated values ...It is not problem.
when i download this into excel file the original value is only coming .the calculated value i.e) calculated based on three values didnt get displayed in excel file..Help me please...
Thank u,
Manjula Devi.DHi.
I find that
List > Export > Spreadsheet
gives no subtotals, but
List > Export > Local File and then Spreadsheet
does give subtotals.
I find that
Views > Microsoft Excel
followed by
Save As
does give subtotals.
John -
Problem when we dowload spool list into excel.
Hello Gurus,
I have developed an custom report, The output contains 15 columns. When i run the report in foreground the output will be displayed in correct format also when i download the report list into excel(List->Save/Send->File) then the records will be downloaded in proper format(Each record under respective column heading).
But when the report is scheduled in background the spool list(SP01) is displayed in the proper format. But when I download this into excel(SppolRequest->Forward->SaveToLocal) . The excel data will be in improper format and all record value are not under respective column heading.
Can anyone advice me.
Thanks and regards,
VinodHi,
Use the FM 'EXCEL_OLE_STANDARD_DAT'.
In this FM populate the tables parameter 'fieldnames' to get each cloumn below the heading correctly. -
Hi all,
I am downloading data to excel by using OLE2 type pool in an ABAP program.
My requirement is to make some of the columns of the excel sheet bold.
is it possible? if so please guide me.
LOOP AT IT_FINAL1 INTO WA_FINAL1.
R_IND = 1 + R_IND.
INDEX = 1 + SY-TABIX .
CLEAR IND.
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE WA_FINAL1 TO <I_OUTPUT>.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
IND = SY-INDEX.
CALL METHOD OF SHEET 'Cells' = CELLS EXPORTING #1 = INDEX
#2 = IND. "1
SET PROPERTY OF CELLS 'Value' = <I_OUTPUT>.
ENDDO.
CALL METHOD OF APPLICATION 'Cells' = CELL1
EXPORTING #1 = 1
#2 = 7.
CALL METHOD OF APPLICATION 'Cells' = CELL2
EXPORTING
#1 = INDEX "down
#2 = 7. "across
ENDLOOP.
I have used the above code.
here 7th column, 10th column, 13th column has to be made bold and so on.
regards,
samarendra.
Edited by: samarendra penugonda on May 26, 2009 12:57 PMHello,
Check this standard program it is printing some values in bold.
RSDEMO01
Example
SET PROPERTY OF H_F 'Bold' = BOLD .
Maybe you are looking for
-
Adobe Reader 9 is not opening same files in Browser "Error in this Page"
Adobe Reader 9 is not opening same files in Browser "Error in this Page" If I try to open this pdf file manually then its works. The Error comes if I try to open Big Files or some else Files in the Browser. This Error was not comming with Adobe 8.
-
How to increase the max connections for business rules.
How and where to increase the connection to EAS.currently we have max connection as 20.Also please let me know,what is the maximum connection we can increase. In our system totally,we have 350 users are present. when more that 20 users running the bu
-
Does anyone know of any JNDI Viewer out there that could be used to view the JNDI Tree of one or many OC4J instances? Please don't say that there's one in the Enterprise Manager, or Mangler as we call it, as it isn't a runner for us to run the EM. We
-
Loudness Radar not working in Premiere Pro CC
Trying to Activate Loudness Radar in Premiere Pro CC for monitoring Master Level. I apply the effect in the Audio Track Mixer on the Master Fader and the parameters show up on the Master fader but there is no Radar Display. That window never shows up
-
Where are my songs/playlists?
I recently bought a Mac Air and had my old Mac Itunes, documents etc. transferred to my new Mac. I can't find my songs or playlists, just a "quick look" which plays a snippet. My account shows that I have purchased the songs. By fluke, I did find the