Convert Text Doc To Base

Discuss the word processor
Post Reply
Fao
Posts: 19
Joined: Thu Jan 18, 2018 4:31 pm

Convert Text Doc To Base

Post by Fao »

I created a table, I thought I created it in OO Writer but I'm not sure, I can open it with Writer but windows doesn't give an extension for this file (like it does for other files, since I went into "Tools" and changed the setting to show extensions). Windows just lists the name of the document, with no extension (as opposed to other documents in the folder, they may have an extension such as "jpg" or "odt", for a couple of examples). I'm not sure how much/whether that even matters, but I guess it could be part of my problem. I decided this document would be much better as a data base document, I would add a lot of fields (they would be too narrow in a table, if I go beyond the current four columns). I probably need to start by saving it as a Writer file, with the extension "odt", I guess, but is there a way to open it in Base? (I think I can figure out how to edit it, such as adding those fields, if I could open this text document in Base).
OpenOffice 4.1.2 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Text Doc To Base

Post by Villeroy »

The name has no influence on the content of the file. Naming a file with this or that extension changes the name, the display icon and the program that will be tried to open the thing on double-click. You are free to name it *.mp3 but it won't turn into music.
Just open the file with OpenOffice and see. If you really created the file with OpenOffice, it will most likely detect the type of file by itself and use the right component. Once opened, menu:File>Properties... shows more info on the [General] tab.
If OpenOffice fails to open the file, attach the file to your next message so someone can have a look at it. A real operating system (anything but Windows) comes with some tools on board "sniffing" at files to determine the most likely content type.

If you want to know beforehand: Append the .zip extension and open the file with your zip tool which will fail if it is not a zip archive.
The Open Document Format is a bundle of xml files within a zip archive. If it is a zip archive with an element "mimetype" you can open that element with a text editor and when it reads "application/vnd.oasis.opendocument.text" then it is a Writer document.
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
Fao
Posts: 19
Joined: Thu Jan 18, 2018 4:31 pm

Re: Convert Text Doc To Base

Post by Fao »

Thanks for that reply Villeroy but I am still looking for an answer to my question. I have no problem opening this file, it is a text file and will be opened by whatever word processing type of program exists on the machine I try to access it from. The extension can make a difference, not sure if it has anything to do with this situation but there just are situations where a program wants a particular extension in order for it to play with the file properly. I just find it strange that this particular file has no extension, Windows just names the type as "File" and there is no extension (characters after the final '." such as rtf or txt or pages, for a few examples of common text document extensions. Windows or OsX (I have limited experience with other OS's) adds the appropriate extension to files, I find this odd that it give no extension to this file and wonder if this may be part of my problem I have no problem with opening this file, my question was is there a way for this suite of office programs to open a text document as a data base file? It is a table, the table will be difficult to read once I add a few more columns, would be much easier to deal with if those column headings were fields and the information beneath them made up the data in that field in each record of the data base; my question is, is there a way, other than starting from scratch, to turn that table in a text document in to a data base file?
OpenOffice 4.1.2 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Text Doc To Base

Post by Villeroy »

Just append .odt to the file name if it is a ODF text document or .doc if it happens to be a Word document. menu:File>Properties... tab [General] reports the file type once you opened it with OpenOffice. Always let MS Windows show the file name extensions. The default setting to hide the extensions of known file types is one of the most destructive nonsense in the history of desktop computing. It leads to persistent misunderstandings about applications and file types.

Why do you want to have your text table in a database? Is it just a layout issue because the cells do not fit on the virtual print page? Select the whole table, open a spreadsheet and call menu:Edit>Paste-Special (Ctrl+Shift+V). I would recommend to paste raw data as "unformatted text". Now you have a table with raw data and no page layout limitations.
If you want a database, save that spreadsheet as dBase (*.dbf) in a dedicated directory (dBase is a database in a directory).
Then connect a Base document to the directory:
File>New>Database...
[X] Connect to existing db...
Type: dBase
Specify the directory of your dBase file(s)
[X] Register the database
Save the database.

This connection of a Base document to a dBase directory is still a little bit limited but the easiest method to create a database from scratch and populate it with data.
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
Fao
Posts: 19
Joined: Thu Jan 18, 2018 4:31 pm

Re: Convert Text Doc To Base

Post by Fao »

Thanks for that reply, there is a lot to digest there and I may not get around to it today but this is what I wanted, I want to learn about what this suite can do (I'm sure I will pick up a lot of cool things along the way), quick and easy is hardly a priority. It was a no-particular-extension file, with the document opened in Writer I saved it with the extension "odt", so it is now saved as an ODF Text Document. I think you're saying to open the spreadsheet program and import this table's data into a spreadsheet (possibly using copy/paste), then to subsequently save that as a data base file? Alright, if I understand you correctly I will give that a shot.

There are a lot of reasons why I want to make it a db file, not the least of which is the learning experience, but on a practical level there are many advantages to a db over a simple table. There is the look, reason enough right there (if I were to have a table with maybe eight columns, I'd be able to fit like sever or eight characters in each box before it expanded to one more cell's height), but I also want the ability to manipulate the data, a table is useless in that sense.

I might get frustrated and just give up and start from scratch but I'm not nearly there yet, gonna try to save it as a spreadsheet then see if I can save that spreadsheet as a database and make that into what I need.
OpenOffice 4.1.2 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Text Doc To Base

Post by Villeroy »

If a spreadsheet serves your needs, save a spreadsheet. Then you can connect a Base document to that spreadsheet but you can not edit the data in the Base component. In most cases a Base document does not store any data. Most Base documents are connected to some tabular data source which may be a directory of text files, a directory of dBase files, a spreadsheet document or one of many professional database products. Base is about reusing existing table data without bothering about file formats. Just keep your existing data where they are and connect a Base document. A Base document works as a data provider from their connected sources to office documents.
There is one special type of Base document which embeds a whole database within the Base document. This is what you get when you create a new database from scratch.
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
Fao
Posts: 19
Joined: Thu Jan 18, 2018 4:31 pm

Re: Convert Text Doc To Base

Post by Fao »

That would not work for me in this case, I would update the data as circumstances change, maybe I will have to start from scratch I often find a database the most convenient format to work with, you can see all the data for a record on one page, a text field with a lot of date you can make a big square box for to make it easy to read, if you want all fields with a particular text (like a drop down box field with limited possibilities for what data will go there) you can get only records where that field contains that, if you want to look at a (spreadsheet-like) list you can do that and sort entries in whatever order makes the most sense at that moment. I find data bases very useful for everyday tasks in a lot of cases, but I need to be able to update things (can I do so from the Math component, I mean will it also update in the Base component? - if so, then I do want to figure out how to do that, attach a db file to the spreadsheet)0.
OpenOffice 4.1.2 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Text Doc To Base

Post by Villeroy »

Copy to spreadsheet, save spreadsheet as dBase file in a dedicated folder, use Base with a connection to the dBase folder.
Add input forms and reports to the Base container.
(or use a spreadsheet as a database. spreadsheets can have multi-line text)
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
Post Reply