Writing MS Word Document from PL/SQL

Hi,
I have an application which writes the data into EXCEL from PL/SQL. I am using follwong code to write the data.
Owa_Util.Mime_Header ( 'application/vnd.ms-excel', False);
htp.print('Content-Disposition:attachment;filename="'||v_report_title||'.xls"');
owa_Util.Http_Header_Close;
I want to know if there is any option to write the data into MS Word. If i am changing the Mime type to ms-word its generating a word document with the HTML equivalent of data. Looking forward for a quicked response.
Regards,
Dhirendra

I am not sure if you ever got your problem resolved, but I just wanted to share my experience that is is possible to have "server" side code which will get document in Oracle or another Doc. management syste, stream it back to the client and open it (I am talking about MS Office documents) in Office application or actually inside the browser (there is a little trick with the client Windows Explorer settings to enable this, otherwise it will open as an application).
It works perfectly also for TXT files, .TIFF, .jpg , .PDF etc.
You have to be correctly setting the MIME type depending on type of the application the files was created by (I can see you are doing that);
BUT your following line :
htp.print('Content-Disposition:attachment;filename="'||v_report_title||'.doc"');
==> is telling the client's browser that the file is coming over as attachment and therefore it will always prompt the user with OPEN, SAVE, CANCEL.
Here is a snippet of my code example [ writting the file into local temp dir]:
Response.AppendHeader("ContentEncoding", ctype);
// set the final Content Type
Response.ContentType = ctype;
// stream and write the file out
Response.BinaryWrite(bytBytes);
Response.End();

