Adding an option to save tab delimited txt for Calc

Discuss the spreadsheet application
Post Reply
frustratedcalc
Posts: 5
Joined: Mon Sep 21, 2009 1:52 pm

Adding an option to save tab delimited txt for Calc

Post by frustratedcalc »

Hello,

I know this is an issue that has come up before. Let me explain why the new post.

I am currently migrating an office from windows server over to a linux environment, and there is ONE thing stopping the process, and that is the inability to have a simple way to save as tab delimited txt.

If any of you have ever worked with office staff, you would know that it is impossible to get them happy about having too many menu options to fill out. Also, this is were things often can and do go wrong. The current solution in openoffice.org to save tab delimited files is simply not a solution at all, unless it for a one time operation. You cannot truly expect people to repeat this procedure every time they save a tab delimited spreadsheet if they save them repeatedly throughout the day or week.

They currently use wordperfect, and it is already pushing the limit getting them to change file type, let alone use an edit function and having to change what is in the delimited boxes each time. When editing the filter, it does not save the changes.

My question then, as they never need the .csv extension, and the developers of openoffice.org seem to ignore all user requests to add this very basic and common option for saving spread sheets, is there some way I can go in and permanently modify the .csv extension? Or is there some way to add a new filter that simply copies the .csv extension, but changes it to a tab delimited, no text delimitation and a .txt extension?

You seem to all want to push linux and alternative office environments such as openoffice.org to the mainstream user, why do you ignore the desires of the mainstream user because you "know what is better?".

Thank you for your time.
Openoffice 3.0.1
Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimeted txt for Calc

Post by Villeroy »

CSV :?: Why do you confront your totally comp-illiterate office workers with a raw data exchange format like that one?
Why do you expect them to load this database export format into the flea circus of a spreadsheet where untrained users tend to destroy the row sets with a single wrong click?
The csv comes from a database? OOo has a database program to access databases directly!
If the csv comes from a remote database you can not access, can't the database export the more appropriate dBase format?
It's possible to let the users edit csv and dBase tables by means of input forms without having to store anything.
[Solved] SQL: from OOo Base to tab-delimited text

This is the right tool to confront Windows users with csv directly: http://csved.sjfrancke.nl/
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
frustratedcalc
Posts: 5
Joined: Mon Sep 21, 2009 1:52 pm

Re: Adding an option to save tab delimeted txt for Calc

Post by frustratedcalc »

This is your response?

Let me phrase it a different way. The office currently uses worperfect office suite.

This is a feature provided by the wordperfect office suite.

This is a feature they use in the wordperfect office suite.

They work on the file in the quattro pro format. When they want to run a script which parses the file, they need to save the file as tab delimited and then run the script.

Its simple, it works, it saves money to do it this way.

Correct me if I am wrong, but doesn't openoffice.org strive to provide users with the same or better feature set provided by ms office and other competitors?

Instead of ranting, could you at least direct me at the appropriate developer documentation on filters so that I can simply copy the csv filter and change the default options, thus solving my problem?

what is with this attitude when it comes to someone using the program differently than you do?
how is any of what you said just now helpful in any way, shape, or form?

How does any of what you said actually solve my problem?
Openoffice 3.0.1
Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimeted txt for Calc

Post by Villeroy »

So the other office suites you mention have no database component to deal with row sets like OpenOffice.org Base can do to serve all office documents :?: You really like to load row sets directly into text processors and spreadsheets? What an awful mess.
You have some coder who writes scripts. Can't that guy adjust one or two of the dozends of existing OOo-macros to import and export your particular flavour of csv :?: No :?: That's what I expected.
If stupid Basic is not good enough, OOo comes with Python as optional macro language. Python comes with an awsome csv module. http://www.linuxjournal.com/content/han ... les-python
If you would really spent your time searching instead of ranting you would find hundreds of relevant pages.

But you do not even tell us your problem. Why can't your users save a sheet with tabs as delimiter? Two clicks too many?
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
frustratedcalc
Posts: 5
Joined: Mon Sep 21, 2009 1:52 pm

Re: Adding an option to save tab delimeted txt for Calc

Post by frustratedcalc »

So your response to this lack of a feature that other programs provide is that its a stupid feature that no one should use?

The most frustrating part is whoever wrote the csv filter could write a tab delimited with no quotes filter in about, what, 2 minutes?

But due to pride and feeling that its a stupid feature anyway, it isn't done?

Is there a way to define custom filters permanently?
Is there some way for me to copy the csv filter, give it a different name, and simply change the defaults?
If someone can point me towards how to do this myself, I would be more happy to have a non-standard filter that I can simply install on the machines that need it. I don't care if it never makes its way into the mainstream openoffice.org

This would be a one time fix that would be permanent for this office's use of a "stupid" feature.

It would be much faster than re-writing all of the scripts, and then training the office staff to do something different than they are used to doing for years.
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Adding an option to save tab delimeted txt for Calc

Post by RoryOF »

Look at http://www.info-pack.com/csv2tab/

This may do what you want.
frustratedcalc
Posts: 5
Joined: Mon Sep 21, 2009 1:52 pm

Re: Adding an option to save tab delimeted txt for Calc

Post by frustratedcalc »

RoryOF wrote:Look at http://www.info-pack.com/csv2tab/

This may do what you want.
Thank you for the link.

The only problem is sometimes the data inside the spreadsheet contains commas, which is why the original scripts use tab delimited instead of comma. The other brand spreadsheets do not have the option of cell data being contained in quotes, at least not at the time of the scripts being written.
Openoffice 3.0.1
Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimeted txt for Calc

Post by Villeroy »

Except for the database there is no facility to store csv settings unless you program one. If I ever had to load csv into spreadsheets again, I would write such a facility to store named FilterOptions strings in OOo's XML configuration and load the names into the unused "Version" list box of the open/close dialog. Well, I don't care anymore since I find editing row sets in a grid-calculator too annoying and there seems to be not a single capable programmer among many millions of OOo users able to share such a thing. Only rants, rants, rants.

Firts step: Install http://extensions.services.openoffice.o ... h/node/mri and restart the office.
Open one of your text files and specify all the details as explicit as possible.
menu:Tools>AddOns>MRI inspects the API starting at the current document.
Double-click the line with property "Args".
Property "URL" contains the path.
Property "FilterName" shows "Text - txt - csv (StarCalc)" when you double-click on the word "Value"

Code: Select all

(1)
Handle                long                              0               [ReadWrite]
Name                  string                            FilterName      [ReadWrite]
State                 com.sun.star.beans.PropertyState  DIRECT_VALUE    [ReadWrite]
>>>>Value<<<<         any                               -ANY-           [ReadWrite] 
Property "FilterOptions" shows a string which represents all the settings you specified in the import dialog.
http://wiki.services.openoffice.org/wik ... CSV_Filter

http://www.google.de/search?q=FilterOpt ... utf-8&aq=t
The top 10 include this forum, in the other forum, and the official wikified documentation.

loadCOmponentFromURL is the method to load a file giving the path, the filter and the options.
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
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Adding an option to save tab delimeted txt for Calc

Post by TheGurkha »

We're not the developers, just users trying to help other users. The developers don't hang out here.. To report bugs or make suggestions, see this tutorial: [Tutorial] Reporting bugs or suggestions

This is the most flexible CVS editor I've seen. It should be able to massage the data into what ever format you need for import.
CSV Ed.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
frustratedcalc
Posts: 5
Joined: Mon Sep 21, 2009 1:52 pm

Re: Adding an option to save tab delimited txt for Calc

Post by frustratedcalc »

Villeroy,

Thank you for that last post, it was a useful pointer.
I can now see what the string is for tab delimiting.

Do you, or anyone else, know of a way to change the default string for exporting to csv? Is there somewhere that the default string is stored so I can make a one time change that sticks?

Tab delimited with no text delimitation shows the string 9,0,76,1

The CSV filter defaults this option to 44,34,76,1

Do you know if this value is hard-coded, or is it possible for me to simply change the default string?

The problem is not so much that openoffice.org cannot massage the data the way I want for exporting a text csv, but I am more trying to find a way I can change the default options so that the users would not need to change it each time, and could just select csv from the list of file formats, and it would use my option string instead of the current default.

They do not actually work from the text based spread sheet file, it is for the script and acts more like a temporary file that gets erased after they run all of the scripts. The scripts do work if the delimiters are changed manually each time the file is exported to csv, so the main thing is changing the default options string.

