Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98360

How do i display values in tabular format and then have to write it down on excel file

$
0
0

Basically having 6 different for loops and wanted to print the values on each iteration from each for loop one value and that is into tabular form. The size of each loop is different.In final output some of column may not contain any value.

int q = 1;

for (int j = 0; j < totalNoOfLOB.size(); j++) { 
    System.out.print(totalNoOfLOB.get(j).getText());

    for (int p = q + 1; p < combinedPerformanceOfMeasure.size(); p++) {
        System.out.print("" + combinedPerformanceOfMeasure.get(p).getText());
        break;
    }

    System.out.print("\n")
    q++;
} 

Above code successfully printed 2 columns. Now from remaining 4 for loops wanted to print values on next 4 columns.

for(int tl = 0; tl < thLowerValues.size(); tl++),                             
for(int th = 0; th < thHigherValues.size(); th++),
for(int l = 0; l < listOfActualValues; l++), 
for(int tar = 0; tar < totalTar; tar++)

In final output some of column may not contain some value. Its basically fetching value from each iteration and should print in tabular form. At last wanted to write all data into Excel file.


Viewing all articles
Browse latest Browse all 98360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>