Similar Messages

  • Underlining text in a MS word document from PL/SQL

    I have a routine that creates a text file using the TEXT_IO package and then launches MS Word for the user to edit the newly created text. They've asked me if I can underline/bold certain parts of the text prior to launching word.
    I have a feeling that I'll need either DDE or OLE to access a word document directly rather than simply creating a text file and calling Word. Does anybody have a recommendation for which way to proceed?
    Thanks,
    Ron

    Gerd,
    Thanks for the info. I kind of figured that I would need to use either DDE or OLE. I've never heard of OLE2 but I assume its just the latest version of OLE?
    Ron

  • Write to word document from oracle plsql

    Hi,
    Please provide methods to create and write to a word document from ORACLE PLSQL.We tried using UTL FILE package but it writes as ascii text.

    Divs wrote:
    The server m/c operating system is unix.so we need to invoke the procedure from Unix Os.In that case - not possible. For Windows COM (Component Object Model) to work, Oracle database need to be able to call and load the COM dynamic link libraries.
    Not to say that it is not possible. Have never used DCOM (the Distributed COM interface), and not exactly sure what it requires. Assuming that DCOM is not usable from a Linux perspective, you can still provide a manual interface. You create a NT tcp/ip service that exposes the COM interface calls that you need - in a secure fashion (even better - you can provide a higher level abstraction layer for the COM interface that does the specific job you need to be done).
    From Oracle you can then use PL/SQL's UTL_TCP package to open a connection to it and via this service craft a Word document on that Windows server.
    Are there web services for MS Office? I know Google is pushing that aspect hard (and embroiled in lawsuits with the US government and Microsoft about tender awards in this aspect). Now if Microsoft has "+office-on-the-web+", then one can create a Word document via a web browser. This means that there is an underlying web service - and that this can be called and used. The Evolution (Open Source Mail Reader) project for example uses the MS Exchange web service interface to provide a seamless interface to Exchange mail accounts (have used this everyday for a number of years now).
    The real question I would however ask is why Word specifically? Why not a more common format like PDF? You can even consider generating XML instead. Both Microsoft and Open Office and others are supporting XML formatted word processing documents (as oppose to older proprietary and binary formats).
    And why not use a Report Writer? I'm a big fan of doing as much as possible in Oracle (using PL/SQL most of the time). But certain things, like generating Word-style documents would be better done (and more flexible too) using a Report Writer.

  • How to create a SSIS package to delete word documents from local system

    Hi All,
    How to create a small SSIS package to delete word documents from local system. Word documents might be one or two weeks ago.
    Thanks in advance for your help.

        Dim filename As System.IO.FileSystemInfo
            filename = My.Computer.FileSystem.GetFileInfo("c:\temp.doc")
            If (Now.DayOfYear - filename.CreationTime.DayOfYear) > 3 Then
                'filename.Delete()
            End If
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • HP Laserjet PRO MFP125nw doesn't print Microsoft Word documents from PC

    Hello.
    I've recently bought a brand new HP Laserjet PRO MFP125nw printer. The functions seemed really nice and the price was acceptable. I've brought it to my home, installed it following the manual, connected it to Wi-Fi etc. It generally works fairly well. PDF files are printed perfectly well, the scaning function works and it's generally a nice piece of technology.
    The only problem is that it just doesn't want to pring Microsoft Word documents from my PC. It prints it perfectly when I try to print .docx from my smartphone using the app, but it doesn't respond when I try doing it from the PC.
    My Office version is 2007 Enterprise. Do you have any idea what I should do?
    Thank you in advance

    Thank you a lot for a quick reply, Cbert. It's fantastic to see HP actually reading their forums and trying to help!
    I'll try plugging it into the wall and directly to the PC with a USB, we'll see if it works out.
    About Word, i've already tried reinstalling Word, even installed a 2003 version to check if it works with that. Well it doesn't. And as i've written before, I tried turning some .docx files to .pdf using a converter, but it still doesn't print them.
    Anyway, i'll try the first two points and keep you updated, thanks!

  • Open a word document from a Java Application

    Hi,
    Can I open a word document from a java GUI apllication and point to a bokkmark automatically in the word document when opened.

    See this thread:
    http://forum.java.sun.com/thread.jspa?threadID=228332&messageID=810684

  • Calling Word document from Oracle Forms 10g

    Hi all,
    I would like to call a Microsoft Word document from my Oracle Forms 10g.
    What would be the best way to do this?
    Thank you in advance.

    Have you tried something like
    WEB.SHOW_DOCUMENT('file:///<documentpath>','_blank');

  • I am getting an unknown error when trying to download a word document from mail to pages, any help

    I am trying to download a word document from mail into pages and I keep getting an unknown error message, are there special settings for this? Any help much appreciated!

    Not there aren't any special settings for this. You just use the Open In feature to save the document into Pages. You could have a font in the document that Pages doesn't like, maybe something that you copied and pasted from somewhere into the document that went corrupt. But there is nothing special about the way that you save a Word document into Pages. You save it like you save any document or file into a compatible app.

  • When I try to install abode - it will download but says i have to close firefox before it will install. also i try to open a word document from a website and it will not open - it will only download

    i install abode - it will download but not install and indicates i have to close firefox before it will download. Also, I try to open a word document from a website - it will download but not open.

    You need to close Firefox to install many plugins, including those from Adobe.
    As for the Word downloads, see the changing downloads action section of this link - https://support.mozilla.com/kb/Managing+file+types

  • Upload / Open a Word Document from BDS with WebDynpro

    Hello,
    we use the BDS (Business Document Server) to storage our word files. Now we use WebDynpro with the UI OfficeControl.
    Could any one tell me, how to open/upload my documents from BDS with the OfficeControl.
    The UI FileUpload does not work, because it is not allowed to use specify URLs. link:[http://help.sap.com/saphelp_nw70/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm]
    For example that is the URL from the BDS: "SAPR3://SAPR3CMS/get/100/BDS_5FDB2_5FR/7B3AAF5B22AAD21197ED0060B0672A3C/Forminterface.doc"
    I use the class "CL_BDS_DOCUMENT_SET" with the method "get_with_url". result is above.
    Each example with the OfficeControl from SAP (Package SIOS) use the Mime Repository:
    mime_repository = cl_mime_repository_api=>get_api( ).
      CALL METHOD mime_repository->get
        EXPORTING
          i_url     = url
        IMPORTING
          e_content = content.
      wd_context->set_attribute( name = 'DATAS' value = content ).
    Have any one an idea, how BDS and WebDynpro works together

    What about getting the binary of the word document from BDS and download this?
    Yes, it exist a method calls "get_with_table". This return the binary path from my url above.
    Here is my source code:
    public attributes
    DATA oi_document TYPE REF TO if_ios_wordprocessing.
    DATA oi_factory TYPE REF TO if_ios_factory.
    METHOD wddomodifyview .
    DATA ol_node TYPE REF TO if_wd_context_node.
    DATA ol_office TYPE REF TO cl_wd_office_control.
    DATA vl_document TYPE xstring.
    short from
      vl_document = myBDS->get_with_table( ).
    Settings for UI OFFICE_CONTROL
      ol_node = wd_context->get_child_node( 'OFFICE' ).
      ol_node->set_attribute( name = 'DATASET' value = vl_document ).
    get the office control
      wd_this->oi_office ?= view->get_element( 'OFFICE_CONTROL' ).
    get the IOS Factory
          wd_this->oi_factory ?= ol_office->_method_handler.
    get proxy document
          wd_this->oi_factory->get_wordprocessing_proxy(
          IMPORTING proxy = wd_this->oi_document  ).
    CALL METHOD wd_this->oi_document->if_ios_document~opendocument( ).
    ENDMETHOD.
    When I compile everything is ok. But when I run my application, it nothing happen. No word file is opening or no error message. I create a ALC trace (SAPNOTE 949770).
    Each time when I try to open my word file comes a popup-window from the alc-trace:
    ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::| STG_E_READFAULT  : readaccess|HRESULT=-2147287010(     A disk error occurred during a read operation)
    ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::|Office version is lower than 12, only native office format supported|HRESULT=-2147467259(Unspecified error
    ERRO|20081024143529|WD86_1300|CIOS_GeneralDocumentContainer_Acf::|loadOffice2007xml|HRESULT=-2147467259(Unspecified error )
    But I have access to the BDS and to the document.
    Can any one help me.....
    Regards
    Nils

  • Word-documents from email

    Which app should i use if i want to open and print Word-documents from my email on ipad?

    Documents to Go and Pages are two options and there are others. Just search the app store for word processors. Some are free, others not.

  • To open a pdf document or word document from a JSP into a new window

    Hi,
    How to open a PDF document or word document from a JSP into a new window. i.e say from a jsp when a hyperlink or button is clicked it should open a new window with the pdf document or word document in it.
    thanks in advance,
    radki_j

    Hi ,
    when i tried to use the below code to open my word document , it will open as html and with some garbage details. Doesnt open as word document. How to solve this kind of probem?Need advice urgently.
    Open Document

  • I've created a Word document from a pdf file. How do i make it editable?

    I've created a Word document from a pdf file. How do i make it editable?

    Hi Kaz1,
    The Word document should be editable after the conversion is complete.  What happens when you try to edit it?
    Thanks,
    David

  • How to edit a converted Word Document from a PDF file

    how to edit a converted Word Document from a PDF file

    Hi Edit Converted Word Doc,
    What's happening when you try to edit the file? Have you tried triple-clicking in the text block that you want to edit?
    Please let us know what sort of trouble you're running into. It would also be helpful to know how the PDF file was created, and what version of Word you're using.
    Best,
    Sara

  • Transfer word documents from Lumia 520 to mac?

    Is there an app to transfer word documents composed on the lumia 520 in office to mac?
    I only see apps for enabling photo/video and music transfers from 520 to mac.
    I've been to the mac app store and don't see an app to transfer word documents from windows phone to mac.

    You don't transfer documents to the cloud on iPad.  The cloud is for backups.  It's not for document storage. There are however, apps you can use like Dropbox, which are cloud servers, you can use to accomplish this.  You set up Dropbox, the free app on your iPad.  Then you download Dropbox to your computer.  You get 2GB free storage, but if you need more, you can buy it. 

Maybe you are looking for

  • My nano wont let me put new songs on it

    ok, i got my nano for christmas,and its been good, but now it wont actually put any more songs on it!! Ive got about 300 songs on it, they are all in the right format and i have heaps of memory left, so its not that. my usb ports are all 2.0 or whate

  • Borderless printing from Windows 7 64 to a shared printer on XP Pro system.

    I recently bought a new dv7 HP laptop with Windows 7 64 bit to replace a Dell laptop running XP.  The XP laptop and other XP systems can print to my HP PSC2410 connected to a XP pro system fine.  The XP systems can print both 8x10, 5x6 or 4x6 borderl

  • How do i install an EJB on Sun One App Server

    Lets say i write a generic bean named "Bean Hello" that simply has a property that sets text to say hello. Can some one lead the steps on how i install it to the server and then call it within a web page? thanks it would help greatly..

  • Is there a keyboard shortcut to open a pop-up menu in Numbers 3?

    I have lots of spreadsheets with cells formatted as popup menus. I am accustomed to tabbing from cell to cell, and then tapping the spacebar to open the pop-up menu to select an option. Now it appaers that the only way to open a pop-up menu in Number

  • [IDCS3] Asserts during tree node creation

    I'm porting a plug-in from CS2 to CS3 and am in the middle of converting a list box widget displayed on a dialog to a tree view, using the WListBoxComposite SDK sample and SDK docs as a guide. I'm getting the message:<br /><br />b CreateObject- ReadW