[Solved] Printing Labels from "calc" file

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
Corkran
Posts: 13
Joined: Tue Dec 01, 2020 12:38 am

[Solved] Printing Labels from "calc" file

Post by Corkran »

I have the User Manual, I registered my ODS spreadsheet and can communicate with that file. I go to wizard, other external data source, next.
Connections settings, Settings. Next screen is "Database type and I select "Spreadsheet". I then go to "browse" select the ODS file I want to register.
I skip "Field Assignment". Next screen is "Data Source Title" and name the address book name.
I Select "Finish" and go to File, New, Labels. In options tab, I select "synchronize Contents". On the Labels tab I select the registered Spreadsheet file, in Database I select the registered spreadsheet file, table (tab of file I want to print the labels from) and then select the fields I want on the Labels.
When I choose "New Document" the labes are filled in with the defined fields. Example - <First Name><Last Name> etc. This is inserted in all the labels on the page. How can I point the labels to the spreadsheet?
Last edited by MrProgrammer on Tue Dec 15, 2020 2:17 am, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Windows 11, OpenOffice 4.1.13
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Printing Labels from "calc" file

Post by John_Ha »

Corkran wrote:I registered my ODS spreadsheet ...
Read the first part of Chapter 11 - Mail Merge. You need to register a database, or .ODB file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31324
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Printing Labels from "calc" file

Post by Villeroy »

The label wizard and the mail merge wizard obfuscate the whole process because they completely hide away the database document (.odb) from the user. Mail merge (and labels) always pull data from a database document. A database document can be connected to a wide variety of tabular data, including spreadsheets.
The wizards should produce 2 files:
1) a registered database document (*.odb) serving the data.
2) a Writer document hosting the page layout with labels and the layout of individual labels with mail merge fields. Each mail merge field is a place holder for a specific column of a specific table in a specific database.
Having such a Writer document, just print it, confirm the message that you are going to print a serial letter and choose an output file in the next dialog
Then you can open the output file and send that to a printer if the result looks fine or you can print the label document a second time and choose a printer.

To understand what the Base document does:
Get the data source window (menu:View>Data Sources). In the left pane you see a "Bibliography" (shipped with your office suite) and the registered name of your database. Right-click that name. The context menu shows 2 items:
1) Edit Database File... This opens the odb document. Look at the [Tables] container. There you should find your spreadsheet data in tables that are named after the sheet names. Look at the status bar. It indicates that this database is connected to a spreadsheet file. The database document do not contain any data. Your data remain in the spreadsheet and the database document makes it look like a database. menu:Edit>Database>Connection... allows you switch to another spreadsheet when the current spreadsheet has been moved or when you want to connect the same database to another spreadsheet.
2) Registered Databases... shows the list of currently registered databases as shown in the data source window. You can add and remove registrations or change them when a database document has been moved.

[TABULAR SOURCE DATA] ---> [Database Document] ---> [Mail Merge Document]
Tabular source data can be any kind of true database, a directory of dBase files, text files or a spreadsheet document.
The mail merge document will always request its data from a database document which provides the actual connection to the source.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Corkran
Posts: 13
Joined: Tue Dec 01, 2020 12:38 am

Re: Printing Labels from "calc" file

Post by Corkran »

I have followed all directions. I can connect the .Odb file to my spreadsheet but the wizard does not create the .Odt file (that I can find) It creates the .Odb file of 2kb. but not the .Odt file you suggest I print or save and print later.
Windows 11, OpenOffice 4.1.13
User avatar
DiGro
Posts: 195
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: Printing Labels from "calc" file

Post by DiGro »

____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
User avatar
Villeroy
Volunteer
Posts: 31324
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Printing Labels from "calc" file

Post by Villeroy »

File>New>Labels...

Tab #1
Select the label type (for instance Avery Letter Size, type 5159)
Select the database, the table and add fields to the left box which represents one label. You may also type in additional fixed content.

Tab #2
Shows the layout setting for the chosen label type. You may use this dialog page to compose your own label layout. "Vertical pitch" is the distance between a label's upper border and the next upper border. "Horizontal pitch" is the distance between a label's left border and the next left border.


Tab #3
[X] Synchronize contents (check this)
The first label will be editable for editing and fine tuning. The other labels will be linked to the first one.

Confirm this button with [New Document] and save that document.
The document contains labels as tiles of text frames with mail merge fields. The first frame is the editable one, the other frames are write protected and linked to the first one.

Example document connected to the "Bibliography" database: http://forum.openoffice.org/en/forum/do ... hp?id=8714

P.S. The layout part works slightly different when you downloaded a template from the internet.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Printing Labels from "calc" file

Post by John_Ha »

See Printing Mailing Labels - it's page 310 in the Writer Guide.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Printing Labels from "calc" file

Post by John_Ha »

See Printing Mailing Labels - it's page 310 in the Writer Guide.

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply