Turn a file into a widget
Import a text, Markdown, CSV, JSON or Excel file as a new Page or Table on your desk with Import file in the tool rail's Add widget menu.
Import file… reads a file from your computer and turns what is inside it into a widget you can edit. A text or Markdown file becomes a Page. A CSV file, an Excel file or a JSON list becomes a Table with its own columns and rows.
Use it when you want to work with the contents: rewrite the notes, sort and filter the rows, link them to other widgets. If you only want to keep a file on the desk as it is, such as a PDF or a picture, drag it onto the desk instead. See Drop files, links and apps onto a desk.
Before you start
- Plans: importing works on every plan.
- A desk open: the import lands on the desk you are on.
- File types: .txt, .md, .markdown, .csv, .json, .xls and .xlsx.
What each file becomes
| File | Becomes |
|---|---|
| .txt | A Page. Each block of text separated by a blank line becomes a paragraph. |
| .md or .markdown | A Page, with headings, bulleted and numbered lists, checklists, quotes and code blocks kept. |
| .csv | A Table. The first row gives the column names, and every other row becomes a row. |
| .xls or .xlsx | A Table made from the first sheet of the workbook. The first row gives the column names. |
| .json holding a list of records | A Table, with one column for every field name and one row for every record. |
| Any other .json | A Page with the file's name as a heading and the data underneath in a code block. |
The new widget is named after the file, without its extension, so Q4 launch plan.csv becomes a Table called Q4 launch plan.
Import a file
- Open the desk.
- Point at the tool rail on the right edge of the desk, the strip with the construction icon, so it opens.
- Click Add widget. The Add to this desk menu opens.
- Scroll to the bottom of the menu and, under Import, click Import file….
- In the Import file window, choose your file and open it.
The new Page or Table appears beside the widget you last worked on, to its right if there is room and otherwise to its left. If you have not worked on a widget yet, or it is off screen, the new widget appears near the middle of what you can see.
How a Table is set up
When a file becomes a Table, PlexiDesk sets each column's type from the first 20 values in that column:
- If every value is a number, it is a Number column.
- If every value is true or false, it is a Checkbox column. In a CSV or Excel file, yes and no count too.
- If any value is longer than 80 characters, it is a Long text column.
- Anything else is a Short text column.
An Excel file can also get Date columns, when every value in a column is a date.
A few more things to know:
- Rows with nothing in them are left out.
- A column with no heading is named Column 1, Column 2 and so on, by its position.
- In a JSON list, a field that holds another list or record comes in as text.
- A JSON file counts as a list of records when it is a list and every item in it has named fields, for example
[{"task": "Draft brief", "done": false}]. Anything else becomes a Page.
Once the Table is on your desk, it works like any other table: you can change a column's type, filter the rows and add more. See Table widget.
How a Page is set up
From a Markdown file, these come across as formatting:
- Headings, up to four levels (
#to####). - Bulleted lists (lines starting with
-or*) and numbered lists (1.). - Checklists (
- [ ]and- [x]), with ticked items kept ticked. - Quotes (lines starting with
>) and code blocks between three backticks.
Other Markdown, such as tables or bold text, comes in as plain text that you can format in the Page. From a plain .txt file, each block of text between blank lines becomes one paragraph. See Page widget.
If a file cannot be imported
If PlexiDesk cannot turn the file into a widget, a short note appears at the top of the desk saying why, and nothing is added. Click × on the note to close it. Common reasons and what to do:
- The file type is not one of the supported ones. Save or export the file as .txt, .md, .csv, .json or .xlsx and import that.
- The note says the file is empty. Check that the CSV file, or the first sheet of the Excel file, has data in it. Move the data to the first sheet if it is on another one.
- The note starts with Invalid JSON. The file has a mistake in its JSON, such as a missing comma or bracket. Open it in a text editor, fix it, and import it again.
Other ways to bring a file in
- Keep a Word, Excel or PowerPoint file as a document. Add a Document, Spreadsheet or Slides widget. In the window that opens, click Import a file, then choose the file. Its formatting is kept, and you edit it in PlexiiDocs, PlexiiSheets or PlexiiSlides. See Open and save Word, Excel, PowerPoint and Visio files Coming soon.
- Add rows to a table you already have. Use Import CSV, JSON or Excel… on the Table to match the file's columns to the table's columns. See Import CSV, JSON or Excel into a table.
- Keep any file as a file. Drag it from your computer onto the desk to make a File or link widget. See Drop files, links and apps onto a desk.
- Bring a widget from another desk. In the same Add to this desk menu, under From elsewhere, click Bring a synced widget… to add a live-linked copy of a widget from another desk. Changes you make to either copy show in both. See Duplicate widgets and keep copies in sync.
Common questions
Can I choose whether a text file becomes a Note or a Page?
Import file… always makes a Page from a .txt or .md file. A Page keeps headings, lists and checklists. If you would rather have the text in a Note, copy it from the Page into a Note widget.
Does the widget stay connected to the file on my computer?
No. Importing copies the contents into the widget once. Changing the file afterwards does not change the widget, and changing the widget does not change the file.
Can I undo an import?
Yes. Press ⌘ Z on a Mac or Ctrl Z on Windows straight away to take the new widget off the desk. See Undo and redo.
Related tasks
- Import CSV, JSON or Excel into a table
- Table widget and Page widget
- Link widgets and set up wires: feed an imported Page or Table into other widgets.
- Add a widget to a desk
Was this helpful?
Still need help? Contact support at [email protected].