How to display .doc/.xls file uploaded using blob type of column in table.
Hi,
Here
http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
I learnt about uploading & viewing file through BLOB in a form or report . It works fine for pictures & notepad file. But when i upload word file (i.e. *.doc) or excel file ( *.xls ) , and try to view it through DOWNLOAD
it gives message box
' Do you want to save this file, or find program online to open it?'
I searched lot but enable to find proper & easy to understand solution.
Hope understand my problem.
Thanks in advance.
Hi,
I am using table emp having fields id,name,,,,,,,,,photo,mimetype,filename,last_update_date.
photo is of type BLOB. I updated photo (text item) on form.
I Used BLOB DOWNLOAD Format Mask with appropriate entries & selected display as Attachment.
So my problem is partially solved. Now if DOWNLOAD link on Form is clicked it displays Excel sheet
in different window. But still, DOWNLOAD link on my Interactive report not working properly.
DOWLOAD on interactive if it is clicked it has two problems
1) It opens image or notepad file in same window.
2) Not able to open Excel sheet.
thanks for reply.
Similar Messages
-
How to open DOC/XLS files using UIWebView on iPhone 3.0?
Hi,
I am using the following code to display doc/xlst files on UIWebView. It's surprised that I can get the content of the file but cannot show in WebView.
NSData *myData = [NSData dataWithContentsOfFile: fileDesPath];
NSString *ext = [m_openFiles.fileExtension lowercaseString];
NSString *mimeType;
if ([ext isEqualToString:@"doc"]) {
mimeType = @"application/msword";
}else if([ext isEqualToString:@"xls"]){
mimeType = @"application/vnd.ms-excel";
}else if([ext isEqualToString:@"wma"]){
mimeType = @"audio/x-ms-wma";
}else if([ext isEqualToString:@"jpg"] || [ext isEqualToString:@"jpeg"]){
mimeType = @"image/jpeg";
}else if([ext isEqualToString:@"tif"]||[ext isEqualToString:@"tiff"]){
mimeType = @"image/tiff";
}else if([ext isEqualToString:@"htm"]||[ext isEqualToString:@"html"]){
mimeType = @"text/html";
}else if([ext isEqualToString:@"mov"]){
mimeType = @"video/quicktime";
}else if([ext isEqualToString:@"mp4"]){
mimeType = @"video/mp4";
}else if([ext isEqualToString:@"txt"]){
mimeType = @"text/plain";
}else{
mimeType = [NSString stringWithFormat:@"application/%@", ext]; //pdf
NSLog(mimeType);
//Here, I can get the myData. The value is the content of the doc file.
if (myData) {
[self.myWebView loadData:myData MIMEType:mimeType textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:fileDesPath]];
After loadData, it cannot show anything in webview!
Can someone help me in this matter?
Thanks,
Message was edited by: Small AppleHi Maurício -
For your future reference and for the information of everyone who comes across this post in the future:
We host all of our DataPlugins on our website at ni.com/dataplugins. There are hundreds of file formats supported through the available DataPlugins, and there is also a link on that site where you can request a DataPlugin be written for file formats that aren't currently supported (such as custom *.CSV files).
Derrick S.
Product Manager
NI DIAdem
National Instruments -
How to display .doc .xls .ppt in WLS 6.1
Dear friends:
My WebLogic version is 6.1. I put the Word document (a.doc)
under the document root directory (/applications/DefaultWebApp).
I try to invoke this file using IE or Netscape.
--> http://localhost/a.doc
It always displays some error ascii character. I try it under
WLS 5.1, it's okay.
Could you please let me know to to config the WLS 6.1 mimetype,
or is it a bug of 6.1?
Thanks in advance,
DamonAccording to BEA, if you edit
/applications/DefaultWebApp/WEB-INF/web.xml and add the following
lines(the example is for Excel), it is supposed to work for the URL
for the default server.
<mime-mapping>
<extension>xls</extension>
<mime-type>application/msexcel</mime-type>
</mime-mapping>
But it still does not work. I suspect it is a bug with WLWS 6.1
Jairam
"Damon Yang" <[email protected]> wrote in message news:<3c1e6500$[email protected]>...
Dear friends:
My WebLogic version is 6.1. I put the Word document (a.doc)
under the document root directory (/applications/DefaultWebApp).
I try to invoke this file using IE or Netscape.
--> http://localhost/a.doc
It always displays some error ascii character. I try it under
WLS 5.1, it's okay.
Could you please let me know to to config the WLS 6.1 mimetype,
or is it a bug of 6.1?
Thanks in advance,
Damon -
File uploads using servlets to oracle8i database
Hi,
Help please, How I can a File Upload using BLOB's into the oracle database, any sugestions...
Thanks
Moacyr
[email protected]Try the jason hunter book Java Servlet Programming for a very good description or the web site hosted by o'reilly
www.servlets.com
Has a very neat java class for decoding multipart mime encoded files (the upload stream from the browser). Seems to accomodate most of the differing browsers intretation of the standard.
Note to Oracle: This should really be handled by the servlet engine as an Oracle extension. Where the servlet engine strips the mime encoding out before the servlet is called placing the decoded file in an associated extension call. ie: cast the request to an Oracle request object which has file uploaded method. -
How to display Doc file format in the JEditPane?
At this time , JEditPane supports RTF and HTML file format ,but
Could anyone tell me how to display DOC file format using JEditPane
or other JTextComponents?
Thx a lot!
CatonHi,
there is no support for doc files (M$ Word?) in Java. You would have to create your own classes for that eventually subclassing JEditorPane, EditorKit, Document etc. As well you'd need your own reader for the doc format.
The problem I see with that however is that there is nothing such as thedoc file format. Microsoft just saves anything produced by MS Word into files ending with .doc. But, if there is anything such as a .doc file format, it changes more often than the weather in April.
Ulrich -
Store and Display doc/pdf files in the database using Forms
Hi all,
How can i store and display doc/pdf files in the database using Forms 10g?.
ArifHow to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
Solution
Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
here are steps to get a small test form running, using WebUtil 1.06.
Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
Feel free to copy this note to a text editor, and do a global find/replace on
[OraHome] with your actual value (no trailing slash). Then it is easy to
copy/paste actual commands to be executed from the note copy.
1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
2) Copy or move jacob.jar and jacob.dll
[JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
cd [JacobStage]
copy jacob.jar [OraHome]\forms\java\.
copy jacob.dll [OraHome]\forms\webutil\.
The Jacob staging area is no longer needed, and may be deleted.
3) Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt.
Add [OraHome]\jdk\bin to the PATH:
set PATH=[OraHome]\jdk\bin;%PATH%
Sign the files, and check the output for success:
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
you may skip this step. Otherwise,
Create a schema to hold the WebUtil stored code, and privileges needed to
connect and create a stored package. Schema name "WEBUTIL" is recommended
for no reason other than consistency over the user base.
Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
out the EXIT statement, to be able to see whether the objects were created witout
errors.
Start SQL*Plus as SYSTEM, and issue:
CREATE USER webutil IDENTIFIED BY [password]
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
CONNECT webutil/[password]@[connectstring]
@[OraHome]\forms\create_webutil_db.sql
-- Inspect SQL*Plus output for errors, and then
CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
Reconnect as SYSTEM, and issue:
grant execute on webutil_db to public;
5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
to the CLASSPATH entry.
6) Start the OC4J instance
7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
It is important to generate the PLX, to avoid the FRM-40039 discussed in
Note 303682.1
If the PLX is not generated, the Webutil.pll library would have to be attached with
full path information to all forms wishing to use WebUtil. This is NOT recommended.
8) Create a new FMB.
Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
There is no need to Subclass the WebutilConfig object.
Attach the Webutil.pll Library, and remove the path.
Add an ON-LOGON trigger with the code
NULL;
to avoid having to connect to an RDBMS (optional).
Create a new button on a new canvas, with the code
show_webutil_information (TRUE);
in a WHEN-BUTTON-PRESSED trigger.
Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
the "Application Server URL" is empty.
Then append "?config=webutil" at the end, so you end up with a URL of the form
http://server:port/forms/frmservlet?config=webutil
10) Run your form.sarah -
Problem downloading .doc, .xls file using servlet
i have a servlet which downloads the files to client(browser). It works file for .txt file but .doc, .xls files are opend but they contain garbage.
plz letr me know if u know problem!!!!!
-amitProbably because you output them using the Writer you got from getWriter instead of using the OutputStream you can get from getOutputStream.
-
How to convert an .xls file to .csv file using procedure or function
Hi All,
My requirement is as follows.
1. In my database server(linux), my excel file will be loaded in a particular directory.
2. I need to load this excel file's data into an external table.
3. Can i load the data from an excel file to table directly? Or do i have to change the format into .csv, if so how to conver the .xls file to .csv file via backend.
Please help me.
Regards,
Sakthi.Have a look at this
PLSQL UTL_FILE problem
http://kr.forums.oracle.com/forums/thread.jspa?threadID=895803
Regards,
Yohanes 林贤汉 -
Checking PDF/DOC/XLS files for passwords
Folks
Wondering if anyone can shed any light on how to check PDF/DOC/XLS files passwords?
I'm not trying to crack the password, I'm writing a program where people are uploading files, but I don't want people submitting files that require passwords to open them.
Tomshashi_rajak wrote:
Open Source PDF Libraries in Java
http://java-source.net/open-source/pdf-libraries
use any one of library given in the above page. then try to read the pdf file . if you are able to read then it is not password protected .Or invalid, or too new, or has other featues that those libraries might not support. -
Cannot receive .doc & .xls files
I have searched the board, and read that a number of owners receive doc & xls files with no problems. I do receive the e-mail sent to my iPhone, but when it tries to display the file, it always states ( This message has no content ). I use embarqmail, and nothing is blocked. I do receive the attached files in my regular e-mail. They are short, xls = 56K, doc = 19K. Have tried many times, with different files. Any help will be greatly appreciated. Thanks Guy
what i have found is just that the edge data network is slow to actually download the attachment with the email... the email text comes in quickly but the attachment may take several minutes to actually download and show up...i have found that when i get and attachment i go into my inbox and just let it sit there for several minutes until the paperclip icon shows, then go into the email and the attachment should beavailable, if you go into the email before edge has downloaded it you might not ever get it on the phone... best to just wait until its there for sure...i have had to wait up to 30 minutes for the attachment to show after i received the email...hope this helps
-
How to display a pdf file in jsp
hi,
How to display a pdf file in jsp iam having a class which will return fileinputstream of the file object. the pdf file is in server.
regards
ArulA JSP is a combo of HTML and Java, so you can't really "display" a PDF file in a JSP.
You can provider a href link to the PDF file in your JSP.
You can use some utility package to read the contents of the PDF, pull certain things out of it, and display that in your JSP as html
In a servlet you can set the content type to application/pdf and write the binary data of the PDF back to the browser. Once the browser finishes reading in the data it should open the PDF. -
I am a new servlet programmer.......
iam using tomcat server......
can any one pls help in writing code for file upload using servlets and jsp without using multipart class or any other class like that....
Please URGENT..Slow down! "Urgent" is from your perspective alone. I, myself, am not troubled or worried in the least.
hi ugniss
thanks for ur reply....sorry i was not
y i was not asked not to use multipart class or any
other class like that...is there any other
possibility to do file uploading from jsp to
servlet...
Just as an aside, a JSP is a Servlet. But even if I move beyond that, the question does not make sense. If you want a "JSP to upload to a Servlet", then simply do so in memory. You are still (likely) within the same scope of a given request. However, if instead you are referring to a JSP that is displayed on a browser, then really you are talking about HTML, which is what the browser will receive. And since you are now talking about a browser, your only real, viable option is a multi-part file upload. So, it is either server or it is browser. And either way, the question leads to very established options, as outlined above.
the main concept is.. in the browser the user selects
a particular file and clicks the button upload..after
clicking upload the jsp should sent the file to the
servlet in streams...there the servlet gets in and
saves in a server location........this is wat i hav
to do...
Okay. So, after reading my previous (redundant) paragraph, we have arrived at the crux of the issue. You have a JSP that will be output as HTML to a client (browser) which you want to upload content to your server (handled by a Servlet). So, you are now stuck again with multi-part. The requirement to not use multi-part is non-sensical. You can overcome it, say, if you write your own applet or standalone Swing client. However, if your users are invoking this functionality from a browser, you are limited by the options that W3C has provided you. Use multi-part.
is there aby possibilty to do this.....can any one
pls help....Take the advice to download and review Jakarta Commons FileUpload. Inform your management that their requirement makes no technical sense. Research on your own. There are dozens of examples (and tutorials) on file upload using multi-part. Embrace it. Live it. Love it.
- Saish -
Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
I have attached the VI.
Thanks for the help
Attachments:
new_control_and_acquisition_program.vi 946 KBTake a look at this document that discusses how to monitor IMAQ memory usage:
http://digital.ni.com/public.nsf/websearch/8C6E405861C60DE786256DB400755957
Hope this helps -
Julie -
Hi Experts,
How can i get a file header using this method cl_gui_frontend_services=>gui_download
Thanks
BasuHi,
You can use the FM - GUI_DOWNLOAD to specify the headers. It can be done in the following manner -
TYPES: BEGIN OF ty_head, "Structure for header
h(10) TYPE c,
END OF ty_head.
DATA: it_head TYPE TABLE OF ty_head WITH HEADER LINE.
"Adding header details
it_head-h = 'Field1'.
APPEND it_head.
it_head-h = 'Field2'.
APPEND it_head.
it_head-h = 'Field3'.
APPEND it_head.
it_head-h = 'Field4'.
APPEND it_head.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = p_file
filetype = 'ASC'
write_field_separator = 'X'
header = '00' "<= note this
TABLES
data_tab = it_tab
fieldnames = it_head[] "<= Pass your header table here
EXCEPTIONS
OTHERS = 1.
Hope this helps.
Regards,
Himanshu -
Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
I have attached the VI.
Thanks for the help
Attachments:
new_control_and_acquisition_program.vi 946 KBgot these vi's off ni site a while ago - see if they help
Attachments:
Memory_Monitor.zip 132 KB
Maybe you are looking for
-
It was a triangle button that provided a drop-down menu of my most recent navigation history within a site. Very convenient, esp for slide shows if I wanted to return to a slide that was 10-12 slides back.
-
Paying For 30Mbs, But Only Getting 2Mbs
Hi Apple Discussions I Have A Problem (I Think) With My Airport Extreme 802.11n, Right Now I Have Optimum Online Running At 30Mbs Download & 5Mbs Upload. But The Settings On The Airport Router Is Only Let Me Push Out 2Mbs, Then I Tried To Set It On 8
-
Start MacBook retina with external drive
how can I start a MacBook retina with an external drive? I'm trying to trying to use a clone of my system with Mavericks to run the Mac so that I do a clean install of Yosemite. Holding Option key while starting doesn't give me the external drive to
-
.properties and jar file
Anyone, Is there a way to separate my .properties files from the jar. Everytime we want to make a simple text change we need to redeploy a new jar. I've tried taking the .properties files out of the jar and placing them in the class path, but I get t
-
Mobile email 4.0 and LG Dare
Hello, Was excited to see the improvements to Mobile email 4.0. I have an LG Dare and was wondering if it will utilize this new version as well as the currently available feature phones? Thanks.