Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help setting formula and values of a cell
Hi all, I'm attempting to automate production of an excel worksheet with a
displayed text value, and a hyperlinked address. I'm using the following code: for (int i = 0; i < printstrings.Length; i++) { Excel.Range cell = (Excel.Range)currentworksheet.Cells[currentlinenumber, i + 1]; cell.Formula = "=HYPERLINK(\"" + hyperlinks[i] + "\")"; cell.Value2 = printstrings[i]; } currentlinenumber++; This executes successfully in debug mode on my development machine, but when I test the application on other machines, I get the error: System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at Microsoft.Office.Interop.Excel.Range.set_Formula(O bject ) Any ideas on what to do to resolve this? Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting values in a cell | Excel Discussion (Misc queries) | |||
Setting Cell Values??? | Excel Programming | |||
Setting range for the VALUES obtained from formula | Excel Programming | |||
Setting Cell Values from VBA | Excel Programming | |||
Need Help Setting Cell Values | Excel Programming |