I would like to automate creating a text file of one column’s data.
I think this post and solution solves it, but I’d need to modify the code (I don’t need every column) and I’m a beginner so I don’t know how to implement any of it!
Any help would be appreciated!
============
I wrote a bunch of details out before finding that post/solution, so only read on if you need/want more detail…
The context is I am creating m3u files (normal text file but with extension *.m3u instead of *.txt) to transfer iTunes playlists to a USB for my car. My Calc sheet is already set up to read and update from the text file iTunes exports using Link to External Data, each playlist in its own eponymous sheet. I then have a column with a formula to alter the location path slightly. I copy this column into a text file named “[Playlist1].m3u”. I’ve been doing these steps manually, but as there are 20+ playlists, I would really like to learn how I can automate the process.
I couldn’t find how to only get one column, so have downgraded my expectation to having to create a separate sheet holding only that column’s data. My first attempts with macros didn’t work. I tried to record a macro to:
-
Copy the sheet’s name (using Rename Sheet, ctrl+c, enter)
-
“Save a Copy” (Save a copy, change Save as type to Text CSV, click File Name, ctrl+v and type".m3u", enter, enter, enter).
Neither of those steps worked and being a total newbie to macros, I’m not sure if I’m doing it wrong or if I’ve run into the limitations of macros. The code shows for step 1 it hardcoded whatever the current sheet’s name is (effectively always renaming the sheet to that) and did not record anything once the Save a copy dialogue box opened.
Let me know if macros are the way to go or another solution is applicable.
Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL