Owa_util.mime_header, Excel, and style sheets

Does anyone know of a way to pass styles from Cascading Style Sheets to an Excel file? I'm using owa_util.mime_header('application/excel') to open the spreadsheet from a PL/SQL procedure formatted for html using htp and htf tags. I can put the <font> tags back into the code if I have to, but I'd rather not...
Thanks,
Dave

tward wrote:
I'm trying to use:
owa_util.mime_header('application/vnd.ms-excel', FALSE)
htp.p('Content-Disposition: filename="test.xls"');
owa_util.http_header_close;
htp.htmlopen;
htp.bodyopen;
htp.tableopen(cattributes=>'border="1" width="100%" align="CENTER"');
htp.tablerowopen;--(cattributes => 'align="LEFT", bgcolor="LIGHTGRAY"');
htp.tableheader(cattributes=>'width="10%"', cvalue => 'Header 1');
htp.tableheader(cattributes=>'width="15%"', cvalue => 'Header 2');
htp.tableheader(cattributes=>'width="20%"', cvalue => 'Header 3');
htp.tableheader(cattributes=>'width="10%"', cvalue => 'Header 4');
htp.tableheader(cattributes=>'width="20%"', cvalue => 'Header 5');
htp.tableheader(cattributes=>'width="25%"', cvalue => 'Header 6');
htp.tablerowclose;
htp.tableclose;
htp.bodyclose;
htp.htmlclose;
My understanding is that this will open the window to Open/Save/Cancel the output in Excel.....
But for some reason, it simply displays in a browser window.....
The first line in the windows is:
Content-type: application/vnd.ms-excel Content-Disposition: filename="test.xls"
followed by the HTML Table....
Why will it not open in Excel for me?Something is not getting recognized properly.
Try hard-coding the functionality you want into a static HTML document. Then work on using owa_util.mime_header or Like MichaelS suggested htp.p surrounded by any needed tags w/options to duplicate the working static document's functionality.

