SHEETMAGIC
Board Regular
- Joined
- May 3, 2005
- Messages
- 209
Hi folks,
A few times a month I receive a TSV file that I want to add to an Excel sheet. The first row is always the same, consisting of the column titles.
The remaining rows vary in number. Sometimes there's just one, other times three (and in the future perhaps more).
The files come with consecutive numbering, in the form of sales-comp-#.tsv - # being a number one higher than the files before it. I currently have files 1 to 77 to import. The next one I receive will be number 78.
I have tried recording a Macro but was not sure how to handle that fact that the data needs to be appended into the next available row in the same spreadsheet each time. If there were always the same number of new rows being imported, I figured there'd be a straightforward way to increment by that number, but as it varies, I got stuck.
The file extension can be renamed to CSV if that helps in any way. They come in as TSV (the data is tab delimited) though. But I noticed Excel does not include TSV in it's import file type... so I was having to switch to ALL FILES.
Ideally I'd like a macro or script associated with a button, which will find any new files and important them. In which case it might need to rename the previously imported ones, so they can be easily ignored the next time.
Any help would be greatly appreciated.
With thanks,
Jonathan
I am using Excel 14.1.4 on Mac OS X
A few times a month I receive a TSV file that I want to add to an Excel sheet. The first row is always the same, consisting of the column titles.
The remaining rows vary in number. Sometimes there's just one, other times three (and in the future perhaps more).
The files come with consecutive numbering, in the form of sales-comp-#.tsv - # being a number one higher than the files before it. I currently have files 1 to 77 to import. The next one I receive will be number 78.
I have tried recording a Macro but was not sure how to handle that fact that the data needs to be appended into the next available row in the same spreadsheet each time. If there were always the same number of new rows being imported, I figured there'd be a straightforward way to increment by that number, but as it varies, I got stuck.
The file extension can be renamed to CSV if that helps in any way. They come in as TSV (the data is tab delimited) though. But I noticed Excel does not include TSV in it's import file type... so I was having to switch to ALL FILES.
Ideally I'd like a macro or script associated with a button, which will find any new files and important them. In which case it might need to rename the previously imported ones, so they can be easily ignored the next time.
Any help would be greatly appreciated.
With thanks,
Jonathan
I am using Excel 14.1.4 on Mac OS X