tsv as extension option when saving files

Is there a way of adding “tsv” as a file type available in the dropdown menu when saving a spreadsheet in calc? I understand how to specify details regarding value and field delims in the “Export as text file” dialogue box, I would just like the option to be there to select “tsv” already the step before, and for this to trigger tab as sep by default.

As it is now, I save as “csv”, but with tab as separator and then manually go in and change the file extension.

Grateful for any help!

You can post an enhancement request at https://bugs.documentfoundation.org/enter_bug.cgi

Hello,

i did not find a way to extend the existing save types, but i still wanted to help you out.
Here is what i came up with.

First import the following macro (“Tools” → “Macros” → “Edit Macros…” ) It can save any open csv file as a “real” tsv file with the same name and location but tsv extension.

Sub SaveTSV
  Dim args(1) as new com.sun.star.beans.PropertyValue
  args(0).Name = "FilterName"
  args(0).Value = "scalc: Text - txt - csv (StarCalc)"
  args(1).Name = "FilterOptions"
  args(1).Value = "9,34,0,1,1/5/2/1/3/1/4/1"
  Dim parts 
  parts = Split(ThisComponent.getUrl(),".")
  Dim ext
  ext = parts(UBound(parts))
  if ( ext = "csv" ) then
    Dim newname
      for i = LBound(parts) to UBound(parts) -1
        newname = newname & parts(i)
      next
    ThisComponent.storeToURL(newname & ".tsv",  args())
  endif
End Sub

Second bind any Keyboard Key (for example any Function-key) that you like to call that macro.
Like this:


This should allow you to save a tsv copy of any opend csv very quickly
I know it’s not what you requested, but maybe it’s still useful for you.

Hope that helps.


To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!


Have a nice day and let’s (continue to) “Be excellent to each other!”


Ask / Getting Started:

Ask/Getting Started - The Document Foundation Wiki
<br/

Thanks! I really appreciate the effort. It’s indeed not really what I wanted, but it is something. Thank you for your kindness.