Save configuration of CSV file(s)

Hello all

I’m looking to a way to “save” the setting I do for some csv file

I have a few number of csv file which are used by some process, and I need to edit them several time per day

Each time, I have to select the file, then in the “Text Import” window, select all columns and set them to “Text” (I had some issues with “Standard”), then press “OK”
When done, the file open in Calc, so I select all the columns (more than 20) then right-click, → “Column Width…” → tick “Default Value” → Ok
Then select row 8, → Menu View → Freeze Cells → Freeze Rows and Columns

Then I can start to work :slight_smile:

If you do that once from time to time, it’s OK, but 5 or 10 times per days , it’s annoying (and I can’t keep the file open !!)

Ideally, I would like to find an extension or a macro which will recognize the file I selected and will do all the repetitive tasks for me
And if it can do it for more than one file (not all the same settings) , that will be perfect

Do you know something which can help me ?

Best regards

ericc

Never use csv files. They only save one sheet, don’t save formulae or formatting - they only save names and numbers.

Always get the data into Calc and save as a .ods file.

Well I wasn’t expecting this answer :slight_smile:

It’s seems that I wasn’t clear enough

When I said :

csv file which are used by some process

I mean that files are parsed by a machine … and, despite all my efforts, for a machine, it’s thousand time more efficient to read a .csv than an .ods

Hope it’s more clear now :slight_smile:

And @JohnHa you’re wrong, it’s possible to save the formulas: FileSave as▸select CSV filter▸tick Edit filter settings▸tick Save cell formulas instead of calculated values

Regards

For macros to handle CSV files with specific options see this answer. The available CSV filter options are over there.

Ok, nice
This solve the first part : loading the file and “skip” the “Text import” window

As I already had some macro for the remaining point (column width and freeze view) , I will combine everything

An extension which can do everything automatically (remembering the settings for any given file) would have been better, but ok

Thanks