File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
gxoffice/src/main/java/com/genexus/gxoffice/poi/xssf Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -766,6 +766,39 @@ public void setBackColor(long value) {
766766 }
767767 }
768768
769+ public String getHyperlink () {
770+ try {
771+ Hyperlink link = pCells [1 ].getHyperlink ();
772+ if (link != null ) {
773+ return link .getAddress ();
774+ }
775+ } catch (Exception e ) {
776+ m_errAccess .setErrDes ("Invalid cell value" );
777+ m_errAccess .setErrCod ((short ) 7 );
778+ }
779+ return "" ;
780+ }
781+
782+ public void setHyperLink (String value ) {
783+ if (readonly ) {
784+ m_errAccess .setErrDes ("Can not modify a readonly document" );
785+ m_errAccess .setErrCod ((short ) 13 );
786+ return ;
787+ }
788+
789+ try {
790+ CreationHelper createHelper = pWorkbook .getCreationHelper ();
791+ Hyperlink link = createHelper .createHyperlink (org .apache .poi .common .usermodel .HyperlinkType .URL );
792+ link .setAddress (value );
793+ for (int i = 1 ; i <= cntCells ; i ++) {
794+ pCells [i ].setHyperlink (link );
795+ }
796+ } catch (Exception e ) {
797+ m_errAccess .setErrDes ("Invalid cell value" );
798+ m_errAccess .setErrCod ((short ) 7 );
799+ }
800+ }
801+
769802 protected void copyPropertiesStyle (CellStyle dest , CellStyle source ) {
770803 dest .cloneStyleFrom (source );
771804 }
You can’t perform that action at this time.
0 commit comments