On 31/12/10 12:47, Dilwyn Jones wrote: > Does anyone know of any software that will convert a html table into > auto-spaced plain text? > > I'm trying to convert some HTML tables into plain text columns for the > QL. Most HTML-text converters just put a space between columns in the > table, with the result that the text looks awful. It'd be a big job to > do this by hand (scan table, pass 1, find all TR and TD tags and keep a > record of the longest in each column, scan 2, extract the text and pad > each one with spaces), and although I'm sure I could write such a > converter, why do so if there's already QL code to do just that?
Don't forget, when you find a table, there is a possibility that there is another table embedded in between the TD tags! So, you'll have to get recursive! Theres a PC program here http://www.nirsoft.net/utils/htmlastext.html that allows "Simple tables can be delimited by spaces, tab characters, commas, or CRLF" so it's probably not what you need. Cheers, Norman. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767 _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm