Loading ...
Sorry, an error occurred while loading the content.
 

copy Tab delimited Table to HTML Coding, then HTMLTidy

Expand Messages
  • Jeff Scism
    Question can the Clip below be modified to automatically set TAB spacing at 25? I was looking for a Tab setting function or documents properties setting
    Message 1 of 3 , Sep 25, 2006
      Question can the Clip below be modified to automatically set TAB spacing
      at 25?

      I was looking for a Tab setting function or documents properties setting
      function but didn't find reference to one. (I realize that the Tab
      settings are a visual thing in display of the document, and not hard
      coded into the document, But it is a lot easier if the Tabulated text
      comes displayed in aligned columns)

      ~~


      The below clip runs on a tab delimited table that is isolated in its own
      document. (a file copied from a spreadsheet or a website table can be
      used as long as the delimitations between "columns" are Tabs. It copies
      the table to a new notetab document, turns off screen update ( for
      faster working) and converts it to a HTML table, then runs HTMLTidy on
      it to correct the codes to a standard presentation. The result is a HTML
      page with the table ONLY, Then you copy the portion you need to the
      document where you want it. I use this as a stage in getting tabulated
      data intoa template for a website I also use.

      You need to have HTMLTidy installed in the directory where notetab runs
      from. If you do not wish HTMLTidy to run, or do not have it installed,
      then delete the line that says "^!KEYBOARD CTRL+F7" at the end.


      Copy below this line, TURN WORD WRAP OFF, right click on Clipbook in
      NoteTab, and choose "add from Clipboard",
      ______________________



      H="Tab Table to HTML Table"
      ; Run this Clip 1st and read
      ; comments before using.
      ; This code starts with a Tab deliminated table, converts it to a
      ; HTML Table, then runs HTMLTIDY.


      ^!SetWordWrap OFF
      ^!KEYBOARD CTRL+A CTRL+C CTRL+N CTRL+V
      ^!SetScreenUpdate OFF
      ^!Jump 1
      ^!InsertText <table Border="1">
      ^!InsertText <tr> <td>
      ; If CSS wrapper Clip is used (below), then comment line above
      ; and un-comment line below.
      ; ^!InsertText <tr> <td class="border">^!If ^1 = 1 Exit
      ^!SaveValue efoHtmlAR=1
      ^!Clip "About this library"^!If ^1 = 1 Exit
      ^!SaveValue efoHtmlAR=1
      ^!Clip "About this library"p
      ^!Goto td

      :tr
      ^!Jump Line_End
      ^!InsertText </td> </tr> <tr> <td>
      ; If CSS wrapper Clip is used (below), then comment line above
      ; and uncomment line below.
      ; ^!InsertText </td> </tr> <tr> <td class="border">
      ^!Set %EndRow%=0
      :td
      ^!Find "^t" S
      ^!IfError EndTable
      ^!Set %Calc%=^$Calc(^%CurrentRow%+1)$
      ^!IfTrue ^$StrCount("^%Tab%";"^$GetTextEol$";0;0)$ Next else Skip
      ^!Set %EndRow%=1
      ^!InsertText </td> <td>
      ; If CSS wrapper Clip is used (below), then comment line above
      ; and uncomment line below.
      ; ^!InsertText </td> <td class="border">
      ^!IfTrue ^%EndRow% tr
      ^!Goto td

      :EndTable
      ^!Replace " <tr> <td>" >> "</table>" SB
      ^!Replace " <tr> <td class="border">" >> "</table>" SB
      ^!KEYBOARD CTRL+F7


      ______________________
      Copy above this line
    • Don - HtmlFixIt.com
      ... I m not really reading closely but why if you are going back to html can you not simply use css to control?
      Message 2 of 3 , Sep 25, 2006
        Jeff Scism wrote:
        > Question can the Clip below be modified to automatically set TAB spacing
        > at 25?

        I'm not really reading closely but why if you are going back to html can
        you not simply use css to control?
      • Jeff Scism
        Perhaps it is because I am unfamiliar with CSS in general. Everytime I try to set up CSS pages they get scrambled somehow, so I revert back to what I know
        Message 3 of 3 , Sep 25, 2006
          Perhaps it is because I am unfamiliar with CSS in general. Everytime I
          try to set up CSS pages they get scrambled somehow, so I revert back to
          what I know works.

          Jeff

          Don - HtmlFixIt.com wrote:
          > Jeff Scism wrote:
          >> Question can the Clip below be modified to automatically set TAB spacing
          >> at 25?
          >
          > I'm not really reading closely but why if you are going back to html can
          > you not simply use css to control?
          >
          >
          > Fookes Software: http://www.fookes.us, http://www.fookes.com
          > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.