How can I be able to locate a td class element with WATIR associated in react datepicker container? - watir

Though, I am able to locate it using xpath, but its only for a particular date and I think that will not be a valid solution, since I will have to change the xpath everytime I run my script.
Watir Script: #current_page.element(:xpath, '//*[#id="searchForm"]/div[1]/div[2]/div/div/div[2]/div/div/div[2]/div[2]/div/div[3]/div/table/tbody/tr[4]/td[2]').click
Below is HTML code for datepicker:
<div class="CalendarMonthGrid_month__horizontal CalendarMonthGrid_month__horizontal_1">
<div class="CalendarMonth CalendarMonth_1" data-visible="true"><div class="CalendarMonth_caption CalendarMonth_caption_1">
<strong>March 2018</strong>
</div>
<table class="CalendarMonth_table CalendarMonth_table_1" role="presentation">
<tbody>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Thursday, March 1, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">1</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Friday, March 2, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">2</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Saturday, March 3, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">3</td>
</tr>
<tr>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Sunday, March 4, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">4</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Monday, March 5, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">5</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Tuesday, March 6, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">6</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Wednesday, March 7, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">7</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Thursday, March 8, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">8</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Friday, March 9, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">9</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Saturday, March 10, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">10</td>
</tr>
<tr>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Sunday, March 11, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">11</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Monday, March 12, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">12</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Tuesday, March 13, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">13</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Wednesday, March 14, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">14</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Thursday, March 15, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">15</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Friday, March 16, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">16</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Saturday, March 17, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">17</td>
</tr><tr><td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Sunday, March 18, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">18</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3 CalendarDay__selected_start CalendarDay__selected_start_4 CalendarDay__selected CalendarDay__selected_5" role="button" aria-label="Selected. Monday, March 19, 2018" tabindex="0" style="width: 39px; height: 38px;">19</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Tuesday, March 20, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">20</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Wednesday, March 21, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">21</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Thursday, March 22, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">22</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Friday, March 23, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">23</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Saturday, March 24, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">24</td>
</tr><tr><td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Sunday, March 25, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">25</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Monday, March 26, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">26</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Tuesday, March 27, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">27</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3" role="button" aria-label="Choose Wednesday, March 28, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">28</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_span CalendarDay__selected_span_3 CalendarDay__last_in_range CalendarDay__last_in_range_4" role="button" aria-label="Choose Thursday, March 29, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">29</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2 CalendarDay__selected_end CalendarDay__selected_end_3 CalendarDay__selected CalendarDay__selected_4" role="button" aria-label="Selected. Friday, March 30, 2018" tabindex="-1" style="width: 39px; height: 38px;">30</td>
<td class="CalendarDay CalendarDay_1 CalendarDay__default CalendarDay__default_2" role="button" aria-label="Choose Saturday, March 31, 2018 as your check-in date. It's available." tabindex="-1" style="width: 39px; height: 38px;">31</td>
</tr>
</tbody>
</table>
</div>
</div>

You can create a method that accepts a Date or Time class:
def pick_date(date)
#browser.td(aria_label: /#{date.strftime(%A, %B %e, %Y)}/).click
end

Related

TinyMCE paste from excel

I have a problem with TinyMCE editor which I cannot resolve.
If I copy a table from Excel and paste it into the editor it loses the formatting. I have set up extended_valid_elements as follows...
extended_valid_elements:"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],table[style|class|border=2|width|cellspacing|cellpadding|bgcolor],colgroup,col[style|width],tbody,tr[style|class],td[style|class|colspan|rowspan|width|height|background|span|padding],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style|font-family|color]"
The HTML that is saved into the MySQL field is as follows
From Excel ...
<table style="border-collapse: collapse; width: 242pt;" border="2" width="322">
<tbody>
<tr style="height: 14.25pt;">
<td style="height: 14.25pt; width: 105pt;" width="140">Test</td>
<td style="width: 104pt;" width="138"></td>
<td style="width: 33pt;" width="44"> </td>
</tr>
</tbody>
</table>
From Word ...
<table style="width: 242.0pt; border-collapse: collapse;" border="2" width="0">
<tbody>
<tr style="height: 14.25pt;">
<td style="width: 105.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 14.25pt;" width="140">
<p style="margin-bottom: .0001pt; line-height: normal;"><span style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: black;">Test</span></p>
</td>
<td style="width: 104.0pt; padding: 0cm 5.4pt 0cm 5.4pt; height: 14.25pt;" width="139"></td>
<td style="width: 33.0pt; background: #92D050; padding: 0cm 5.4pt 0cm 5.4pt; height: 14.25pt;" width="44">
<p style="margin-bottom: .0001pt; line-height: normal;"><span style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: black;"> </span></p>
</td>
</tr>
</tbody>
</table>
How can I make this work from excel without having to go through word first?
It would appear I have to use power paste which is a paid-for option ... I have a call setup with their sales team to see how much it will cost! Fingers crossed.

