[Solved...ish] Export/Import Question
-
- Posts: 4
- Joined: Wed Nov 30, 2016 7:01 pm
[Solved...ish] Export/Import Question
Hi there,
A colleague has compiled a list of contact information in our company over the last few years, and did so in ODT for simplicity's sake as the document also contains the emergency procedures and regulations of each department. I've now been asked to transfer this document into ODS, and am only now realising there appears to be no easy import option. When I save the document as TXT and import with tab seperation, only the first column lines up, while the rest of the data is peppered over the next 3-10 columns depending on surname length, because shorter surnames required more tabs to line the phone numbers up in the ODT.
So my question : how do I import ODT into ODS, or export ODT to ODS, in such a way that I get the same columns in the ODS as in the ODT?
A colleague has compiled a list of contact information in our company over the last few years, and did so in ODT for simplicity's sake as the document also contains the emergency procedures and regulations of each department. I've now been asked to transfer this document into ODS, and am only now realising there appears to be no easy import option. When I save the document as TXT and import with tab seperation, only the first column lines up, while the rest of the data is peppered over the next 3-10 columns depending on surname length, because shorter surnames required more tabs to line the phone numbers up in the ODT.
So my question : how do I import ODT into ODS, or export ODT to ODS, in such a way that I get the same columns in the ODS as in the ODT?
Last edited by Inservio Letum on Wed Feb 26, 2020 11:56 am, edited 2 times in total.
- MrProgrammer
- Moderator
- Posts: 4908
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Export/Import Question
Review [Tutorial] VLOOKUP questions and answers. Perhaps you can use the Merge Delimiters option. If you need additional assistance attach your original Writer document demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself). Indicate clearly what your goal is — what data in what columns. If volunteers have to guess at your objective, you may be disappointed.Inservio Letum wrote:When I save the document as TXT and import with tab seperation, only the first column lines up, while the rest of the data is peppered over the next 3-10 columns depending on surname length, because shorter surnames required more tabs to line the phone numbers up in the ODT.
Edit: Oops. Intended link was [Tutorial] Text to Columns |
[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Export/Import Question
That's probably because the default tab stops were used instead of user-defined tab stops. When a user-defined tab stop is inserted in a paragraph, the default tab stops to the left of the user-defined tab stop are removed and only one tab needs to be inserted between the columns.Inservio Letum wrote:...the rest of the data is peppered over the next 3-10 columns depending on surname length, because shorter surnames required more tabs to line the phone numbers up in the ODT.
AOO 4.1.14 on Ubuntu MATE 22.04
Re: Export/Import Question
You could try using Text to Table to convert the relevant parts to a table, then simply copy the table into a spreadsheet.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
-
- Posts: 4
- Joined: Wed Nov 30, 2016 7:01 pm
Re: Export/Import Question
Apologies for my aparent lack of reply, I was unaware waterfox apparently no longer refreshes tabs when it detects changes. Was wondering why nobody answered, entirely my bad.
Here is one page of the document, with names & numbers anonymised :
Here is one page of the document, with names & numbers anonymised :
- Attachments
-
- Nightmare.odt
- (19.14 KiB) Downloaded 111 times
Re: Export/Import Question
This is human readable information. Someone has to write a program in order to convert this into machine readable data sets. A machine readable data set would look like this:
From this most simple, machine readable data layout it would be even possible to automatically generate something like your text document.
Code: Select all
Name Phone Email Department Position(column labels)
---------------------------------------------------------------- (data below labels)
name1 12345 x@y.org Wijkvereniging Administratie
name2 54321 a@b.foo Wijkvereniging Leden-administratie
name3 98765 d@c.com Commissie Voorzitter
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Export/Import Question
Please do not attack the person who created the document. They knew no better.Inservio Letum wrote:Apologies for my aparent lack of reply, I was unaware waterfox apparently no longer refreshes tabs when it detects changes. Was wondering why nobody answered, entirely my bad.
Here is one page of the document, with names & numbers anonymised :
A very crude method is to go through the document with Find & Replace, Regular expressions enabled, two or three times.
First pass
Find \t\t\t\t
Replace \t
Second pass
Find \t\t\t
Replace
\t
Third pass
Find \t\t
Replace
\t
This will not solve all the problems but a manual edit either in Writer or Calc should be fairly easy unless you have hundreds or thousands of pages.
I hope someone has a better solution.
LibreOffice 7.3.7. 2; Ubuntu 22.04
-
- Posts: 4
- Joined: Wed Nov 30, 2016 7:01 pm
Re: Export/Import Question
Mr. Curtain, I'm not sure where you surmised I was on the offensive (let alone attacking anyone) but I'll chalk that up to a misunderstanding.
In the absence of alternative idea's I tried your F&R solution on a copy of the document, which was surprisingly effective, if alarming to the naked eye prior to import. As this effectively alleviates the problem I think I can mark this as solved, although it would be nice --if and when someone does come across a way to do this as a simple import/export-- to see such solutions posted here.
Thank you all for your help thus far
In the absence of alternative idea's I tried your F&R solution on a copy of the document, which was surprisingly effective, if alarming to the naked eye prior to import. As this effectively alleviates the problem I think I can mark this as solved, although it would be nice --if and when someone does come across a way to do this as a simple import/export-- to see such solutions posted here.
Thank you all for your help thus far
Re: Export/Import Question
Sorry about the "attack" comment. I have a weird Canadian sense of humour. It was a joke.Inservio Letum wrote:Mr. Curtain, I'm not sure where you surmised I was on the offensive (let alone attacking anyone) but I'll chalk that up to a misunderstanding.
In the absence of alternative idea's I tried your F&R solution on a copy of the document, which was surprisingly effective, if alarming to the naked eye prior to import. As this effectively alleviates the problem I think I can mark this as solved, although it would be nice --if and when someone does come across a way to do this as a simple import/export-- to see such solutions posted here.
Thank you all for your help thus far
I am glad that my approach works. It is a brute force approach but sometimes they are the best. It would be nice to see better approachs but I am not sure they exist.
LibreOffice 7.3.7. 2; Ubuntu 22.04