[Solved] Spreadsheet to HTML

Discuss the spreadsheet application
Locked
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

[Solved] Spreadsheet to HTML

Post by Fab2024 »

I am a total newbie and know just a few HTML tags I learned long long time ago.

I am trying to do a timeline for a history course at school.

I am using Calc because it is easy for me to set years and cells with facts of interest, create external hyperlinks and export as HTML document.

My main problem is horizontal scrolling. Once exported to a browser, Firefox or Chromium, they just show the first page.

I want to be able to scroll horizontally.

I found something here but I don't find any <div> in the source made by OOffice
https://www.robjwells.com/2018/05/horiz ... 0the%20div.

many thanks
Last edited by MrProgrammer on Tue Oct 01, 2024 4:19 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] Fab2024 says "Solved on my own" -- MrProgrammer, forum moderator
openoffice 7.3.7.2 on unbuntu 24.0
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Spreadshhet to HTML

Post by Lupp »

[There is no openoffice 7.3.7. You obviously are using LibreOffice.]
You surely create the .html file using >File>Save As....
Never do so without first saving your work to .ods.
The created html file will not ontain images. These are written to extra files.
The browser will show empty frames if there is no access to these image files.
I woul suggest you also define the range you want to see in the browser based on the Page Style in Calc.
Content of cells which flows over to empty adjacent cells will be reduced to one cell (creating hard line breaks) in html.
See attached example.
aoo111856_WideHtml.ods
(62.17 KiB) Downloaded 45 times
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Hi

Yes, thanks, it is libreoffice :D

I save everytime I make a change in Calc and use "File" --> "export" that creates an "xtml" file, xyz.html

Or do I have to save it "as"?

You said --- I woul suggest you also define the range you want to see in the browser based on the Page Style in Calc.

How exactly? Do you mean in "set print range"? Just did it but same result ...

Or do I have to define the page as a few meters long?
Last edited by Fab2024 on Sun Sep 01, 2024 12:18 pm, edited 4 times in total.
openoffice 7.3.7.2 on unbuntu 24.0
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Calc ceates a 300kb html file

I use SeaMonkey (because I used it some 20 years ago and it was very useful, then) and Bluefish because its search function works while SeaMonkey doesn't.

I didn't find in Calc any option to open hyperlink in a new tab and adding it manually to projected hundreds of links is out of the question, typing errors notwithstanding

I found the following that I can add in Bluefish
<head>
<base target="_blank">
</head>

It works for me

But despite only 300kb both take a long time to open ... and I have 20Gb of ram

Any suggestion on this point?

thanks
openoffice 7.3.7.2 on unbuntu 24.0
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Just ried to set page length as 20m but it is limited to 600cm, nevertheless in firefox it shows only the "first page"
openoffice 7.3.7.2 on unbuntu 24.0
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Spreadshhet to HTML

Post by Lupp »

Lupp wrote: Sat Aug 31, 2024 7:23 pm You surely created the .html file using >File>Save As....
Never do so without first saving your work to .ods .
You posted in the Calc forum, and you surely created your document as an ordinary spreadsheet document which is supposed to be saved as .ods .
If you got some .html file, you must once have used
>File>Save As... and have chosen HTML Document (Calc) (*.html) as the file type to use.
Always save first using the native type .ods . Only having the .html version you will never get back completely the original structure/content/formatting/functionalty.
.html simply isn't made for spreadsheets.
Fab2024 wrote: Sun Sep 01, 2024 12:49 pm Just tried to set page length as 20m but it is limited to 600cm, nevertheless in firefox it shows only the "first page"
What do you mean by "page length"? For the horizontal dimension you need to set an appropriate page width. 20 m isn't reasonable in any case.
My Firefox shows a horizontal scrollbar for my example (100 cm wide).
Did you set a reasonable PrintRange?
I never used "Seamonkey" nor "Bluefish", but if I did I had studied the basics.
You will also need to read about the basics of LibreOffice if you feel sure it's the application for you. Guessing about your intentions I would doubt that, in specific concerning Calc. However, the download page should link to related documentation.
Sorry! You won't get a personalized manual/tutorial as a forum post.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Thanks

I post in the Calc forum because it is the starting point of all the work

I have a timeline of some 300 columns, it is for history class.
It is in Calc because it will also allow students to create their own "blocks" of history that I'll paste into the timeline.

I don't know any other way to do it. As said I am not a pro at html/ccss.

You said
What do you mean by "page length"? For the horizontal dimension you need to set an appropriate page width. 20 m isn't reasonable in any case.


I want a web page scrollable on 300 column, Is it possible?
I tried 20m just for trying, could have tried 3m or 100cm.

You said
You posted in the Calc forum, and you surely created your document as an ordinary spreadsheet document which is supposed to be saved as .ods .
If you got some .html file, you must once have used
>File>Save As... and have chosen HTML Document (Calc) (*.html) as the file type to use.
Always save first using the native type .ods . Only having the .html version you will never get back completely the original structure/content/formatting/functionalty. .html simply isn't made for spreadsheets.


As said above:
I save everytime I make a change in Calc and use "File" --> "export" that creates an "xtml" file, xyz.html
I first save in .ods and then use "File" --> "export" that creates an "xtml" file, xyz.html

You said
Sorry! You won't get a personalized manual/tutorial as a forum post.
Thanks again, I wasn't looking for any tutorial but foor aline of html that would allow to scroll all the columns.

I found some but it implied the use of ccss as you must have seen following the link at the first post
https://www.robjwells.com/2018/05/horiz ... 0the%20div

Thanks again
openoffice 7.3.7.2 on unbuntu 24.0
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Thanks

I post in the Calc forum because it is the starting point of all the work

I have a timeline of some 300 columns, it is for history class.
It is in Calc because it will also allow students to create their own "blocks" of history that I'll paste into the timeline.

I don't know any other way to do it. As said I am not a pro at html/ccss.

You said
What do you mean by "page length"? For the horizontal dimension you need to set an appropriate page width. 20 m isn't reasonable in any case.


I want a web page scrollable on 300 column, Is it possible?
I tried 20m just for trying, could have tried 3m or 100cm.

You said
You posted in the Calc forum, and you surely created your document as an ordinary spreadsheet document which is supposed to be saved as .ods .
If you got some .html file, you must once have used
>File>Save As... and have chosen HTML Document (Calc) (*.html) as the file type to use.
Always save first using the native type .ods . Only having the .html version you will never get back completely the original structure/content/formatting/functionalty. .html simply isn't made for spreadsheets.


As said above:
I save everytime I make a change in Calc and use "File" --> "export" that creates an "xtml" file, xyz.html
I first save in .ods and then use "File" --> "export" that creates an "xtml" file, xyz.html
Do you mean that I should use the "Save as" html instead of "export"?

You said
Sorry! You won't get a personalized manual/tutorial as a forum post.
Thanks again, I wasn't looking for any tutorial but foor aline of html that would allow to scroll all the columns.

I found some but it implied the use of ccss as you must have seen following the link at the first post
https://www.robjwells.com/2018/05/horiz ... 0the%20div

Thanks again
openoffice 7.3.7.2 on unbuntu 24.0
Fab2024
Posts: 7
Joined: Sat Aug 31, 2024 12:28 pm

Re: Spreadsheet to HTML

Post by Fab2024 »

Thanks mate, solved on my own
openoffice 7.3.7.2 on unbuntu 24.0
Locked