updating CSV files in Numbers

So I've got an old Excel file with a master worksheet that draws upon data from 7 other csv files that are updated on a weekly basis. The master file is saved with its working file name and then links to each individual csv which also have their own name. After 3 hours of searching, it seems like this won't be possible in Numbers. In addition to having to messily copy an updated individual sheet to the 'master' file once a new sheet is available, the links to the original file name will not be correct. And so, the links will have to be redone.


Am I missing something?

MacBook Pro 15″, macOS 10.14

Posted on Jun 10, 2020 11:01 AM

Reply

Similar questions

8 replies

Jun 11, 2020 4:31 PM in response to ricecooker47

If you want to import a new CSV, do it in a way that overwrites the old one.


  1. Create a table for the imported CSV data. All references to the data will be made to cells in this table.
  2. In Finder, select the CSV file and Copy
  3. In Numbers, select cell A1 of the table then Cmd A to select all cells then delete to delete the content of all cells in the table prior to filling it with new data.
  4. In Numbers, select cell A1 of the table and Paste. The CSV will be imported to the table, overwriting the older data.


You don't necessarily need step 3 but it is a good idea to ensure no old data remains if the new CSV has fewer rows or columns than the old one or is malformed in a way that does not overwrite the ends of all rows.

Jun 27, 2020 8:15 PM in response to ricecooker47

ricecooker47 wrote:

For example, a new CSV of data starts at A10 (call this CSV 2), another at A37 (CSV 3) and so on, so the select all/Cmd A will only update from A1 to A10 of the first CSV (CSV 1).


That's very "Excelish." In Numbers you will probably find it more efficient to bring csv1 into one table, csv2 into another table, etc., rather than into different ranges of the same table.


If you do that and you have to update often, a script can easily update the different tables with data from the new csv's with one click.


However, more specific information on your setup would be needed before suggesting how to do that.


SG

Jun 27, 2020 9:16 AM in response to ricecooker47

Barry was telling you how to make a copy of the old table of data before overwriting it. Cmd A followed by Copy, create a new sheet, Paste into the default new table on that sheet to save all the old data.


I was explaining how to get all your CSV data into tables, which I assumed would be pasted to separate tables. If they are to be pasted into one table, Cmd A followed by delete will delete all the content of the entire table, preparing it for your new data. That step only needs to be done once if all of your CSVs are going into the same table. Then seven times you do the steps of Copy CSV file, select starting cell, Paste.


There is yet another method that might work for you to import the data from your CSVs. It requires your CSV files to always have the same number of rows. The CSVs can be different from each other but each one has to maintain its same length (number of rows) every time if you want the cells to be in the proper places in your table. Instead of the method of copying the CSV file, selecting a starting cell, then pasting, you can simply drag each CSV to the table one at a time and it will insert them one after another going down the table. But if the length of one of the CSVs changes, it will throw off where the next one(s) begin.

Jun 12, 2020 6:46 PM in response to ricecooker47

HI RC,


If you DO need to retain the old CSV data, add these steps before copying the data from the new CSV file:


A: Click A1 of the table containing the current data values, press command A to select all cells in that table, then Copy.

B: Add a new sheet to the document. Click on cell A1of the Table included on the new sheet. Paste.

C: Name the new sheet and its table.


Assuming that you have already done step 1 of Badunit's instructions, follow his steps 2, 3, and 4 to bring in the new data from the new SCV file.


You'll now have the new data in the existing table, and accessible to all of the formulas, which have not been disturbed, and the previous data from that table now archived on a new table in the same document.


Regards,

Barry


PS: Even simpler, you could just save each CSV file with a distinct name, and keep the old data there.

B.

Jun 10, 2020 12:22 PM in response to Yellowbox

Yup, that much I figured out. But is there a way to reimport the new csv as a new sheet/tab while still maintaining the original links/formula. For example, if I have link to cell J13 in a sheet called 'Today' and tomorrow I want to import a sheet with new values, is this possible. (As far as I can tell, if I try to rename this new sheet 'Today', I will get error messages on the formulae.

Jun 27, 2020 5:44 AM in response to Barry

Thanks Barry, just belatedly getting back to this. My original Excel 'master' table references 7 csvs -- there would be no easy way of updating the new sheets other than manually copying and pasting the data from each csv, correct? For example, a new CSV of data starts at A10 (call this CSV 2), another at A37 (CSV 3) and so on, so the select all/Cmd A will only update from A1 to A10 of the first CSV (CSV 1).


rc

Jun 28, 2020 11:02 AM in response to SGIII

Thanks SG & Badunit (and sorry for failing to acknowledge your previous suggestions.) The CSV file sizes will change on occasion; I usually update this file on a weekly basis from the constituent CSV files new versions of which are available daily. Here's an 'Excelish' snapshot of what I've been working with:



The 'dynamic' elements needed from the CSVs are in "Units" and "Current Price". In the Excel version, these are all just built as links to the individual CSV sheets. So is something similar available without too much manual manipulation?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

updating CSV files in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.