How to add a button inside of 1 cell inside a table on SharePoint?

I'm trying to add a button that links out to another website inside of a cell in SharePoint but it keeps moving the button to either above or below the table and not inside of the cell.
Is it possible to do this with either an embed code or an HTML code that I could place within "Edit Source" under "Content Editor"?
Any help on this would be appreciated. I have been researching solutions all day.
The below is currently what is being used. Am I doing something wrong?
<span style="font-size: 10px;">
<font face="Verdana">
<a href="/sites/Global_OE/SitePages/Forms/ByAuthor.aspx">
<strong>
<input name="HONDA" type="button" value="Case for Change & Sponsorship " style="background-color: #336699; color: #ffffff;"/>
</strong>
</a>
</font>
</span>
<table cellspacing="0" width="100%" class="ms-rteTable-default">
<tbody>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">​<br/>​<br/></td>
<td class="ms-rteTableOddCol-default" style="width: 20%; text-align: center;">
<style="background-color: style="font-family: optima;">​<img src="/sites/Global_OE/homepagedraft/SiteAssets/SitePages/Test/Picture1.png" alt="Picture1.png" style="margin: 5px; width: 25px; height: 25px;"/><span class="ms-rteFontSize-4">Diagn​​ose & Scope</span>​<br/></style="background-color:></td>
<td class="ms-rteTableEvenCol-default" style="width: 20%;">
</td>
<td class="ms-rteTableOddCol-default" style="width: 20%;">
</td>
<td class="ms-rteTableEvenCol-default" style="width: 20%;">
</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">
</td>
<td class="ms-rteTableOddCol-default">
<p>
<span style="font-family: optima;">•Align to the business strategy</span></p>
<p>
<span style="font-family: optima;">•Align on what success looks like with leader and/ or sponsor</span></p>
</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">
<div>​OE </div>
<div> Getting Started & Tracking Progress<br/></div>
</td>
<td class="ms-rteTableOddCol-default">​​​​​​​​​​<br/></td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​Change Management<sup>3
<br/></sup>(Complex Change)<br/></td>
<td class="ms-rteTableOddCol-default">​<br/></td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​Organization Design<br/></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">
<div style="text-align: center;">​Everyday Change </div>
<div style="text-align: center;">(Team Effectiveness)<br/></div>
</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​​Process Enablement<br/></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
</tbody>
</table>
The following code for your reference.
<table cellspacing="0" width="100%" class="ms-rteTable-default">
<tbody>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">​
<span style="font-size: 10px;">
<font face="Verdana">
<a href="/sites/Global_OE/SitePages/Forms/ByAuthor.aspx">
<strong>
<input name="HONDA" type="button" value="Case for Change & Sponsorship" onclick="window.location.href='/sites/Global_OE/SitePages/Forms/ByAuthor.aspx'" style="background-color: #336699; color: #ffffff;"/>
</strong>
</a>
</font>
</span>
</td>
<td class="ms-rteTableOddCol-default" style="width: 20%; text-align: center;">
<style="background-color: style="font-family: optima;">​<img src="/sites/Global_OE/homepagedraft/SiteAssets/SitePages/Test/Picture1.png" alt="Picture1.png" style="margin: 5px; width: 25px; height: 25px;"/><span class="ms-rteFontSize-4">Diagn​​ose & Scope</span>​<br/></style="background-color:></td>
<td class="ms-rteTableEvenCol-default" style="width: 20%;">
</td>
<td class="ms-rteTableOddCol-default" style="width: 20%;">
</td>
<td class="ms-rteTableEvenCol-default" style="width: 20%;">
</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">
</td>
<td class="ms-rteTableOddCol-default">
<p>
<span style="font-family: optima;">•Align to the business strategy</span></p>
<p>
<span style="font-family: optima;">•Align on what success looks like with leader and/ or sponsor</span></p>
</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">
<div>​OE </div>
<div> Getting Started & Tracking Progress<br/></div>
</td>
<td class="ms-rteTableOddCol-default">​​​​​​​​​​<br/></td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​Change Management<sup>3
<br/></sup>(Complex Change)<br/></td>
<td class="ms-rteTableOddCol-default">​<br/></td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​Organization Design<br/></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableOddRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px;">
<div style="text-align: center;">​Everyday Change </div>
<div style="text-align: center;">(Team Effectiveness)<br/></div>
</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
<tr class="ms-rteTableEvenRow-default">
<td class="ms-rteTableEvenCol-default" style="width: 206px; text-align: center;">​​Process Enablement<br/></td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
<td class="ms-rteTableOddCol-default">​</td>
<td class="ms-rteTableEvenCol-default">​</td>
</tr>
</tbody>
</table>

