Export to Excel?

I’ve an agent which has gathered notes and is giving me a beautiful, useful five column view. I want to send it to a non-tinderbox user. How best to do it? Can I export in a way that Excel would recognise?

Thanks.

Hey there, there are a couple of ways to do this, personally, I find the second method easier (that is not to say the AB approach is not good, but it ultimately depends on what you’re trying to do and how often).

  1. Use the attribute browser (AB)
    A. Open the Attribute Browser
    B. You can take the query from the agent and apply it to the query in the AB to get the notes you want
    C. You can then Add AB fields to your Attribute Browser that you want to export (tap with two finders along the bar above the notes and it will open up a pop-up you can use to add attributes to the display). D. Next step would be to export your file using Export as Attribute Browser feature under the File>Export menu.
    E. Open this file in a text editor and turn it to plain text.
    D. Import the file in Excel, Excel will parse it and render it properly.

  2. Use and export template
    A. Run your query
    B. Apply and export template that generates a table, view this table in preview
    C. Copy the preview and past it into excel (note: this works if you don’t have too any special characters in your $Text filed, if you do then you’ll want to take one more step)
    D. Apply a tab deliminated template to the file and use this to paste your data into excel

I don’t have a lot of time to produce an example with fake data right now, but I could edit your file and put in the necessary templates if this is something you could share. If it can be publicly shared the post it here, otherwise private message me the file and I’ll add in the necessary templates and get it working for you.

NOTE: This may sound like a lot of work, and a first it can be a bit intimidating, but once get the hand of it it will all become second nature.

I commend the closing note. The templates aren’t hard to do and the forum can help.

Personally, I’d use tab-delimited (TSV) format over comma-separated (CSV) as there is generally less scope for error. But, Excel will accept either.

One thing to watch for is if you are exporting strings with line breaks in (e.g. $Text), you may need to process those line-breaks to a different character for import to Excel. The import process first breaks the data into discrete lines, so you can see how Excel might otherwise get confused).

The bit that cause me trouble is drawing up or finding a suitable export template. Where do I find a suitable template?

Thanks.

BH

Thanks for your help but the data can’t be shared. I’m trying your suggestions. BH

1 Like

OK, we can work round that. Can you give me the names of the columns to export: attribute names (case-sensitive!), ordered as per column heads left to right. Also:

  • if not system attributes, what data type are the attributes
  • dates, what format should they be
  • don’t worry abouut $-prefixes, I just beend to know the attribute’s name and their order so I can set up the templates
  • if you want a header row using a text other than the source attribute name, please supply aa mapping, e.g. ‘Name: Subject’, ‘StartDate: First Appt.’, etc.

With that I can knock up a quick doc showing the templates. Setting this sort of template when you don’t know the attribute/column names makes a textual description very long-winded. Plus always consider the format of the source values you are putting in the table, especially for things like dates.

No problem. Here you go, I pulled together a sample file for you. Hope this helps. TBX - L Export Notes to Excel.tbx (740.9 KB)

You can modify the templates to match your attribute names. Add table rows as needed.

Let me know if you have any questions.

Please see the example I just provided. It requires some familiarity with HTML, but not that much. Let me know if you have any questions.

Mark, sorry, I was typing fast as I did not have a lot of time. Thanks for fixing my typos!!! :pray: I aim to be more accurate in the future.

Dear Mark — Thanks.

It is a list of documents — the column heads can be the attribute names.
Name (string)
Authors (string)
Recipient (string
StartDate (date — d/m/y)
Pages_ (number)
D1_proposed_InvZ_no (number)
D2_proposed_InvZ_no (number)

Bryan, here you go, try this. Copy the tTable for Bryan template and its child to your file. Apply it to your agent and they look at the Preview.

TBX - L Export Notes to Excel.tbx (737.1 KB)

Bryan, BTW, if you want the date to show up formatted, then you’ll want to add a format dot operator to your template.

For example.

Not formatted:

Formatted:
image

To do this, add .format(“l”) to the end of your $StartDate in the template, e.g.

<td>^value($StartDate.format("l"))^</td>

Thanks. I’ll let you know how it goes. BH

Demo done at last: see here. It took a bit longer than expected.

It takes a slightly different approach to the example above. They get to the same end, so aren’t in opposition, but alternatives. for later readers use either/both as suits your work.

The above works off generating an HTML table that Excel can treat as a data table. The demo I just uploaded takes a more old-school approach and exports a tab-delim text file for use in Excel or other tab-delim consuming formats.

HTH :slight_smile:

1 Like

Dear Mark, I’ll get it tried tomorrow. Thanks.

1 Like