Thank you for your help so far.
Openoffice 3.0.1
Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimited txt for Calc

Post by Villeroy »

This would be a good question for the developer mailing list. I don't know such a configuration setting other than database files.
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
mriosv
Volunteer
Posts: 651
Joined: Mon Mar 09, 2009 1:12 am
Location: Galiza (España)

Re: Adding an option to save tab delimited txt for Calc

Post by mriosv »

Is not possible to record a single macro and assign an icon to do this?.
LibreOffice 3.5.4 AOo-3.4 on Win 7 Ultimate
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimited txt for Calc

Post by Villeroy »

mriosv wrote:Is not possible to record a single macro and assign an icon to do this?.
Did you try?
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
mriosv
Volunteer
Posts: 651
Joined: Mon Mar 09, 2009 1:12 am
Location: Galiza (España)

Re: Adding an option to save tab delimited txt for Calc

Post by mriosv »

I'm try now, and goes well. Save in CSV with tab delimiter.
LibreOffice 3.5.4 AOo-3.4 on Win 7 Ultimate
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an option to save tab delimited txt for Calc

Post by Villeroy »

Code: Select all

sub rec_tab_csv
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///tmp/tab.csv"
args1(1).Name = "FilterName"
args1(1).Value = "Text - txt - csv (StarCalc)"
args1(2).Name = "FilterOptions"
args1(2).Value = "9,34,76,1"

dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())


end sub

sub rec_space_csv
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///tmp/space.csv"
args1(1).Name = "FilterName"
args1(1).Value = "Text - txt - csv (StarCalc)"
args1(2).Name = "FilterOptions"
args1(2).Value = "32,34,76,1"

dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())


end sub
Indeed, the two recorded macros stored the filter options for a small list of 2 columns (text and decimal) with spaces and tabs, which may give a good starting point for a customized solution. This thread started with untrained users.
You need to implement the file picker dialog or determine the location programatically.
Is it possible to define a filter option string which applies tab-delimiters in all the customer's use cases?

The whole thing would be solved for 90% of the spreadsheet addicted if the dialog settings would be sticky. Currently, the database is the tool to import well defined and valid record sets from delimited text files. IMHO, all spreadsheets are unsuited to let untrained users edit row sets in text tables, despite the fact that most csv is loaded into Excel.
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
hasitruparel
Posts: 1
Joined: Wed Nov 04, 2009 5:28 am

Re: Adding an option to save tab delimeted txt for Calc

Post by hasitruparel »

Hello Villeroy,

I just started to use openoffice on Mac. I tried doing below list of changes to add a Save as TXT (tab deliminated) option in Openoffice and it did not work.

Can you please advice if there are any different commands for Mac?

Villeroy wrote:Except for the database there is no facility to store csv settings unless you program one. If I ever had to load csv into spreadsheets again, I would write such a facility to store named FilterOptions strings in OOo's XML configuration and load the names into the unused "Version" list box of the open/close dialog. Well, I don't care anymore since I find editing row sets in a grid-calculator too annoying and there seems to be not a single capable programmer among many millions of OOo users able to share such a thing. Only rants, rants, rants.

Firts step: Install http://extensions.services.openoffice.o ... h/node/mri and restart the office.
Open one of your text files and specify all the details as explicit as possible.
menu:Tools>AddOns>MRI inspects the API starting at the current document.
Double-click the line with property "Args".
Property "URL" contains the path.
Property "FilterName" shows "Text - txt - csv (StarCalc)" when you double-click on the word "Value"

Code: Select all

(1)
Handle                long                              0               [ReadWrite]
Name                  string                            FilterName      [ReadWrite]
State                 com.sun.star.beans.PropertyState  DIRECT_VALUE    [ReadWrite]
>>>>Value<<<<         any                               -ANY-           [ReadWrite] 
Property "FilterOptions" shows a string which represents all the settings you specified in the import dialog.
http://wiki.services.openoffice.org/wik ... CSV_Filter

http://www.google.de/search?q=FilterOpt ... utf-8&aq=t
The top 10 include this forum, in the other forum, and the official wikified documentation.

loadCOmponentFromURL is the method to load a file giving the path, the filter and the options.
OpenOffice 3.1 on Mac
Post Reply