Beautifulsoup problem of scraping text in array

Data=
<div class="dojoxGridView" id="dojox_grid__View_1" role="presentation" style="width: 1900px; height: 721px; left: 1px; top: 0px;" widgetid="dojox_grid__View_1">
<input class="dojoxGridHiddenFocus" dojoattachpoint="hiddenFocusNode" role="presentation" type="checkbox"/>
<input class="dojoxGridHiddenFocus" role="presentation" type="checkbox"/>
<div class="dojoxGridScrollbox" dojoattachpoint="scrollboxNode" role="presentation" style="height: 721px;">
<div class="dojoxGridContent" dojoattachpoint="contentNode" hidefocus="hidefocus" role="presentation" style="height: 504px; width: 1900px;">
<div role="presentation" style="position: absolute; left: 0px; top: 0px;">
<div aria-selected="false" class="dojoxGridRow" role="row" style="">
<table border="0" cellpadding="0" cellspacing="0" class="dojoxGridRowTable" role="presentation" style="width: 1900px;">
<tbody>
<tr>
<td class="dojoxGridCell" idx="0" role="gridcell" style="display:none;width:100px;" tabindex="-1">
78126
</td>
<td class="dojoxGridCell" idx="1" role="gridcell" style="width:10%;" tabindex="-1">
Approved Plan
</td>
<td class="dojoxGridCell" idx="2" role="gridcell" style="width:10%;" tabindex="-1">
G-10
</td>
<td class="dojoxGridCell" idx="3" role="gridcell" style="width:40%;" tabindex="-1">
ROOF PLAN
</td>
</tr>
</tbody>
</table>
</div>
Input=
source = driver.page_source
soup = BeautifulSoup(source, "lxml")
print(soup. prettify())
for article in soup.find_all('div', class_='dojoxGridContent'):
drawing_no = article.find_all('td', class_='dojoxGridCell', idx='3')
# ->need one more line to extract text
print(""drawing_no")
Output=
<td class="dojoxGridCell" idx="3" role="gridcell" style="width:40%;" tabindex="-1">ROOF PLAN</td> ...
I just want to extract "ROOF PLAN" how should I edit my code?
I tried drawing_no.text and drawing_no.value but it said "no attribute".
Thanks for your help!
try followig code
source="""<div class="dojoxGridView" id="dojox_grid__View_1" role="presentation" style="width: 1900px; height: 721px; left: 1px; top: 0px;" widgetid="dojox_grid__View_1">
<input class="dojoxGridHiddenFocus" dojoattachpoint="hiddenFocusNode" role="presentation" type="checkbox"/>
<input class="dojoxGridHiddenFocus" role="presentation" type="checkbox"/>
<div class="dojoxGridScrollbox" dojoattachpoint="scrollboxNode" role="presentation" style="height: 721px;">
<div class="dojoxGridContent" dojoattachpoint="contentNode" hidefocus="hidefocus" role="presentation" style="height: 504px; width: 1900px;">
<div role="presentation" style="position: absolute; left: 0px; top: 0px;">
<div aria-selected="false" class="dojoxGridRow" role="row" style="">
<table border="0" cellpadding="0" cellspacing="0" class="dojoxGridRowTable" role="presentation" style="width: 1900px;">
<tbody>
<tr>
<td class="dojoxGridCell" idx="0" role="gridcell" style="display:none;width:100px;" tabindex="-1">
78126
</td>
<td class="dojoxGridCell" idx="1" role="gridcell" style="width:10%;" tabindex="-1">
Approved Plan
</td>
<td class="dojoxGridCell" idx="2" role="gridcell" style="width:10%;" tabindex="-1">
G-10
</td>
<td class="dojoxGridCell" idx="3" role="gridcell" style="width:40%;" tabindex="-1">
ROOF PLAN
</td>
</tr>
</tbody>
</table>
</div>"""
from bs4 import BeautifulSoup
soup = BeautifulSoup(source,"html.parser")
for article in soup.find_all('div', class_='dojoxGridContent'):
drawing_no = article.find('td', class_='dojoxGridCell', idx='3')
if drawing_no:
print(drawing_no.get_text())
please try below code. But in general if you pass in idx=3 it will only return one single element. If you want to extract text from multiple element you might want to use a more general identifier.
import lxml
from lxml import html
html_string = """
<div class="dojoxGridView" id="dojox_grid__View_1" role="presentation" style="width: 1900px; height: 721px; left: 1px; top: 0px;" widgetid="dojox_grid__View_1">
<input class="dojoxGridHiddenFocus" dojoattachpoint="hiddenFocusNode" role="presentation" type="checkbox"/>
<input class="dojoxGridHiddenFocus" role="presentation" type="checkbox"/>
<div class="dojoxGridScrollbox" dojoattachpoint="scrollboxNode" role="presentation" style="height: 721px;">
<div class="dojoxGridContent" dojoattachpoint="contentNode" hidefocus="hidefocus" role="presentation" style="height: 504px; width: 1900px;">
<div role="presentation" style="position: absolute; left: 0px; top: 0px;">
<div aria-selected="false" class="dojoxGridRow" role="row" style="">
<table border="0" cellpadding="0" cellspacing="0" class="dojoxGridRowTable" role="presentation" style="width: 1900px;">
<tbody>
<tr>
<td class="dojoxGridCell" idx="0" role="gridcell" style="display:none;width:100px;" tabindex="-1">
78126
</td>
<td class="dojoxGridCell" idx="1" role="gridcell" style="width:10%;" tabindex="-1">
Approved Plan
</td>
<td class="dojoxGridCell" idx="2" role="gridcell" style="width:10%;" tabindex="-1">
G-10
</td>
<td class="dojoxGridCell" idx="3" role="gridcell" style="width:40%;" tabindex="-1">
ROOF PLAN
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
"""
tree = html.fromstring(html_string)
ROOFPLAN = tree.xpath('//tbody/tr//td[#idx="3"]/text()')
print(''.join(ROOFPLAN).strip())
You can use the idx attribute and select by its value
print(soup.select_one("[idx='3']").text.strip())

Excel formula to find the nearest values

Is it possible to find the nearest value (+or-) with formula and display the 1st row value & 1st column value in my linked excel table?
Eg:
Search Value is "7,30" (C12; variable can ask for any value on table)
Found row value is "7" (E12 with formula; adressed to A7)
Found column value "4,00%" (E13 with formula; adressed to E1)
"F12" Formula is OK. What can be the formula in "F13" regarding the information on table below?
<head>
<meta http-equiv=Content-Type content="text/html; charset=Windows-1254">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 14">
<link rel=File-List href="SampleT_dosyalar/filelist.xml">
<style id="table-3_9841_Styles">
<!--table
{mso-displayed-decimal-separator:"\,";
mso-displayed-thousand-separator:"\.";}
.xl159841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl659841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:right;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl669841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
border:.5pt solid windowtext;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl679841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:Fixed;
text-align:general;
vertical-align:bottom;
border:.5pt solid windowtext;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl689841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:"0\.00\\%";
text-align:general;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl699841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
background:#FFC000;
mso-pattern:black none;
white-space:nowrap;}
.xl709841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:"0\.00\\%";
text-align:general;
vertical-align:bottom;
background:#FFC000;
mso-pattern:black none;
white-space:nowrap;}
.xl719841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:"0\.00\\%";
text-align:general;
vertical-align:bottom;
border:.5pt solid windowtext;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl729841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:left;
vertical-align:top;
border:none;
mso-diagonal-up:.5pt solid windowtext;
mso-background-source:auto;
mso-pattern:auto;
white-space:normal;}
.xl739841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:red;
font-size:11.0pt;
font-weight:700;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl749841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:#0070C0;
font-size:11.0pt;
font-weight:700;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl759841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:center;
vertical-align:bottom;
mso-background-source:auto;
mso-pattern:auto;
white-space:nowrap;}
.xl769841
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:11.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Calibri, sans-serif;
mso-font-charset:162;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
background:#D9D9D9;
mso-pattern:black none;
white-space:nowrap;}
-->
</style>
</head>
<body>
<!--[if !excel]> <![endif]-->
<!--Aşağıdaki bilgiler Microsoft Excel'in Web Sayfası Olarak Yayımlama
sihirbazı tarafından oluşturuldu.-->
<!--Aynı öğe Excel'den yeniden yayımlanırsa, DIV etiketleri arasındaki
bilgilerin tümü değiştirilecek.-->
<!----------------------------->
<!--EXCEL WEB SAYFASI OLARAK YAYIMLA SİHİRBAZI ÇIKTI BAŞLANGICI-->
<!----------------------------->
<div id="table-3_9841" align=center x:publishsource="Excel">
<table border=0 cellpadding=0 cellspacing=0 width=1114 style='border-collapse:
collapse;table-layout:fixed;width:836pt'>
<col class=xl159841 width=26 style='mso-width-source:userset;mso-width-alt:
950;width:20pt'>
<col class=xl159841 width=64 style='width:48pt'>
<col width=64 span=16 style='width:48pt'>
<tr class=xl159841 height=20 style='height:15.0pt'>
<td height=20 class=xl769841 width=26 style='height:15.0pt;width:20pt'> </td>
<td class=xl759841 width=64 style='width:48pt'>A</td>
<td class=xl759841 width=64 style='width:48pt'>B</td>
<td class=xl759841 width=64 style='width:48pt'>C</td>
<td class=xl759841 width=64 style='width:48pt'>D</td>
<td class=xl759841 width=64 style='width:48pt'>E</td>
<td class=xl759841 width=64 style='width:48pt'>F</td>
<td class=xl759841 width=64 style='width:48pt'>H</td>
<td class=xl759841 width=64 style='width:48pt'>I</td>
<td class=xl759841 width=64 style='width:48pt'>J</td>
<td class=xl759841 width=64 style='width:48pt'>K</td>
<td class=xl759841 width=64 style='width:48pt'>L</td>
<td class=xl759841 width=64 style='width:48pt'>M</td>
<td class=xl759841 width=64 style='width:48pt'>N</td>
<td class=xl759841 width=64 style='width:48pt'>O</td>
<td class=xl759841 width=64 style='width:48pt'>P</td>
<td class=xl759841 width=64 style='width:48pt'>Q</td>
<td class=xl759841 width=64 style='width:48pt'>R</td>
</tr>
<tr height=20 style='mso-height-source:userset;height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>1</td>
<td rowspan=2 class=xl729841 width=64 style='width:48pt'><span
style='mso-spacerun:yes'> </span>%<br>
<span style='mso-spacerun:yes'> </span>Price</td>
<td class=xl689841 align=right>1,00%</td>
<td class=xl689841 align=right>2,00%</td>
<td class=xl689841 align=right>3,00%</td>
<td class=xl709841 align=right>4,00%</td>
<td class=xl689841 align=right>5,00%</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>2</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>3</td>
<td class=xl159841 align=right>3</td>
<td class=xl159841 align=right><a name="RANGE!C4:G11">3,03</a></td>
<td class=xl159841 align=right>3,06</td>
<td class=xl159841 align=right>3,095</td>
<td class=xl159841 align=right>3,125</td>
<td class=xl159841 align=right>3,16</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>4</td>
<td class=xl159841 align=right>4</td>
<td class=xl159841 align=right>4,04</td>
<td class=xl159841 align=right>4,08</td>
<td class=xl159841 align=right>4,125</td>
<td class=xl159841 align=right>4,165</td>
<td class=xl159841 align=right>4,21</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>5</td>
<td class=xl159841 align=right>5</td>
<td class=xl159841 align=right>5,05</td>
<td class=xl159841 align=right>5,1</td>
<td class=xl159841 align=right>5,155</td>
<td class=xl159841 align=right>5,21</td>
<td class=xl159841 align=right>5,265</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>6</td>
<td class=xl159841 align=right>6</td>
<td class=xl159841 align=right>6,06</td>
<td class=xl159841 align=right>6,12</td>
<td class=xl159841 align=right>6,185</td>
<td class=xl159841 align=right>6,25</td>
<td class=xl739841 align=right>7,29</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>7</td>
<td class=xl699841 align=right>7</td>
<td class=xl159841 align=right>7,07</td>
<td class=xl159841 align=right>7,145</td>
<td class=xl159841 align=right>7,215</td>
<td class=xl739841 align=right>7,29</td>
<td class=xl159841 align=right>7,37</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>8</td>
<td class=xl159841 align=right>8</td>
<td class=xl159841 align=right>8,08</td>
<td class=xl159841 align=right>8,165</td>
<td class=xl159841 align=right>8,245</td>
<td class=xl159841 align=right>8,335</td>
<td class=xl159841 align=right>8,42</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>9</td>
<td class=xl159841 align=right>9</td>
<td class=xl159841 align=right>9,09</td>
<td class=xl159841 align=right>9,185</td>
<td class=xl159841 align=right>9,28</td>
<td class=xl159841 align=right>9,375</td>
<td class=xl159841 align=right>9,475</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>10</td>
<td class=xl159841 align=right>10</td>
<td class=xl159841 align=right>10,1</td>
<td class=xl159841 align=right>10,205</td>
<td class=xl159841 align=right>10,31</td>
<td class=xl159841 align=right>10,415</td>
<td class=xl159841 align=right>10,525</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>11</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>12</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl659841>Search:</td>
<td class=xl679841 align=right>7,30</td>
<td class=xl659841>Row</td>
<td class=xl669841 align=right>7</td>
<td class=xl159841 colspan=11><span style='mso-spacerun:yes'>
</span>=İNDİS($A:$A;MAK((MİN(MUTLAK(DataRange-$C$12))=MUTLAK(DataRange-$C$12))*SATIR(DataRange)))</td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>13</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl659841>Column</td>
<td class=xl719841 align=right style='border-top:none'>5,00%</td>
<td class=xl159841 colspan=11><span style='mso-spacerun:yes'>
</span>=İNDİS($1:$1;1;MAK((MİN(MUTLAK(DataRange-$C$12))=MUTLAK(DataRange-$C$12))*SÜTUN(DataRange)))</td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>14</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>15</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl749841 colspan=10>This formula is OK as row# "7" but is
it possible to display "E7" instead of "F6" as column
title?</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>16</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl749841 colspan=12>Can the formula check row# first to retrieve
the colum title then check for others if no figure is identical in row
"7" line?</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 class=xl759841 style='height:15.0pt'>18</td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
<td class=xl159841></td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=26 style='width:20pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
</tr>
<![endif]>
</table>
</div>
<!----------------------------->
<!--EXCEL WEB SAYFASI OLARAK YAYIMLA SİHİRBAZI ÇIKTI SONU-->
<!----------------------------->
</body>
</html>
I guess there must be a prettier answer to this, but this worked for me:
In E12 put this:
=ROUNDDOWN(C12,0)
And in E13 put this Array-Formula (need to be entered with Ctrl+Shift+Enter instead of the usual Enter):
=MATCH(MIN(ABS(C12-B3:F10)),ABS(C12-INDIRECT(CONCATENATE("B",E12)):INDIRECT(CONCATENATE("F",E12))),0)
Hope this helps
These formulas must be array-entered:
Row: =INDEX($A:$A,MAX((MIN(ABS(DataRange-$C$12))=ABS(DataRange-$C$12))*ROW(DataRange)))
Column: =INDEX($1:$1,1,MAX((MIN(ABS(DataRange-$C$12))=ABS(DataRange-$C$12))*COLUMN(DataRange)))
EDIT: If there is a possibility of duplicates in the table (two values that are equidistant from the search value, then the following formula will ensure that Column comes from the same row as the row value found.
Row: Formula in C12
Column: =INDEX($1:$1,1,MAX((MIN(ABS(INDEX(DataRange,E12-ROW(DataRange)+1,0)-$C$12))=ABS(INDEX(DataRange,E12-ROW(DataRange)+1,0)-$C$12))*COLUMN(DataRange)))
In your example,
DataRange refers to: =Sheet1!$B$3:$F$10
To array-enter a formula, after entering
the formula into the cell or formula bar, hold down
ctrl+shift while hitting enter. If you did this
correctly, Excel will place braces {...} around the formula.
In E12, the row:
=INDEX(A:A,AGGREGATE(15,6,($B$3:$F$10)/(AGGREGATE(15,6,ABS(C12-$B$3:$F$10),1)=ABS(C12-$B$3:$F$10)),1))
In E13, the column:
=INDEX(1:1,AGGREGATE(15,6,COLUMN($B$3:$F$10)/(AGGREGATE(15,6,ABS(C12-$B$3:$F$10),1)=ABS(C12-$B$3:$F$10)),1))

Styles in vaadin not fine in Table inside Liferay Theme

We are using Vaadin 7.3.10 and we are developing a porlet 2.0 in eclipse. This porlet is deploying in Liferay 6.2-CE-ga3. We create a Liferay Theme (we extend of classic parent theme) and in this Theme we include the Vaadin Valo Theme.
The problem is (ONLY IN FIREFOX) when we show one table and the heather td have a different size of the several rows td.
This is the HTML code generated in Vaadin:
<div id="yui_patched_v3_11_0_1_1423812986764_751" class="v-slot v-slot-tablaNueva">
<div id="yui_patched_v3_11_0_1_1423812986764_750" style="width: 712px; height: 230px;" class="v-table v-widget v-has-width v-has-height tablaNueva v-table-tablaNueva">
<div style="width: 710px;" class="v-table-header-wrap">
<div class="v-table-header" style="overflow: hidden;">
<div style="width: 900000px;">
<table>
<tbody>
<tr>
<td style="width: 326px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 317px;">Nombre del seguro</div>
</td>
<td style="width: 95px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 86px;">Descuento</div>
</td>
<td style="width: 88px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 79px;">Campaña</div>
</td>
<td style="width: 100px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 91px;">Edad Aseg.</div>
</td>
<td style="width: 191px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 182px;">Capital Asegurado</div>
</td>
<td style="width: 101px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 92px;">Contratable</div>
</td>
<td style="width: 106px;" class="v-table-header-cell">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 97px;">Documentos</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="v-table-column-selector" style="display: none;"></div>
</div>
<div id="yui_patched_v3_11_0_1_1423812986764_749" style="position: relative; overflow: auto; height: 190px; width: 710px;" class="v-scrollable v-table-body-wrapper v-table-body" tabindex="-1">
<div id="yui_patched_v3_11_0_1_1423812986764_748" style="height: 113px;">
<div style="height: 0px;" class="v-table-row-spacer"></div>
<table id="yui_patched_v3_11_0_1_1423812986764_747" class="v-table-table">
<tbody id="yui_patched_v3_11_0_1_1423812986764_746">
<tr id="yui_patched_v3_11_0_1_1423812986764_745" class="v-table-row" style="">
<td id="yui_patched_v3_11_0_1_1423812986764_744" style="width: 325px;" class="v-table-cell-content">
<div id="yui_patched_v3_11_0_1_1423812986764_743" style="text-align: left; width: 325px;" class="v-table-cell-wrapper">Seguro de protección familiar en femenino</div>
</td>
<td style="width: 94px;" class="v-table-cell-content">
<div style="text-align: left; width: 94px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 87px;" class="v-table-cell-content">
<div style="text-align: left; width: 87px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 99px;" class="v-table-cell-content">
<div style="text-align: left; width: 99px;" class="v-table-cell-wrapper">18 - 64</div>
</td>
<td style="width: 190px;" class="v-table-cell-content">
<div style="text-align: left; width: 190px;" class="v-table-cell-wrapper">40000.0 - 450000.0</div>
</td>
<td style="width: 100px;" class="v-table-cell-content">
<div style="text-align: left; width: 100px;" class="v-table-cell-wrapper">SI</div>
</td>
<td style="width: 105px;" class="v-table-cell-content">
<div style="text-align: left; width: 105px;" class="v-table-cell-wrapper">+Info</div>
</td>
</tr>
<tr id="yui_patched_v3_11_0_1_1423812986764_801" class="v-table-row-odd v-selected" style="">
<td style="width: 325px;" class="v-table-cell-content">
<div style="text-align: left; width: 325px;" class="v-table-cell-wrapper">Seguro de protección familiar</div>
</td>
<td id="yui_patched_v3_11_0_1_1423812986764_800" style="width: 94px;" class="v-table-cell-content">
<div id="yui_patched_v3_11_0_1_1423812986764_799" style="text-align: left; width: 94px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 87px;" class="v-table-cell-content">
<div style="text-align: left; width: 87px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 99px;" class="v-table-cell-content">
<div style="text-align: left; width: 99px;" class="v-table-cell-wrapper">18 - 64</div>
</td>
<td style="width: 190px;" class="v-table-cell-content">
<div style="text-align: left; width: 190px;" class="v-table-cell-wrapper">40000.0 - 250000.0</div>
</td>
<td style="width: 100px;" class="v-table-cell-content">
<div style="text-align: left; width: 100px;" class="v-table-cell-wrapper">SI</div>
</td>
<td style="width: 105px;" class="v-table-cell-content">
<div style="text-align: left; width: 105px;" class="v-table-cell-wrapper">+Info</div>
</td>
</tr>
<tr class="v-table-row" style="">
<td style="width: 325px;" class="v-table-cell-content">
<div style="text-align: left; width: 325px;" class="v-table-cell-wrapper">Seguro de protección familiar plus</div>
</td>
<td style="width: 94px;" class="v-table-cell-content">
<div style="text-align: left; width: 94px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 87px;" class="v-table-cell-content">
<div style="text-align: left; width: 87px;" class="v-table-cell-wrapper">No</div>
</td>
<td style="width: 99px;" class="v-table-cell-content">
<div style="text-align: left; width: 99px;" class="v-table-cell-wrapper">18 - 64</div>
</td>
<td style="width: 190px;" class="v-table-cell-content">
<div style="text-align: left; width: 190px;" class="v-table-cell-wrapper">100000.01 - 2666666.0</div>
</td>
<td style="width: 100px;" class="v-table-cell-content">
<div style="text-align: left; width: 100px;" class="v-table-cell-wrapper">SI</div>
</td>
<td style="width: 105px;" class="v-table-cell-content">
<div style="text-align: left; width: 105px;" class="v-table-cell-wrapper">+Info</div>
</td>
</tr>
</tbody>
</table>
<div style="height: 0px;" class="v-table-row-spacer"></div>
</div>
<div tabindex="0" style="position: fixed; top: 0px; left: 0px;"></div>
</div>
<div aria-hidden="true" style="display: none; width: 710px;" class="v-table-footer-wrap">
<div class="v-table-footer" style="overflow: hidden;">
<div style="width: 900000px;">
<table>
<tbody>
<tr>
<td style="width: 325px;">
<div class="v-table-footer-container" style="width: 324px;"> </div>
</td>
<td style="width: 94px;">
<div class="v-table-footer-container" style="width: 93px;"> </div>
</td>
<td style="width: 87px;">
<div class="v-table-footer-container" style="width: 86px;"> </div>
</td>
<td style="width: 99px;">
<div class="v-table-footer-container" style="width: 98px;"> </div>
</td>
<td style="width: 190px;">
<div class="v-table-footer-container" style="width: 189px;"> </div>
</td>
<td style="width: 100px;">
<div class="v-table-footer-container" style="width: 99px;"> </div>
</td>
<td style="width: 105px;">
<div class="v-table-footer-container" style="width: 104px;"> </div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

Resources