FileMaker@ATL



Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting from FileMaker to formatted Excel-compatible file
11-07-2013, 09:58 AM (This post was last modified: 11-07-2013 10:05 AM by lhoong.)
Post: #1
Exporting from FileMaker to formatted Excel-compatible file
Really enjoyed the discussion at my demo of this technique at the ATL FM Dev. Group meeting last night. Thanks to 360Works and everyone who participated.

Summary: Technique to export data from FileMaker into a richly-formatted Excel-compatible file, using HTML. Does not require extensive knowledge of HTML, but some basic understanding is helpful. The method exploits the ability of Excel to read and write .htm format files.

Minimum software requirements: FileMaker Pro, MS Excel, text editor (e.g. WordPad or TextWrangler)

General description of method:

  1. Start with formatted report sample/template in native Excel format.
  2. Identify sections that are static vs. variable.
  3. Save sample report as Web Page (.htm).
  4. Examine .htm file in text editor - identify sections that correspond to the ones in 2.
  5. In FileMaker, create script that generates the required HTML, using HTML elements in 4. as a template, with data inserted into the appropriate locations in HTML code. Don't forget to escape characters (e.g. quotes, new lines, etc.) that may cause issues if left as-is.
  6. Store the completed HTML code in a global text field.
  7. Export global text field contents to a file with extension ".xls" (or ".xlsx").


Demo files (in CandyLand.zip):

CandyLand.fmp12 - FileMaker Pro 12 file illustrating the technique; the sample data and export features are accessible via layout "Sales".

ExcelTemplate_11-02-13.xlsx - native Excel file used as the formatted template to create a corresponding .htm file.

CandyLand_SalesByCustomer_11_7_2013.xls - sample output from CandyLand.fmp12 using the technique.


Attached File(s)
.zip  CandyLand.zip (Size: 121.78 KB / Downloads: 8)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)