atom-tablr icon indicating copy to clipboard operation
atom-tablr copied to clipboard

Auto-detect header?

Open bronson opened this issue 10 years ago • 4 comments

I'm not quite sure how you would detect it but, if it has one, displaying the CSV's header would be nice.

Maybe add a pencil-everything button that would copy everything in row 1 into the A/B/C/D header displayed now?

And maybe if there are columns that are 100% digits except for the first row, you could just do this automatically?

screen shot 2015-07-31 at 12 59 30 am

Looking forward to auto-adjusting table widths!

bronson avatar Jul 31 '15 08:07 bronson

I made some research prior to implementing the csv support and it appears there's no reliable way to detect if a csv file has a header or not. What I can do though, is to have a command to use the first row as header after having opened the table, so that you can fix that if you have forgot to active the setting when opening the file.

abe33 avatar Jul 31 '15 09:07 abe33

That sounds like a fine solution.

Activate what setting when opening the file? A setting when opening with fuzzy-finder?

bronson avatar Jul 31 '15 10:07 bronson

When you open a csv (whatever the mean) there's the initial dialog when you can define the parsing setting: sample_csv_-_users_c_nehemie_gsoi_newho_vendor_gsoi_style-framework-_atom

These settings are kept and serialized for later use. But if you have checked the Remember my choice checkbox you won't see that dialog a second time (it then stores the mode you used and use it immediately when reopening again the same file). Anyway, there's still a lot of little things that can be improved, I placed my focus on making the main workflow working so I didn't fine tune every little details.

abe33 avatar Jul 31 '15 11:07 abe33

Any plans to do the same for a row ID (as apposed to a column ID, aka Header)?

dnk8n avatar Jul 06 '16 12:07 dnk8n