import from HTML

i have a website that generates reports in HTML. it contains nice tables, with headers andso. in another spreadsheet program, i can just ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the markup is converted to the spreadsheet.
Can i do this with LO ?

jef peeraer

There is an option in Writer called Paste Special. Then you choose the HTML "text" style. I do not know if LO can convert HTML based tables into rows and columns properly. There has to be a method to do that, but I do not know.

But, it must be done, like Writer does, by a special pasting method.

Hi Jef,

jef peeraer schrieb:

i have a website that generates reports in HTML. it contains nice
tables, with headers andso. in another spreadsheet program, i can just
ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the
markup is converted to the spreadsheet.
Can i do this with LO ?

Yes, you can. Do you have difficulties to do so?

You can do even more. You can link to such a table using Insert > Link to External Data. After you have entered the URL hit Enter and wait a little bit until LO has connected to that site. Then you will see all tables in the lower area. Select one and click OK. You can break the link and make the data persistent with Edit > Links > Break Link.

Kind regards
Regina

i have a website that generates reports in HTML. it contains nice

What version of html output?

tables, with headers andso. in another spreadsheet program, i can just
ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the
markup is converted to the spreadsheet.
Can i do this with LO ?

Have you tried yet??? Then tell us the results!

Hey,
Easy tiger!  It would be good to know but people are pretty busy with other stuff right now and the thread is still there if it takes a while to respond.  Relax!  Have fun!  Take a break :slight_smile:
Regards from
Tom :slight_smile:

i have a website that generates reports in HTML. it contains nice

What version of html output?

the copy/ special paste works ok, but i loose all special markup (like colors, etc..)
it generates html tables, with headers and stuff. So it is not the latest HTML (5), just 4 i think

tables, with headers andso. in another spreadsheet program, i can just
ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the
markup is converted to the spreadsheet.
Can i do this with LO ?

Have you tried yet??? Then tell us the results!

well, i can't use Insert > Link to External Data, because i don't hace an URL of that generated report.

thanks for the help

i have a website that generates reports in HTML. it contains nice

Not able to generate a csv report? Assuming you are importing into a
spreadsheet to perform data manipulation, why is pretty formatting
necessary?

tables, with headers andso. in another spreadsheet program, i can just
ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the
markup is converted to the spreadsheet.
Can i do this with LO ?

What is stopping you to continue using the other spreadsheet?

Have you tried yet??? Then tell us the results!

well, i can't use Insert > Link to External Data, because i don't hace
an URL of that generated report.

What is wrong with the function 'paste special' and the option 'as
html' in the dialogue window?

i have a website that generates reports in HTML. it contains nice

Not able to generate a csv report? Assuming you are importing into a
spreadsheet to perform data manipulation, why is pretty formatting
necessary?

well, this is not an issue for me, but for other users i now, and they are always referring to the other spreadsheet program. My task is of course to counteract and to show them that it works even better in LO. This was one question popping up by a user, and i agree, why do pretty formatting in excel, but i just want to have an answer ready

tables, with headers andso. in another spreadsheet program, i can just
ctrl-a, ctrl-c and then ctrl-v, all tables are nicely imported, even the
markup is converted to the spreadsheet.
Can i do this with LO ?

What is stopping you to continue using the other spreadsheet?

trying to convert some people, is a goof thing, no ?

Have you tried yet??? Then tell us the results!

well, i can't use Insert> Link to External Data, because i don't hace
an URL of that generated report.

What is wrong with the function 'paste special' and the option 'as
html' in the dialogue window?

jef

Jef,

Take a look at the raw HTML. The formatting might be using style sheets (.css) files. It is pretty easy for the linkages between the body of html and the external style sheets to be broken.

Just a suggestion,

Generally, formating should be controlled by CSS so importing HTML will all the formating may be dicey. I have found that copy/paste of table information works very well with Calc.

What kind of data are users importing? Is the html data a table or mixed tabular and non tabular data?

it is a table, and indeed, copy/paste works ok. only some markup is not copies (as it is in some other spreadsheet program), eg if a row has this attribute set, bgcolor='red', this will not be copied to calc.
it is not a big issue, it is a feature, and if it worked, ok nice.

Thanks for the reply !

jef