Tables can be very difficult to reproduce in straight export, because InDesign simply does not do a very good job of translating its Table and Cell styles to HTML/CSS code (the basis for EPUBs as well as web pages).
You can keep tables very simple, with consistent strokes defined for both the Table and Cell styles — and you really must use styles here, not any kind of default setup or spot overrides on the styling — and for the text within the table. Trying to get too fancy with thicker strokes, tinted cells, etc. means your export will probably have flaws. (You can get fancy... but it takes a lot of skill with what follows.)
The real secret to getting clean, even 'fancy' tables to EPUB is to use CSS style overrides at the export. If you're short on time and don't have some web development experience, that may not help (in time). My book (in the sig below) goes into complete detail, but that won't help much if you don't have the time to absorb the info. Here, however, is a very basic set of CSS for clean, simple tables:
table.Plain-Table {
width: 100%;
border: 1px red solid;
margin-top: 30px;
margin-bottom: 30px;
}
td.Plain-Table {
border: 1px blue solid;
padding: 2px;
epub-hyphens: none;
}
p.TABLE-body, p.TABLE-head {
font-family: sans-serif;
font-size: 0.8rem;
margin: 0;
padding: 0;
text-indent: 0;
}
p.TABLE-head {
font-weight: bold;
padding-top: 2px;
}
You will need to create matching styles for your document —
- Table style Plain Table
- Cell style Plain Table
- Paragraph styles TABLE body and TABLE head
...and apply them to all your table elements.
Then put the above code in a text file (use Notepad or equivalent), call it MyTables.css, and include it in the export menu for your EPUB under "additional CSS".
That's pretty dense; happy to answer further questions. Unfortunately, tables are one area where there is no really simple way to get a good result... this is the simple version. 😛
Note that this assumes a reflowable EPUB. If you're exporting to fixed-page EPUB (FXL) it may or may not work as well.. but FXL is a cranky, obsolete format and should not be used for text documents anyway.