You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/03/13 18:05:22 UTC

DO NOT REPLY [Bug 52903] New: XSSF & HSSF shiftrows does not shift hyperlink references

https://issues.apache.org/bugzilla/show_bug.cgi?id=52903

             Bug #: 52903
           Summary: XSSF & HSSF shiftrows does not shift hyperlink
                    references
           Product: POI
           Version: 3.8-dev
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: cross22@llnl.gov
    Classification: Unclassified


Created attachment 28462
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28462
Example output file

When shifting rows in an HSSF or XSSF worksheet, any hyperlink references are
not shifted along with rows. In the example, if shift rows is commented out,
the code works as expected placing a cell at 0,0 containing the word Google and
a link to Google.  However, if shift-rows is applied, the output file contains
the word Google in row 1 and the link in row 0 (see attached output file).



        //create a workbook and add a sheet and row
        XSSFWorkbook wb=new XSSFWorkbook();
        CreationHelper createHelper = wb.getCreationHelper();
        Sheet sh=wb.createSheet();
        sh.createRow(0);

        //create a cell and add a hyperlink
        Cell c=sh.getRow(0).createCell(0);
        c.setCellValue("Google");
        Hyperlink link = createHelper.createHyperlink(Hyperlink.LINK_URL);
        link.setAddress(new URL("http://www.google.com").toString());
        c.setHyperlink(link);

        //shift row by 1
        sh.shiftRows(0, 0, 1);

        //write workbook
        FileOutputStream fos=new FileOutputStream("shiftrowsexample.xlsx");
        wb.write(fos);
        fos.close();

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52903] XSSF & HSSF shiftrows does not shift hyperlink references

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52903

--- Comment #1 from David Cross <cr...@llnl.gov> 2012-04-05 23:07:30 UTC ---
Just checked and this bug still exists in POI 3.8 release

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52903] XSSF & HSSF shiftrows does not shift hyperlink references

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52903

David Cross <cr...@llnl.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org