Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Removing blank rows from exported tables

Featured Replies

Hi - I realise that this may be an XSL specific question more so than Filemaker but I am a beginner with XSL and have spent hours googling for a solution and I am getting desperate.

I export records to an xls file which is then parsed by the browser - all works fine except that not all records have a valid entry in every field. As a result the table created embeds <br> in the table cell and that means there is an unnecessary blank line which gets worse if there are 2 or 3 empty fields and destroys the formatting of the resultant web page. Help please !!

ie: <tr>

<td>

<br>

</td>

</tr>

<tr>

<td>

<br>

</td>

I don't understand this part:

I export records to an xls file which is then parsed by the browser

If you are using a XSLT stylesheet to produce the HTML, you can adjust the stylesheet so that it doesn't put <br> in empty table cells. To be more specific, I'd need to see the stylesheet.

BTW, Filemaker itself, when exporting as HTML Table, puts <BR> in empty cells - and I don't see that it "destroys the formatting of the resultant web page".

  • Author

BTW, Filemaker itself, when exporting as HTML Table, puts <BR> in empty cells - and I don't see that it "destroys the formatting of the resultant web page".

The records are product description paragraphs 1 to 5 paragraphs per product but not all products have 5 paragraphs ... many have only 1. By Filemaker inserting the <BR> in the empty cell - browsers insert blank lines therefore a product with 1 paragraph is followed by 4 blank lines ie: 4 empty cells - one for each row

I am probably missing something here. When you export as HTML table, records are rows and fields are columns. Any empty field produces an empty cell in an existing row - this is to preserve the overall tabular format. There should not be any empty rows, unless a record is completely empty.

The records are product description paragraphs 1 to 5 paragraphs per product but not all products have 5 paragraphs ... many have only 1.

Not related to export, but you should be using two tables for this: Products and DescriptionParagraphs. This way, a product can have exactly as many description paragraphs as needed, and no record or field needs to be empty.

  • Author

Sorry I haven't explained this well.

I am using a repeating table format single column single row - one row per paragraph.

If I don't use the table I have to embed <p> </p> for each paragraph and end up with same outcome - empty lines where the paragraph field is empty.

Whereas browsers or in this case an HTML email ignores empty table cells however the cells aren't empty because FMP insists on entering a <br>

Is that clearer?

Thanks

Is that clearer?

I am afraid not. Why don't you post some example files - preferably a Filemaker source file with the export scripted so that we can examine the result.

  • Author

Sorry can't post source file - I will simply accept the blank lines for now and revisit the issue at another time.

Thanks

Why not post a mockup of your file that demonstrates your problem,

Or, save a clone of your file but remove or delete any confidential information.

Lee

  • Author

I have discovered to the problem is with the browser parsing rather than filemaker - Firefox/Thunderbird is inserting the <br>

Sorry to have wasted your time and thanks for your efforts

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.