Importing a CSV

Any tips on CSV imports?
Peculiar how this does not appear simple, because Zotero has the ability to export CSVs.

Thanks!
  • CSV is not a standardized format for bibliographic data (nor is there a standardized 'bibliographic CSV' or the like), so Zotero doesn't support CSV (or any other tabular format) on import. What's the use case?
    I
  • We purge ILL request history from ILLiad twice a year and users would like to retain their request history in Zotero.
  • I only see the user-facing side of ILLiad and that doesn't have CSV/tables, to I'm not entirely sure how this looks on your end, but couldn't you with relative ease create simple bibliographic format like RIS or BibTeX (which would also be more flexible than CSV)? If you search the forums for import from Excel and the like, the standard workaround is to use Excel concat to produce BibTeX (which has the benefit of caring less about new lines than RIS). Rather than leaving that to endsures, a script could achieve something similar.
  • yeah, I'd create an Excel sheet (or, if you're so inclined, R or python script) that converts that into BibTeX. Getting that into any format Zotero would even conceivably import as a table is going to be a mess.
  • So no simple solution?
  • I'm giving you the easiest solution I can think of. Whether you consider that simple or not is up to you :D
  • Thank you, Adam.
  • Is there an easier solution now to the importing issue with csv?
  • No change on this
  • Hi Adam —
    I've noticed your helpful comments on this forum while researching how to use Zotero.
    I'm new to Zotero and I thought my programming days were long over. But my spreadsheet databases of references need to be converted to .csv files and then parsed into the format of .bib for Zotero to import. I don’t see any way other than a Python (or similar) program. With about 1500 references to get into Zotero, entering those manually is a brief career and not a “task”. So I guess I'm going to resume programming and learn Python. Yikes!
    I'm really too old for this…
    Gary
  • You can do this using CONCAT in Excel along the lines of
    CONCAT("@book{", B2, ", title = {", C2, "}, author ={", D2 etc.)

    This sort of restructuring of semi-structured into structured information is also something LLMs are great at -- you can give it your CSV in chunks of hundred (might be able to go bigger depending on their context window) and have it spit out RIS to then import into Zotero -- or they'd write the python script for you.

  • Thanks, Adam -
    I'm accomplished with Excel. But parsing complex fields would have required using Macros. For example, my author field is in the format
    Last Name1, First Name1; LN2, FN2;... with an unknown number of authors. Also, all of my source data files (PDFs of books, book excerpts, articles, etc.) are stored in DropBox. Cleaning up the paths so Zotero/ZotFile can link the records with the digital location (or the Shelf location for physical books in my personal library) was a bit more than an Excel exercise. Path names with "\" and "_" needed to be parsed because the .bib file saw those characters as escapes.

    I would have much preferred to use Excel, since I know its functions pretty well. But exception processing in some fields required IF...THEN...ELSE logic. I saw programming as the most bullet-proof approach. I am not a Python programmer. Indeed, at my age I'd hoped not to be a programmer of any kind. But I couldn't see how to use Excel gracefully.

    Happy to learn your thoughts...
Sign In or Register to comment.