Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page Breaks in HTML (2000)

    I have some Excel data I need to export into Word, in the form of formatted tables with extra text, headings etc. One way that appeals for various reasons is to generate a second Excel worksheet containing all the HTML tags plus the data, and save it as tab-delimited text. This can then be opened in Word as HTML, edited and printed. I need to insert hard page breaks at various locations and find this can be done from within Word via the usual Ctrl+Enter. These appear as part of a tag with which I'm not familiar:
    <br clear=all style='page-break-before:always'>

    These tags seem to do their job according to Word's Print Preview. My question is: Will I be able to simply insert this tag information into the Excel file, as it appears above? Or is it necessary for Word to do its "conversions" before it's inserted? Unfortunately I understand little of the kind of HTML/ XML that Word uses.

    thanks

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Page Breaks in HTML (2000)

    I think that tag might work only in IE, but it's mostly an IE world these days....

    If you want to put HTML into the export file, you could try putting it in a cell, but the Save As process might change the tag enclosures (< and >) to their HTML equivalents for display. You could either clean that up after the fact, or insert some kind of "marker" for the tag into the sheet, maybe REPLACEMELATER, and then open the .html file in Word (as a text file) or in a text editor and replace them with your page break tag.

    The tag itself is not tied in any way to Word's proprietary markup.

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page Breaks in HTML (2000)

    Thanks Jefferson. I don't actually ever want/ need to take the HTML to a browser - I only want the XL and Word versions. The "value" of using HTML as the language of choice for the transition is the ability to use the name of a graphic file in an XL cell e.g. photo_76.jpg inside an image tag, so that the actual image belonging to that filename would be displayed in the Word version. So the "secondary" spreadsheet would contain a cell with contents like:
    <td><img src=pathname/photo_76.jpg></td>

    This sheet (with the other necessary HTML) would then be exported as tab-delimited text, renamed as .html, opened in Word, edited, and (ultimately) destined for the printer. I'm trying to get as much as possible done in the exporting process (within XL) and it would be good to be able to insert the manual page breaks programmatically from XL, rather than inserting them post-export in Word. If I export as delimited text, would XL try to change anything as you suggest, or is your comment aimed at direct exporting to HTML?

    Alan

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Page Breaks in HTML (2000)

    All I can suggest is "try it." I'm not a big Excel user.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •