Jump to content

Removing blank rows from exported tables


keychange
 Share

This topic is 4346 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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>

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 4346 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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