Similar Messages

  • Use of tables and style sheet

    Hi all,
    I am strungling using tables in RoboHelp HTML 7, to generate
    webhelp.
    What I try to accomplish is using tables in RH, and have its
    formatting defined in a style sheet. The html code generated by RH
    should be nice and clean. If possible I would not like to go into
    the HTML code, I prefer the use of the Design editor.
    I have the following in a new file in the RoboHelp table
    gallery:
    quote:
    <table>
    <caption>CAPTIONTITLE</caption>
    <COL style="width: 5%;">
    <COL style="width: 40%;">
    <thead>
    <tr><th></th><th></th></tr>
    </thead>
    <tbody>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    </tbody>
    </table>
    The following is in the CSS file:
    quote:
    table {
    border: 2px #c0c0c0 solid;
    border-collapse: collapse;
    width: "100%";
    margin: 10px;
    td, th {
    border: 1px #c0c0c0 solid;
    padding-left: 5px;
    padding-right: 10px;
    text-align: left;
    vertical-align: top;
    th {
    background: #ffc000;
    When I insert a table into a page, using the table file I
    created above, the html looks like:
    quote:
    <table x-use-null-cells>
    <col style="width: 33.333%;">
    <col style="width: 33.333%;">
    <col style="width: 33.333%;">
    <tr><td style="padding-right: 10px; padding-left:
    10px;" width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td></tr>
    <tr><td style="padding-right: 10px; padding-left:
    10px;" width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td></tr>
    <tr><td style="padding-right: 10px; padding-left:
    10px;" width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td>
    <td style="padding-right: 10px; padding-left: 10px;"
    width=33.333%>
    <p> </td></tr>
    </table>
    So, RoboHelp adds a number of styles to the inserted table
    that overrules the style sheet. That shouldn't be done.
    Also, in the RoboHelp editor the table looks different than
    in the preview. That shouldn't be a big deal, but something is
    missing:
    - There's no table caption shown.
    - The background in the table header is not colored as I
    expected to be.
    To eliminate the behavior of RoboHelp with respect to the
    table gallery, I created a new page in RoboHelp, and opened the
    HTML view. I inserted the following to create a new table.
    quote:
    <table>
    <caption>CAPTIONTITLE</caption>
    <COL style="width: 5%;">
    <COL style="width: 40%;">
    <thead>
    <tr><th></th><th></th></tr>
    </thead>
    <tbody>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    </tbody>
    </table>
    When switching to Design view and bach to HTML, it has been
    converted by RoboHelp to:
    quote:
    <table x-use-null-cells>
    <col style="width: 5%;">
    <col style="width: 40%;">
    <caption>CAPTIONTITLE</caption>
    <tr><th style="width: 5%;" width=5%>
    <p> </th>
    <th style="width: 40%;" width=40%>
    <p> </th></tr>
    <tr><td style="width: 5%;" width=5%>
    <p> </td>
    <td style="width: 40%;" width=40%>
    <p> </td></tr>
    <tr><td style="width: 5%;" width=5%>
    <p> </td>
    <td style="width: 40%;" width=40%>
    <p> </td></tr>
    <tr><td style="width: 5%;" width=5%>
    <p> </td>
    <td style="width: 40%;" width=40%>
    <p> </td></tr>
    <tr><td style="width: 5%;" width=5%>
    <p> </td>
    <td style="width: 40%;" width=40%>
    <p> </td></tr>
    </table>
    That seems ok, there are no styles redefined, other that the
    width.
    In Design view the table looks different than intended,
    however in preview it is as expected. I shows the caption tile, and
    the background of the table header, and text alignment is correct
    (at the top of each cell).
    So, my interpretation is that RoboHelp messes up the nice and
    neat html code when using the table gallery, and does not show the
    table in Design view as it would like in the Preview.
    As a consequence I think I will copy and paste the table code
    into the html directly, rather than using the table gallery.
    Unless, there's a good solution by using the table gallery.
    It would also be nice that the Design view behaves as a
    WYSIWYG editor.
    Has anyone an idea how I can use tables in RoboHelp as easy
    as possible, while keeping the benefits of style sheets?
    TIA,
    Andre
    BTW, my excuses for using quotes rather than attach code, but
    it seemed all code was added to the end.

    You should avoid locking yourself into a single solution for
    anything to do with RH (or any other help authoring tool, for that
    matter). Whether dealing with lists, tables, or images (the three
    major areas that usually create problems), it's wise to strike a
    balance between the features and drawbacks in HTML, CSS, RH, and
    web browsers.
    Confronted with the issue of changing border colors and table
    heading colors earlier this year (and having to do this for the 42
    projects in our merged WebHelp project), I simply used
    FAR to change the hex numbered
    colors in the code, outside of RH (from #808080 to #d8e4f8, for
    example). Some freeware products for content replacement are also
    available.
    If you've used those colors for other things, such as H1/H2,
    or other backgrounds, etc., you'll need to identify all table uses
    first, and then change only those instances. You could then set up
    a batch file to change all border-right-color: #808080;
    border-left-color: #808080; etc. all at once
    You could also just use the RH Multi-File Find & Replace
    if you're only dealing with a few projects, since these table
    attributes are likely to always appear as complete on a single line
    (the RH feature doesn't handle search and replace strings
    interrupted by line breaks and multiple spaces).
    All of our tables had been created using Rick's solution via
    the Table Gallery, and the background and border colors show up
    identically in Design, Preview, and output views. The only use of
    the css for our tables is the styling of the actual text that
    appears in the cells (TableHead, TableRow, TableSubHead), such as
    shown in the attached code below.
    BTW, another look at your original post shows that your claim
    that "RoboHelp adds a number of styles to the inserted table that
    overrules the style sheet," is not quite on the mark. The only
    change is that the
    "padding-left:" value has been increased from the CSS 5px to
    10px. I would guess that you have a 5px indent in either your BODY
    or P tag in the CSS, thereby resulting in the value being increased
    to the total of 10px.
    Good luck,
    Leon

  • Designer6i: About templates and style sheets.

    How "About Page template filename (DOCTAP)" Use this preference to identify a document template for the About Page.

    The email content can be HTML content. We dont' restrict what goes in the HTML content and hence you can inline the css or refer to a hosted CSS (absolute path). There are no sample templates or style sheets shipped with the product.

  • InDesign and style sheets

    Hello there,
    I'm new to InDesign and have searched the Help menu but couldn't find the info I wanted. Can anyone tell me if there is an option to apply style sheets in InDesign when doing a brochure layout as there is in Quark. It's a great time saver.
    Thanks,
    m

    Rey,
    When the keyboard shortcut is grayed out it means that another paragraph or character style has been assigned that keyboard shortcut AFTER you assigned it initially. Either assign a new keyboard shortcut or find the one that is not grayed out and reassign a new keyboard shortcut or remove the shortcut altogether. Hope this helps.
    Regards,
    Len Swierski

  • Isolation Method URL and Style Sheets

    We have a number of Java iViews we have developed that use the standard portal CSS file(s) for display.
    We have not put an explicit link reference in the HTML output of the iViews, instead, we were using an 'isolation method' of embedded - the iView was picking up the CSS from the main page as you would expect.
    We now want to change the Isolation Method to URL to remove the full screen refresh when events are fired. Using URL removes the CSS links from page, can anyone advise me of the best way of explicitly adding them to a Java iView?
    I've seen a post or two suggesting using a full path reference (including host names and port numbers) I would rather avoid this if I can. I would also like to ensure the iViews work if the user changes their theme

    Hi Tom,
    This code is copied from the masthead par file. Maybe you can use it
    private String GetThemeURLPath(IPortalComponentRequest request)
         ILAFService iLAFService = (ILAFService)request.getService(ILAFService.KEY);
        String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
        String url = iLAFService.getRelativeThemeRootURLPath(request, ILAFService.PORTAL_THEME) + "/" + currentTheme + "/prtl";
         return url;
    cheers,
    Noë

  • RowBandingInterval and style sheet

    Hi,
    I use a stylesheet to define the fontsize in a adf table using af|column::data-cell etc.
    The adf table shows up correctly to the font size I mentioned.
    When I use rowBandingInterval="1" to show alternate rows as white/grey in a adf table listing, the font size get changed for the alternate rows.
    How do I specify the font size for this rowbanding please?
    Thanks

    Hi,
    For setting the font-size for the row, i guess you would use the following style in the CSS skin file.
    af|table::data-row af|column::data-cell{
    font-size:30px;
    }In addition to the above, add the following to set the font-size for all the rows (when you set the rowBandingInterval="1" for the table).
    *af|table::data-row af|column::banded-data-cell{*
    font-size:30px;
    *}*Thanks,
    Navaneeth

  • Designer6i: About templates and style sheets.  Web PL/SQL

    Preference About Page template filename
    How Use this preference to identify a document template for the About Page

    Hi!!
    I have filed an enhancement for this. The bug # is 2377499. I shall keep you updated when the feature is added.

  • Creating a catalog with excel and InDesign CS6

    Help! Why can't it be as easy and importing an MSWord Doc? I've been reading about data merge and XML and both are just not working for me. I'm probably doing something wrong. Right now. I'm just trying things out to figure out the best way to execute. When the live text is ready I will have up to 5,000 skus to place in up to 200 pages. I'm using InDesign CS6 - My templates are done, text boxes are linked and style sheets set up. I need to figure out a way to import the excel doc with the columns that I need, in the order I need and somehow (hopefully) styled accordingly. I'm more concerned with the text than the images, so I can import the images on my own.
    With Data merge, I'm noticing that it won't work with linked boxes..the text is styled but it won't flow from one linked box to another.  With XML - I think I'm close, but when I have the tags in place, will only allow me to import one story at a time.
    Anyone have experience doing large catalogs? What can you suggest?
    Thank you in advance for your help!

    Your observations above about Data Merge are correct. It's probably not appropriate for this job. If you do a lot of catalog work, investing in one of the commercial catalog plugins would probably be a good idea.

  • ORA-06502/ORA-06512 at execution owa_util.mime_header

    Hi, APEX gurus!
    I try to write a procedure to display bfile contention /images/ into APEX page.
    I have a table :
    -TEMP_FLAGS (ID NUMBER(3) NOT NULL, NAME BFILE)
    - procedure display_country_flags_bfile
    display_country_flags_bfile (p_id NUMBER) is
    CURSOR c_flags(p_flag NUMBER) IS
    SELECT name
    FROM temp_flags_bfile
    WHERE id = p_flag;
    r_flags c_flags%ROWTYPE;
    v_bfile bfile;
    lgh_file number;
    v_dir_alias varchar2(256);
    v_filename varchar2(256);
    v_mime varchar2(255);
    begin
    open c_flags(p_id);
    fetch c_flags INTO r_flags;
    CLOSE c_flags;
    v_bfile := r_flags.name;
    dbms_lob.filegetname(v_bfile, v_dir_alias, v_filename);
    lgh_file := dbms_lob.getlength(v_bfile);
    Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    htp.p('Content-length: '||lgh_file);
    htp.p('Content-Disposition: attachment; filename="'||v_filename||'"');
    owa_util.http_header_close;
    wpg_docload.download_file(v_bfile);
    Dbms_Lob.Fileclose(v_bfile);
    end display_country_flags_bfile;
    If i execute directly in Toad i get error below:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 354
    ORA-06512: at "SYS.OWA_UTIL", line 413
    ORA-06512: at "STAT.DISPLAY_COUNTRY_FLAGS_BFILE", line 20
    ORA-06512: at line 1
    In Report attributes of APEX page, i use HTML expression to populate column value as call this procedure with appropriate parameter but image just not showing.
    I appreciate any help and opinion.
    P.S. I'm a newbie in APEX and have minimal experience.
    P.S.2 I forgot - Oracle 10g XE and APEX 2.1 built-in
    Thanks, Rado
    Edited by: user7637288 on 16-Dec-2008 05:12

    Thanks, rafix.
    But i'm using Oracle XE with storage limit /1GB/ and i don't want store any images in database. I prefer to use bfile type with link to files on OS level.
    By the way , just for tests, i try to use blobs on my own table with simular procedure, which throws the same error - with owa_util.mime_header. And think that the problem is related to owa_util package.
    My APEX version is 2.1 - built-in in Oracle XE, not 3.1

  • Style Sheet Problem with Websphere

    Hello. If anyone here has any experience with Websphere or iSeries, I would appreciate some help. I posted this topic in the Websphere forum , but it seems that forum isn't very active. Anyway, I can't get my style sheet to work with a java servlet application that I installed on an iSeries server. I put together the app and style sheet through WebSphere and exported everything to the server as an .ear file, installed the application and the program works; however, the app isn't accessing the style sheet. I'm new to both iSeries and Websphere. I've been trying this line:
    writer.println("<LINK rel='stylesheet' type='text/css' href='Master.css'>");
    and have tried putting the style sheet in the same folder as the class file, tried putting it in the Java Source folder, tried it all over the place really and have tried making the path absolute. I've also tried pasting the .java file into the classes folder with the .class file. None of my efforts have been successful. Is this even possible? Any help would be appreciated. Thank you.

    have tried putting the style sheet in the same folder as the class file, tried
    putting it in the Java Source folder, tried it all over the place really...In your web application, it should go in the same directory where you would put an HTML file or a JSP file. All those places you tried are places that the web server keeps hidden from clients. You should be able to request the CSS file from your browser in exactly the same way you would request an HTML or JSP file.

  • Help with Styles/Style Sheets

    The area of styles and style sheets has been an immense frustration for me in AW pretty much forever. I'm simply unable to make them work in the way that all the documentation seems to indicate that they should and, worse than that, I seem to be unable to make them consistently fail in the same way from one try to the next.
    The most common failing, the one that represents it coming as close to working as I seem to ever see it, is when applying a paragraph style to another selected paragraph and seeing all of the Paragraph but none of the Text formatting coming through: The indenting and line spacing will be changed correctly, and any and all Style info (from Text:Style, I mean) comes through correctly, but no change occurs to the original font or size.
    The custom style does display the correct font information, but the 'original' fond style and size don't change.
    I can't believe that after all of this time and effort I'm still missing something, but perhaps I am. If anyone could manage to point out just what that is then I'd be eternally grateful.

    Thank you for the quick and helpful response.
    I'm pretty sure I understand about setting the desired style info and I can usually, but not always, see what I was trying to set up displayed in the Text and Para. Attributes flippies.
    Not, however, always. In those cases when the font is displayed, but not the size, then size changes aren't passed along and you'll usually also see other strangeness (see below). The solution for this problem, for me at least, is to repeat the process but this time first change the font to something else and then back to the desired setting; for some reason, this will force it to appear and to work normally, more or less.
    A simple way for me to tell whether or not the Styles Window is going to be working as it should is to click on different paragraphs and watch the display in the Styles window. When things are as normal as I think they get, the checkmark will accurately display the style currently assigned to that paragraph; if not, it will not.
    When things are working correctly, then style selection works normally and clicking anywhere in a paragraph to be changed, then double-clicking on the desired style in the Styles Window, will result in a proper change to that style (or as well as it can, given the difficulties you see with compound styles and attributes becoming 'stuck').
    When not working correctly, OTOH, the whole function is different. Clicking on a paragraph, as mentioned above, won't necessarily correctly indicate the current style for that para., and double-clicking on the new desired style will do nothing at all. Instead, in these cases, you must have the entire paragraph selected before double-clicking on the style desired and, after doing so, you'll see that although para. attributes will seemingly always be changed it's very common (almost the rule, actually) that some or all of the differing text attributes won't be applied, even though they are correctly displayed in the body of the style itself.
    I've been about as careful as I can be in setting up and testing all of this and for the life of me can't see clear reasons why outcomes are so different between two identical test documents. There are other oddities, such as the fact that editing of a style via the menu structure works fairly well and as described as long as the Styles Window itself is working correctly, as described above, but gets wildly different results if it is not.
    Even when working correctly, it seems to always leave the 'case zero' paragraph, the one that originated the style, unchanged in one way or another; for example, I wound up with a document having four identical paragraphs, all having the same style assigned, and all showing the same style assigned in the Styles Window, but having different appearances: The original style was Bold and, after that was removed in the editing process, the other 3 paragraphs correctly showed normal, i.e., not Bold, font. The first para. continued to be bold, and to show Bold as checked in the menu, even though the Style did not call for it to be.
    As in other cases where things got stuck in some way or another, this was cleared by editing again, going into the style menu (Text:Style, I mean), and cycling things. In this case, this meant first selecting Bold, then deselecting it; after that, the lead paragraph displayed correctly.
    Those are just a few examples of what I've been seeing and dealing with. It's not the simplest of features but, between the contents of AW > Help and _AW 6: The Missing Manual_ I think I should have a good enough idea of how it works and how to use it. Unfortunately, it just seems to occasionally be wandering off and getting lost.

  • Mini Folders in Bagage and Styles Folders

    I inherited a project and found a lot of empty folders in the
    "Baggage" and "Style Sheets" folders under the Project Tab. These
    empty folders have the same names as the folders in the HTML Files
    (Topics). I wanted to know what the purpose of those empty folders
    are.

    Hi Saint-Antonio and welcome to our community
    When you look at the folders in the RoboHelp Explorer pane,
    they have icons on them. I refer to these as "Pseudo-folders", as
    they aren't really folders you would see on your hard drive in
    Windows Explorer. But when you create folders from inside RoboHelp
    HTML, you ARE actually creating live folders in Windows Explorer.
    You are just using RoboHelp to accomplish it. The folders you see
    here are the actual folders you have created.
    If you wish to suppress their view, click the View menu and
    DE-select "Empty Folders".
    Cheers... Rick

  • When I design with Muse and export as HTML Dreamweaver doesn't attach the style sheets. Any answers?

    When I design with Muse and export as HTML Dreamweaver doesn't attach the style sheets when I open the files with Dreamweaver. Essentially when I design with Muse the files don't render the same with Dreamweaver. Is this a bug? Any work arounds?

    Then you will have to install a local server and use live view.  It's not that DW isn't rendering it or isn't attaching it, it's that Muse decided to use server-side processing to include it which is ok for a CMS practice when you are combining stylesheets for better caching, but it really isn't ideal for a single style sheet.  This is a shortcoming of Muse and one of the reasons many professionals don't back the product at the moment.  That and you can't actually buy Muse, so unless you are on a subscription you don't have it.  It's trying to fill a void for those who don't want to invest in the professional design tools like Fireworks or Photoshop or Dreamweaver, but want a cross between them to make designs.  If you have invested in the subscription though and want a better way to make layouts I highly recommend coding it yourself and using Fireworks or Photoshop to do the layout for you.  There is an excellent tutorial on the devnet (3 parts) to show you how its done ( http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html ).  Once you start using Fireworks or Photoshop you will realize just how limited Muse is in design.

  • I am forced to hold shift and refresh the page on 99% of the sites I visit. How do I fix this from happening? If I don't the pages are missing style sheets and etc.

    When ever I go to sites they half load or are missing style sheets. If I view the source for the page and click on a style sheet link I get the following error:
    Content Encoding Error
    The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
    If I hold shift and refresh the page loads as normal.
    It's happening on 99% of the sites I visit. I have disabled my plugins and add-ons.
    I do have some add-ons or plugins that I would like to remove completely but there is no uninstall or remove option, neither in regular or safe mode.

    '''I'm NOT buying a backup Computer till, Firefox will Run on Windows 8 !'''

  • XML page cannot be displayed cannot view XML input using XSL style sheet Please correct the error and then click the REfresh

    XML page cannot be displayed cannot view XML input using XSL style sheet Please correct the error and then click the REfresh

    Is the error message displayed in Firefox or in IE, or in a customized window that doesn't identify the browser?
    ''If it displays in Firefox:''
    It's possible that the Troubleshooter doesn't work correctly unless IE is your default browser. You could test that possibility by having IE make itself the default and testing the Troubleshooter again.
    ''If it displays in IE or embedded in another Microsoft application:''
    In a web search I found these suggestions:
    (1) Reset your Internet Explorer settings, according to http://answers.microsoft.com/en-us/ie/forum/ie8-windows_7/cannot-view-xml-using-xsl-style-sheet/ccfe80c6-c0db-4594-a7e3-475f9eac0e85
    (2) Try the System File Checker, according to http://ask-leo.com/why_do_i_get_the_xml_page_cannot_be_displayed_after_running_a_microsoft_troubleshooter.html
    Any luck?

Maybe you are looking for

  • Unable to view picture in full screen

    When I double click a picture in iPhoto, it brings up a black screen.  Same thing when I try and do a slideshow -- the pictures do not show up.  Any ideas on what I am doing wrong?

  • ICal/Google sync issues since iOS 8.2 update

    Since the update to iOS 8.2 a few days ago, iCal on my iPhone 5s is not syncing with my Google Calendar.  I have already reset the 2 step verification on my Google calendar permissions, checked to make sure events are in the Google calendar and not i

  • Find/replace window in Mac OS - how to attach to main document window?

    At work I use Windows and the find/replace window is part of the main document window. At home, I use Mac OS and the find/replace window is a separate floating window which is annoying because it means I'm constantly dragging it out of my way...is th

  • Enhancing

    Hi ...i have a problem running the RPTQTA00 report .. wherever i run the report fot the same period, a new record is getting created with the same value.. this is not problem with the time constraint..i want to solve this issue using an exit.. can an

  • Crashes during recording iPad2

    Started recording a smart guitar on my new iPad 2 and after 8 to 10 seconds the screen freezes but the loop keeps playing. Have to hard boot the iPad by holding the home button and power button to restart. Ipad2 32 GB with a ton of free memory.