I am hoping to incorporate the CSV pack with a doc I am using. My use case is importing CSV files from vendors with price lists. The issue I am running into with the pack is some vendors don’t include column headers in their files or the headers are on row 2 or 3 of the file. The columns are always the same for each vendor (for example, Vendor A always lists the price in column 4).
Is there a way to use the column number (from the left) as a way to map the column in the pack?
Have you tried using coda’s native CSV import functionality? We updated it to match the pack’s abilities.
Try /csv or /import in your doc and you should be able to try it out.
That also supports the case where column headers are not present in the file.
In this application, I want the import to be handled with actions from a button, and from what I know about the native CSV importing, it can’t be accessed from a formula.
Ah I see. Yeah the native CSV import currently doesn’t work from a button and the user has to input
/import to initiate it. If you don’t mind me asking, what’s your specific use case?
Want to make sure to convey the request for a button initiated import back to the team
As far as the pack goes, my suggestion would be to customize this template to your needs. You can use this formula from the CSV importer pack to modify which columns are used from the CSV (note that it always returns back the column names in order). However, the data in that first row would be lost sadly.
The pack code is also available here in case you’d like to directly modify it to your needs
My use case is a restaurant inventory management system and the part that this question relates to is importing weekly price lists from vendors that are in a CSV file. I don’t want to share the doc publicly, but I will message you the doc link.
My goal is to be able to give this doc to a customer and have them set up new vendors themselves, without having to edit formulas or anything technical. When they set up a new vendor, they would need to be able to easily set up the import process for that vendors price sheet to pull the pertinent information out (item number, price, etc.) I’ve got it set up in a wonky way right now where the customer copies and pastes from the open CSV file, but it is not very user friendly.
Totally makes sense. Relayed use case and request to the team. Hope you’re able to find a solution that works with the pack formulae!