Warning while downloading an Excel file from WD ABAP
Hi folks,
In one of requirements, Client wants to download all the data that is appearing on the screen ( WD ABAP Application ) to an Excel with a layout in different manner.
We achieved this with Simple Transformations.
Now the question is while downloading the excel file, the framework/other is throwing an Warning like
" The file you are trying to open, 'info.xls', is in a different format than specified by the extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? "
Note: All the users of my client are using MS Office 2002 / 2003.
I am using the following code........!
*------ Call Transformation for Excel OUTPUT
CALL TRANSFORMATION ZEXCEL_OUTPUT
SOURCE
t_dates = t_dates
t_info = t_info
RESULT XML l_xml_string.
REPLACE ALL OCCURRENCES OF '<?xml version="1.0" encoding="utf-16"?>' l_xml_string WITH '<?xml version="1.0"?><?mso-application progid="Excel.Sheet"?>'.
**-- Call Function Module for converting string data to XSTRING
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = l_xml_string
mimetype = 'application/xml'
IMPORTING
buffer = l_xml_xstring
EXCEPTIONS
failed = 1
OTHERS = 2.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'info.xml'
i_content = l_xml_xstring
i_mime_type = 'application/vnd.ms-excel'.
With this code I am generating a file of type XML SPREADSHEET 2003. While opening this file I am getting the above message which the user unwanted......
Can any one help me on this -
> How to avoid this warning?
Thanks and Regards,
Aneel Danda
Edited by: danda aneel on Jul 13, 2010 1:43 PM
Firstly, Thanks for Your quick Response, Thomas.
Even though what ever may be the file name I am passing either info.xml or Info.xls , In error info.xls is coming.
Kindly provide me an alternative on this XML doesn't seem like it would match the 'application/vnd.ms-excel'.
what is the supported format.?
Similarly, It is not considering the UTF-8 / UTF-16 for xml.........same result is appearing in the output.
Edited by: danda aneel on Jul 14, 2010 7:52 AM
Similar Messages
-
I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
Is this something that be done? If so, how?
I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
I can't figure out where to go from here... Any help would be apprecitated.
Thanks!Would you have the web address the excel sheet is on?
Is there a simular web page you could point to if not?
Would there be a copy of the file on an FTP page. This would be easier.
curl
http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
http://www.thegeekstuff.com/2012/04/curl-examples/
http://curl.haxx.se/docs/manpage.html
Macintosh-HD -> Applications -> Utilities -> Terminal
# Press return to run a command.
the curl is a terminal command ( Unix ). It allows you to read a file off of the web.
man curl
provides cryptic information on the commnad curl.
press the space bar to advance a page.
press letter to q to quit.
What you may have to is to read in the web page as a text file. Go "fishing" through the page to find the excel file you need. Once you find the file, you can use curl to read the file.
curl is a very full featured command. (read complex to figure out ).
It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log statement
2) Click on Run
For running shell commands see:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
set unixDesktopPath to POSIX path of desktopPath
log "unixDesktopPath = " & unixDesktopPath
set quotedUnixDesktopPath to quoted form of unixDesktopPath
log "quoted form is " & quotedUnixDesktopPath
try
set fromUnix to do shell script "ls -l " & quotedUnixDesktopPath
display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
on error errMsg
log "ls -l error..." & errMsg
end try
end run -
Download all excel files from sharepoint location to local folder
Hi,
How to I copy all excel files stored at sharepoint location to local folder?
Regards,
NidhiHi NidhiP,
To download Excel files from a SharePoint library by using SSIS, we need to make use of the Script Task. In the Script Task, we can use the methods provided by
Lists Web Service to work with SharePoint files, and then use the
WebClient.DownloadFile Method or
FileStream Class to transfer the files from SharePoint to local file system.
For the code examples, please refer to:
http://www.codeproject.com/Questions/457161/how-to-download-files-from-Sharepoint-document-lib?tab=mostrecent
http://blogs.msdn.com/b/sowmyancs/archive/2007/09/15/how-to-download-files-from-a-sharepoint-document-library-remotely-via-lists-asmx-webservice-sps-2003-moss-2007.aspx
http://sqlblogcasts.com/blogs/drjohn/archive/2007/11/04/downloading-excel-files-from-sharepoint-using-ssis.aspx
Regards,
Mike Yin
TechNet Community Support -
Error While reading an Excel file from KM Folder.
Hi Guru's,
In my PDK Application I am trying to read an Excel file from KM Folder.
Workbook workbook = Workbook.getWorkbook(new File("/irj/go/km/docs/documents/test/Test.xls"));
It gives an error:
Error:java.io.FileNotFoundException: \irj\go\km\docs\documents\test\Test.xls (The system cannot find the path specified)
Details of appli:
In my JspDynpage I am calling a utility Java file.
There I have to read an Excel and to passit to JSP.
Details of jar files used:
jxl-2.6
com.sap.security.api.jar
Regards,
RamHi,
You are trying to read file wrong way. In the tutorial of Java Excel Api: "JExcelApi can read an Excel spreadsheet from a file stored on the local filesystem or from some input stream.". You are trying to read from file system. So you must get file input stream then you can read it. Please search forums KM file read. -
Dump while downloading to excel file!!
Hi,
I'm getting a dump while downloading the ALV (Grid) report into an excel file.
When i inspected, the dump was - " Only character-type data objects are supported at the argument position "obj". In this particular case, the operand "obj" has the non-charcter-type type "P". "-
i'm having few currency values to be displayed.
Thought of an alternative my moving the values into char type field and to display it, but the values are getting rounded of.
Thanks in advance..
Any help would be suitably rewarded.
Kumar R.All the internal fields to be char type..if download functionality to be given..
if there is any issue in doing this...
create any another field in ur table(internal ) of type c length same like ur coressponding currency or quatity field....
move these fields into ur new char field and then prepare fieldcatlog on this..
hope this helps...
i handled like this only..
Praveen . -
Download to Excel file from ALV Grid
Hi,
I'm having a problem in downloading ALV Grid to excel file. The problem are the numbers are not in float format. I want them all in float format. Numbers in thousands are formatted with comma and decimals but numbers less than thousands are not in decimals.
Ex:
5 should be 5.00.
In ALV, this number is being displayed as 5.00 but when downloaded it displayed as 5 only.Did you mention the INTTYPE and Decimals in the fieldcatalog for those fields.
INTTYPE = 'P'.
DECIMALS_OUT = '3'.
try this..
also
use the Option
short cut CTRLSHFTF9 option
Local File->Spreadsheet-> and save it to excel file. -
How to download attachments excel file from gmail
hi,
i cant able to download attachments from gmail.com, ly i can able to view. can anyone explain how to download attachments from mail.
rgds
pravinYou can't download attachments with an email account via webmail access using a browser.
You can view attachments in a received email when accessing the account with the iPhone's Mail app and you can save photo attachments to the iPhone's Camera Roll and save PDF attachments to the iBooks app, but all other attachments such as a Word or Excel document can be viewed only. -
Field value is truncated while downloading to excel sheet from ALV report
Hi All,
I developed ALV report and displaying output.
In that output i had a filed VBRP-PRODH filed.
In the output it is coming correctly but while i click downlaod to excel the valus is truncted.
for Example the value for VBRP-PRODH is 03322764170100201
while downlaoding this one to excel it is showing 3322764170100200
Any inputs please..
Regards
JaiWrong forum..post in ABAP
-
How to Download a PDF file from Webdynpro ABAP Screen
Hi,
I have developed a input form in webdynpro - ABAP(Not Adobe),
As I am not using above services here, but would like to download the information I am capturing into a PDF file.
can I do it without using adobe interactive forms ?
thanks
SiddharthHi siddharth,
My suggestion would be to create your output as a Smartform and call your Smartform in your View.
For more Click this link.
[HOW TO DISPLAY A SMARTFORM AS PDF DOCUMENT IN WEB DYNPRO FOR ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]
Regards
Bulent -
Upload and download of excel file in the application server in background
Hi all,
i want to download the excel file from application server into internal table and after processing i have to upload to excel file in the application server in the background mode..
i mean i'll schedule the program in background.
im using FM ALSM_EXCEL_TO_INTERNAL_TABLE its working fine in fore ground but not in back ground.
what method i have to follow ?Hi Ankit,
I think this is not possible to open a Excel-File from the application server because the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and Office. But at the application server in background you doesn't have this OLE Connection.
In my opinion you have two possibilities:
1. Convert all files in the CSV format. This file format can be read with open dataset.
2. Upload the files from the presentation server in forground. There are some funktion modules in the standard which can read the xls format. But they have some limits regarding the length of cells content.
My recommendation is solution no. 1. If you know an VBA expert, he can write an Excel-macro which converts all Excel Files in the CSV-Fomat.
Regards
Dirk -
Exception while creating a excel file in BPM 10g
Hi,
We are facing following issue while creating an excel file from BPM.
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at fuegoblock.net.web.NewJspAjaxController.processMethodInvocation(NewJspAjaxController.java:264) at fuegoblock.net.web.NewJspAjaxController.service(NewJspAjaxController.java:46) at fuego.web.execution.servlet.ServletRedirector$ControllerRedirector.forward(ServletRedirector.java:197) at fuego.web.execution.servlet.ServletRedirector.redirect(ServletRedirector.java:58) at fuego.web.papi.TaskExecutor.processRedirect(TaskExecutor.java:224) at fuego.web.papi.TaskExecutor.execute(TaskExecutor.java:104) at fuego.workspace.servlet.ExecutorServlet.doAction(ExecutorServlet.java:117) at fuego.workspace.servlet.BaseServlet.doPost(BaseServlet.java:229) at fuego.workspace.servlet.BaseServlet.doGet(BaseServlet.java:220) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at fuego.workspace.servlet.AuthenticatedServlet.service(AuthenticatedServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at fuego.web.filter.SingleThreadPerSessionFilter.doFilter(SingleThreadPerSessionFilter.java:64) at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at fuego.web.filter.CharsetFilter.doFilter(CharsetFilter.java:48) at fuego.web.filter.BaseFilter.doFilter(BaseFilter.java:63) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook at xobject.Views.ReportingView.exportToExcel(ReportingView.xcdl:9) ... 35 more Caused by: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 36 more
There is a JSP file which invokes the method of BPM, which inturn creates a excel file.
In JSP we are calling the method in the following way:
function exportSelectedItemsToExcel(){
var url="<f:invokeUrl var='reportingView' methodName='exportToExcel'/>";
url = url + "&bpmRespContentType=application/vnd.ms-excel";
var windowHandle = window.open(url,'windowName','width=800, height=600, resizable=1, menubar=1');
POI jars are used to create the excel.
Also we recently did the migration and applied a patchset of 10.3.3 on 10.3.2. In the previous verison(10.3.2) it was working perfectly fine. When i am trying to test it on localstudio, it is generating the excel file properly.
Have any one faced any such issues while migration or any other time?Manifests are saved with the .mf file extension. Rename your manifest mainfest.mf.
-
User is not able to download specific excel file in sharepoint
Hi,
Could you please help?
thanks
srabonHi Srabon,
According to your description, my understanding is that you cannot download the excel file from SharePoint.
I recommend to check if the Download a Copy buttons can be used in the Excel web app and in the ribbon of the library.
If both the two buttons cannot work, I recommend to check the permission of the user on the excel file and check if the Information Rights Management is enabled in the library.
When Information Rights Management is enabled in the library and the user has only read permission on the document, then the file cannot be downloaded.
http://office.microsoft.com/en-in/sharepoint-help/apply-information-rights-management-to-a-list-or-library-HA102891460.aspx
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
I can't download PDF files or excel files from my email
Why I cannot download PDF or excel files from my email. I click on the attach but it does nothing at all
You are saying that files are not opened in the mail app when you are reading the email or the file does not open when you tap on the icon?
Try quitting the mail app and the launch it again. Try restarting the iPad as well.
To quit the mail app .... Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. -
Error while reading excel file from application server into internal table.
Hi experts,
My requirement is to read an excel file from application server into internal table.
Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
Now in my program I have used :
OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
DO.
READ DATASET v_filename INTO wa_tab.
The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
Error details:
A character set conversion is not possible.
At the conversion of a text from codepage '4110' to codepage '4103':
- a character was found that cannot be displayed in one of the two
codepages;
- or it was detected that this conversion is not supported
The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
would have produced incorrect data.
The number of characters that could not be displayed (and therefore not
be converted), is 445. If this number is 0, the second error case, as
mentioned above, has occurred.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
caught and
therefore caused a runtime error.
The reason for the exception is:
Characters are always displayed in only a certain codepage. Many
codepages only define a limited set of characters. If a text from a
codepage should be converted into another codepage, and if this text
contains characters that are not defined in one of the two codepages, a
conversion error occurs.
Moreover, a conversion error can occur if one of the needed codepages
'4110' or '4103' is not known to the system.
If the conversion error occurred at read or write of screen, the file
name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
Regards,
KarthikHi,
Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
As I think you are uploading the file in BIN format to Application server and trying to open text file.
Regards,
Umang Mehta -
Weblogic call a excel-file from URL doesn't open MSExcel but flat html
Weblogic call a excel-file from URL doesn't open MSExcel but flat html
Hi,
WLS 10.3.5
Forms 11.1.1.4
I do migrate from AS10g to WLS 10.3.5 / Forms 11
I get differences between FORMS 10 g / AS and FORMS 11 / WLS
when call an excel-file with web.showdocument
in 10g AS10g
the call
web.showdocumen('http://MyAS10_Server/myFormsMapping/myExcelfile.xls, _blank);
opens a Windows-Box
to decide
open with ( MSExcel )
or
download and save as File
in WLS 10.3.5 / FORMS 11.1.1.4
the call with webcache Port 8090 as well as Port OHS 8888
web.showdocumen('http://MyWLS_Server:8090/myFormsMapping/myExcelfile.xls, _blank);
opens promptly the excel-File into the Browser as html-Format
How to get the same way under WLS as before in AS 10g,
config OHS ?
regards
get answer here :
Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html
Edited by: astramare on Sep 12, 2011 11:59 AMWeblogic: when call a excelfile from URL doesn't open MSExcel but flat html
Maybe you are looking for
-
Hi there, I'm developing a multi-entity application and I'm not sure how to optimize the data base. Let say big tables for each entity will have 15000 rows per year and we are expecting at least 150 entities, so we are talking about 2250000 rows per
-
I was having a problem with an unbound item where if a user entered data into it and wanted to save, the save button on the menu was disabled. To get around this problem I created a post-change trigger for the unbound item where I used the set_menu_i
-
Westell DSL modem connects to WRT54GX2 SRX 200 with wire
I follow the instructions found on this site.. The first couple of times the procedure did not work. On the MODEM ( Westell) needed a manual reset. At that time the network starting working. A note needs to added to this instruction as stated ab
-
CN41 report with out values for project dates
Hi Experts The following field values are captured in Table PROJ. a. Finish Date PROJ-PLSEZ b. Forecast Start PROJ-SPROG c. Forecast Finish PROJ-EPROG But the report CN41/CN41N does not show values for these fields. Can anybody give clue to get this
-
how can I read code from a .java file and return whether it is compilable or if there are errors in the code?