How can i get name box from excel

0 votes

When I find a difference between two excels files, I print it using the example DIFF command. Sch HI cell values (1 of 4)! Old and updated values for the cell location K40 (6.0 vs. 5.0)

I, therefore, need to print the box name in place of the cell position.

 @Override
    public void reportDiffCell(CellPos c1, CellPos c2) {
        sheets.add(c1.getSheetName());
        rows.add(c1.getRow());
        cols.add(c1.getColumn());
        results.add("DIFF Cell values at: " + c1.getCellPosition() + " => '" + c1.getCellValue()
                + "' v/s '" + c2.getCellValue() + "'");
    }

enter image description here

Dec 19, 2022 in Others by Kithuzzz
• 38,000 points
436 views

1 answer to this question.

0 votes

You could add a VBA function to the workbook and call that from java.

Function CellName(r As Range)
    On Error Resume Next
    CellName = r.Name.Name
    If Err Then CellName = r.Address(0, 0)
End Function
answered Dec 19, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

Excel - How can I get the average of cells where the value in one column is X and the value in another column is Y?

Use AVERAGEIFS ... =AVERAGEIFS(C2:C13,A2:A13,"Yellow Typ ...READ MORE

answered Nov 11, 2022 in Others by narikkadan
• 63,600 points
1,401 views
0 votes
1 answer

Excel-How can I get the address of a cell instead of a value?

There are various difficulties in this. Which ...READ MORE

answered Dec 29, 2022 in Others by narikkadan
• 63,600 points
484 views
0 votes
1 answer

How can I preserve the format while exporting data from excel to evernote

The contents for an Evernote note are ...READ MORE

answered Jan 5, 2023 in Others by narikkadan
• 63,600 points
1,101 views
0 votes
1 answer

How can I scrape a excel file from a website and divide it in different parts?

Use Scrapy or beautifulsoup4 parsing data it's more convenient ...READ MORE

answered Jan 13, 2023 in Others by narikkadan
• 63,600 points
664 views
0 votes
1 answer
0 votes
1 answer

What is the better API to Reading Excel sheets in java - JXL or Apache POI

Here are the things where both APIs ...READ MORE

answered Oct 9, 2022 in Others by narikkadan
• 63,600 points
3,399 views
0 votes
1 answer

How to get columns from Excel files using Apache POI?

The only way to see all the ...READ MORE

answered Oct 18, 2022 in Others by narikkadan
• 63,600 points
5,245 views
0 votes
1 answer

How can I convert excel to PDF by Libreoffice and keep all format from excel file?

"Times New Roman" typeface does not have ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
1,650 views
0 votes
1 answer

How can I copy from specific sheet in excel

You should use wb.Sheets("Name of sheet").Copy - ...READ MORE

answered Oct 29, 2022 in Others by narikkadan
• 63,600 points
498 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP