Possible with automatic page numbers in a cell

Discuss the spreadsheet application

Possible with automatic page numbers in a cell

Postby Albireo » Thu Jan 16, 2020 1:38 am

Is it possible to insert page numberrring i a specific cell?
(I want, not use the header or footer line.)
OOo 4.1.X on Windows XP, Win7, 10
Albireo
 
Posts: 59
Joined: Wed Apr 15, 2009 12:05 pm

Re: Possible with automatic page numbers in a cell

Postby RusselB » Thu Jan 16, 2020 6:41 am

In Calc, simply, no this is not possible.
Please see this topic which is similar.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 6157
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Possible with automatic page numbers in a cell

Postby Zizi64 » Thu Jan 16, 2020 8:24 am

The Cells of a spreadsheet may flow onto the next/previous page when you modify
- a row height
- the page size
- the page orientation
- the margin of the page
- the sheet scaling factor
- etc...

Therefore the cell where you want to put a "page number" maybe will often flow dinamically onto an another page. For example: the cell will flow from the bottom of the actual page to the top of the next page. Then the cell will show
- a wrong page number
- in a wrong position



You can not put any label/field into a Cell, which you can put into a Wrtiter text content, but you can put a "Sheet number" into a cell by usage the function:
Code: Select all   Expand viewCollapse view
=Sheet()
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9580
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Possible with automatic page numbers in a cell

Postby Zizi64 » Thu Jan 16, 2020 8:38 am

A workaround tip:
When you use forced page breaks, with some gaps on the phisycal pages for the for the possible modified row heigths, you can put the start value of a virtual "page number" into a cell of the the first row of a page. Then you can increase it by 1:
Code: Select all   Expand viewCollapse view
= A1+1

on the next page, and you can copy the formula onto the next pages. It works while you manually manage the properties of the Pages/Sheet and the Row heigths appropriately.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9580
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Possible with automatic page numbers in a cell

Postby Albireo » Fri Jan 17, 2020 11:06 am

Thanks everyone!
I understand the problem, I am working with a manual invoice layout (which should preferably have the same layout as another invoice).
(Probably this invoice will never have more than one page - and maybe it will never be a problem in this case - but..)

My wish would have been to be able to handle headers more dynamically eg. .:
  • Being able to place a logo (image) on the top left.
  • Write the heading Invoice in the middle
  • And place the page number on the far right, in the same level as the header

The limitations I experience are .:
- To place a logo at the top of the page - at the header level.
- Get the headline in the middle of the page (what I understand - the only way to adjust the headline sideways is spaces)
However, the page numbering will work perfectly :D

I understand that Calc may not be the best solution to handle layout with,
but is there any way to always be able to see where the header is in relation to the other structure of the page?
(other than clicking on preview)
OOo 4.1.X on Windows XP, Win7, 10
Albireo
 
Posts: 59
Joined: Wed Apr 15, 2009 12:05 pm

Re: Possible with automatic page numbers in a cell

Postby Zizi64 » Fri Jan 17, 2020 2:08 pm

You can try the "Rows to Repeat" option. You will found under in the "Format - Print range" menu item.

The repeated rows will be appeared on every printed page.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9580
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Possible with automatic page numbers in a cell

Postby MrProgrammer » Sat Jan 18, 2020 1:06 am

Albireo wrote:My wish would have been to be able to handle headers more dynamically eg. .:
Being able to place a logo (image) on the top left.
Write the heading Invoice in the middle
And place the page number on the far right, in the same level as the header
We seem to have the XY problem in this topic. You should have described all this in your initial post.

I believe you can accomplish your goal by using some of the other features of OpenOffice. Put your data in a spreadsheet, one row per invoice; it's layout is not otherwise important; it's formatting is irrelevant. Create a new database with the spreadsheet as its data source, register, and save it. Create and save a template in Writer with your logo, page number, and invoice in the layout you would like. Use Mail Merge fields in the invoice area to display data from a a row of the database.

You can now use File → Print → Form letter? → Yes → Records → {Select it} → OK. You might need to uncheck "Print automatically inserted blank pages", depending on your printer dialog. You can select multiple records to print multiple invoices. You could build a query to select, say. all the invoices for a selected month or for a specified customer.

Read about Mail Merge in Help → Index or searching for topics about it in the forum.. [Solved] Create index cards from multiple spreadsheet rows is a similar topic. Learn more about creating queries in the Base documentation by by searching for topics about that.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3962
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA


Return to Calc

Who is online

Users browsing this forum: No registered users and 24 guests