Home » Developing U++ » UppHub » [SEMI-SOLVED] OfficeAutomation : How to Set Hyperlink to a Excel cell?
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell? [message #33035 is a reply to message #33030] |
Sun, 03 July 2011 13:42   |
|
Semi-Solved!
Idea is to use Cell formula HYPERLINK.
I add function SetFormula(x,y,formula) to package OfficeAutomation.
Officeautomation.cpp:
bool MSSheet::SetFormula(int col, int row, String formula) {
if (!Sheet)
return false;
VariantOle x, y;
x.Int4(col);
y.Int4(row);
VariantOle val;
val.Value(formula);
//SetValue(col, row, (formula));
return Ole::SetValue(Ole::GetObject(Sheet, "Cells", x, y), "FormulaR1C1", val);
}
I'm not shure in this function for OOo(correct me please)
Officeautomation.cpp below:
bool OPENSheet::SetFormula(int col, int row, String formula) {
if (!SelCell(col, row))
return false;
VariantOle vText;
vText.BString(formula);
return Ole::Method(Cell, "setFormula", vText);
}
OfficeAutomationMethods.h after line 12:
Add line virtual bool SetFormula(int col, int row, String formula); \
OfficeSheet.cpp after line 107:
Add lines bool SheetPlugin::SetFormula(int col, int row, String formula) {return false;}
bool OfficeSheet::SetFormula(int col, int row, String formula) {return (static_cast<SheetPlugin *>(GetData()))->SetFormula(col, row, formula);}
This is my patch. Pls apply.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
 |
|
[SEMI-SOLVED] OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Mon, 11 July 2011 17:25
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Mon, 11 July 2011 23:03
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: ratah on Tue, 12 July 2011 14:44
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: ratah on Tue, 12 July 2011 14:46
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Wed, 13 July 2011 09:50
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Wed, 13 July 2011 15:37
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Wed, 13 July 2011 17:05
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Fri, 20 September 2013 10:35
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: ratah on Mon, 23 September 2013 13:22
|
 |
|
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: ratah on Wed, 13 July 2011 14:23
|
 |
|
Re: [SEMI-SOLVED] OfficeAutomation : How to Set Hyperlink to a Excel cell?
By: koldo on Mon, 23 September 2013 16:11
|
Goto Forum:
Current Time: Tue Jun 03 03:10:20 CEST 2025
Total time taken to generate the page: 0.02997 seconds
|